- Timestamp:
- Jan 19, 2019, 6:12:21 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/PersistentData/Players.cs
r332 r351 8 8 public readonly Dictionary<string, Player> Dict = new Dictionary<string, Player> (StringComparer.OrdinalIgnoreCase); 9 9 10 public Player this [string steamId, boolcreate] {10 public Player this [string _steamId, bool _create] { 11 11 get { 12 if (string.IsNullOrEmpty ( steamId)) {12 if (string.IsNullOrEmpty (_steamId)) { 13 13 return null; 14 14 } 15 15 16 if (Dict.ContainsKey ( steamId)) {17 return Dict [ steamId];16 if (Dict.ContainsKey (_steamId)) { 17 return Dict [_steamId]; 18 18 } 19 19 20 if (! create ||steamId.Length != 17) {20 if (!_create || _steamId.Length != 17) { 21 21 return null; 22 22 } 23 23 24 Log.Out ("Created new player entry for ID: " + steamId);25 Player p = new Player ( steamId);26 Dict.Add ( steamId, p);24 Log.Out ("Created new player entry for ID: " + _steamId); 25 Player p = new Player (_steamId); 26 Dict.Add (_steamId, p); 27 27 return p; 28 28 }
Note:
See TracChangeset
for help on using the changeset viewer.