Changeset 238 for binary-improvements/7dtd-server-fixes/src/PersistentData
- Timestamp:
- Jul 3, 2015, 4:16:11 PM (9 years ago)
- Location:
- binary-improvements/7dtd-server-fixes/src/PersistentData
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs
r232 r238 25 25 } 26 26 27 private void ProcessInv (List<InvItem> target, I nventoryField[] sourceFields, int id)27 private void ProcessInv (List<InvItem> target, ItemStack[] sourceFields, int id) 28 28 { 29 29 lock (target) { … … 32 32 if (sourceFields [i].count > 0) { 33 33 int count = sourceFields [i].count; 34 int maxAllowed = Item Base.list [sourceFields [i].itemValue.type].Stacknumber.Value;35 string name = Item Base.list [sourceFields [i].itemValue.type].GetItemName ();34 int maxAllowed = ItemClass.list [sourceFields [i].itemValue.type].Stacknumber.Value; 35 string name = ItemClass.list [sourceFields [i].itemValue.type].GetItemName (); 36 36 37 37 if (count > maxAllowed) -
binary-improvements/7dtd-server-fixes/src/PersistentData/PersistentContainer.cs
r230 r238 36 36 public void Save () 37 37 { 38 Stream stream = File.Open ( StaticDirectories.GetSaveGameDir () + "/AllocsPeristentData.bin", FileMode.Create);38 Stream stream = File.Open (GameUtils.GetSaveGameDir () + "/AllocsPeristentData.bin", FileMode.Create); 39 39 BinaryFormatter bFormatter = new BinaryFormatter (); 40 40 bFormatter.Serialize (stream, this); … … 44 44 public static bool Load () 45 45 { 46 if (File.Exists ( StaticDirectories.GetSaveGameDir () + "/AllocsPeristentData.bin")) {46 if (File.Exists (GameUtils.GetSaveGameDir () + "/AllocsPeristentData.bin")) { 47 47 try { 48 48 PersistentContainer obj; 49 Stream stream = File.Open ( StaticDirectories.GetSaveGameDir () + "/AllocsPeristentData.bin", FileMode.Open);49 Stream stream = File.Open (GameUtils.GetSaveGameDir () + "/AllocsPeristentData.bin", FileMode.Open); 50 50 BinaryFormatter bFormatter = new BinaryFormatter (); 51 51 obj = (PersistentContainer)bFormatter.Deserialize (stream); -
binary-improvements/7dtd-server-fixes/src/PersistentData/Player.cs
r233 r238 135 135 name = ci.playerName; 136 136 ip = ci.ip; 137 lastOnline = DateTime.Now; 137 138 } 138 139
Note:
See TracChangeset
for help on using the changeset viewer.