- Timestamp:
- Apr 30, 2015, 1:55:16 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/PersistentData/Player.cs
r230 r233 20 20 private int 21 21 lastPositionX, lastPositionY, lastPositionZ; 22 [OptionalField] 23 private uint experience; 22 24 [NonSerialized] 23 25 private ClientInfo … … 94 96 } 95 97 98 public uint Experience { 99 get { 100 return experience; 101 } 102 } 103 104 public float Level { 105 get { 106 float perc = (float)experience / 600000; 107 perc = Mathf.Sqrt (perc); 108 return Mathf.Clamp ((perc * 60) + 1, 1, 60); 109 } 110 } 111 96 112 public void SetOffline () 97 113 { … … 121 137 } 122 138 139 public void Update (PlayerDataFile _pdf) { 140 experience = _pdf.experience; 141 inventory.Update (_pdf); 142 } 143 123 144 public Player (string steamId) 124 145 {
Note:
See TracChangeset
for help on using the changeset viewer.