Changeset 446 for binary-improvements/7dtd-server-fixes/src/API.cs
- Timestamp:
- Jun 12, 2023, 3:21:34 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/API.cs
r443 r446 23 23 24 24 public void SavePlayerData (ClientInfo _cInfo, PlayerDataFile _playerDataFile) { 25 PersistentContainer.Instance.Players [_cInfo.InternalId, true].Update (_cInfo, _playerDataFile);25 PersistentContainer.Instance.Players.GetOrCreate (_cInfo.InternalId, _cInfo.PlatformId, _cInfo.CrossplatformId).Update (_cInfo, _playerDataFile); 26 26 } 27 27 … … 43 43 44 44 public void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) { 45 Player p = PersistentContainer.Instance.Players [_cInfo.InternalId, false];45 Player p = PersistentContainer.Instance.Players.GetByInternalId (_cInfo.InternalId); 46 46 if (p != null) { 47 47 p.SetOffline (); … … 54 54 55 55 public void PlayerSpawned (ClientInfo _cInfo, RespawnType _respawnReason, Vector3i _spawnPos) { 56 PersistentContainer.Instance.Players [_cInfo.InternalId, true].SetOnline (_cInfo);56 PersistentContainer.Instance.Players.GetOrCreate (_cInfo.InternalId, _cInfo.PlatformId, _cInfo.CrossplatformId).SetOnline (_cInfo); 57 57 PersistentContainer.Instance.Save (); 58 58 }
Note:
See TracChangeset
for help on using the changeset viewer.