- Timestamp:
- Jun 12, 2023, 3:21:34 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/PersistentData/Player.cs
r443 r446 5 5 [Serializable] 6 6 public class Player { 7 private readonly PlatformUserIdentifierAbs platformId;8 7 private int entityId; 9 8 private string name; … … 26 25 [NonSerialized] private ClientInfo clientInfo; 27 26 28 public PlatformUserIdentifierAbs PlatformId => platformId; 27 public PlatformUserIdentifierAbs InternalId { get; } 28 public PlatformUserIdentifierAbs PlatformId { get; } 29 public PlatformUserIdentifierAbs CrossPlatformId { get; } 29 30 30 31 public int EntityID => entityId; … … 34 35 public string IP => ip ?? string.Empty; 35 36 36 public Inventory Inventory => inventory ?? (inventory = new Inventory ());37 public Inventory Inventory => inventory ??= new Inventory (); 37 38 38 39 public bool IsOnline => clientInfo != null; … … 58 59 public bool LandProtectionActive => 59 60 GameManager.Instance.World.IsLandProtectionValidForPlayer (GameManager.Instance 60 .GetPersistentPlayerList ().GetPlayerData ( PlatformId));61 .GetPersistentPlayerList ().GetPlayerData (InternalId)); 61 62 62 63 public float LandProtectionMultiplier => 63 64 GameManager.Instance.World.GetLandProtectionHardnessModifierForPlayer (GameManager.Instance 64 .GetPersistentPlayerList ().GetPlayerData ( PlatformId));65 .GetPersistentPlayerList ().GetPlayerData (InternalId)); 65 66 66 67 public float Level { … … 107 108 } 108 109 109 public Player (PlatformUserIdentifierAbs _platformId) { 110 platformId = _platformId; 110 public Player (PlatformUserIdentifierAbs _internalId, PlatformUserIdentifierAbs _platformId, PlatformUserIdentifierAbs _crossPlatformId) { 111 InternalId = _internalId; 112 PlatformId = _platformId; 113 CrossPlatformId = _crossPlatformId; 111 114 inventory = new Inventory (); 112 115 } … … 117 120 } 118 121 119 Log.Out ("Player set to offline: " + platformId);122 Log.Out ("Player set to offline: " + InternalId); 120 123 lastOnline = DateTime.Now; 121 124 try { … … 133 136 134 137 public void SetOnline (ClientInfo _ci) { 135 Log.Out ("Player set to online: " + platformId);138 Log.Out ("Player set to online: " + InternalId); 136 139 clientInfo = _ci; 137 140 entityId = _ci.entityId;
Note:
See TracChangeset
for help on using the changeset viewer.