- Timestamp:
- Sep 21, 2014, 7:20:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs
r192 r197 21 21 { 22 22 //Log.Out ("Updating player inventory - player id: " + pdf.id); 23 ProcessInv (bag, pdf.bag );24 ProcessInv (belt, pdf.inventory );23 ProcessInv (bag, pdf.bag, pdf.id); 24 ProcessInv (belt, pdf.inventory, pdf.id); 25 25 } 26 26 27 private void ProcessInv (List<InvItem> target, InventoryField[] sourceFields )27 private void ProcessInv (List<InvItem> target, InventoryField[] 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 = ItemBase.list [sourceFields [i].itemValue.type].StackNumber; 34 35 string name = getInvFieldName (sourceFields [i]); 35 36 37 if (count > maxAllowed) 38 Log.Out ("Player with ID " + id + " has stack for \"" + name + "\" greater than allowed (" + count + " > " + maxAllowed + ")"); 36 39 target.Add (new InvItem (name, count)); 37 40 } else { … … 45 48 { 46 49 ItemBase iBase = ItemBase.list [item.itemValue.type]; 47 return iBase.GetItemName (item.itemValue);50 return iBase.GetItemName (item.itemValue); 48 51 } 49 52
Note:
See TracChangeset
for help on using the changeset viewer.