Changeset 98 for binary-improvements/7dtd-server-fixes
- Timestamp:
- Jul 22, 2014, 8:39:11 AM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs
r93 r98 9 9 public SortedList<string, int> bag = new SortedList<string, int> (); 10 10 11 public PlayerItems (InventoryField[] belt, InventoryField[]bag)11 public PlayerItems (InventoryField[] _belt, InventoryField[] _bag) 12 12 { 13 foreach (InventoryField item in belt) {13 foreach (InventoryField item in _belt) { 14 14 if (item.count > 0) { 15 this.belt.Add (getInvFieldName (item), item.count); 15 string name = getInvFieldName(item); 16 if (belt.ContainsKey(name)) { 17 belt[name] += item.count; 18 } else { 19 belt.Add (name, item.count); 20 } 16 21 } 17 22 } 18 23 19 foreach (InventoryField item in bag) {24 foreach (InventoryField item in _bag) { 20 25 if (item.count > 0) { 21 this.bag.Add (getInvFieldName (item), item.count); 26 string name = getInvFieldName(item); 27 if (bag.ContainsKey(name)) { 28 bag[name] += item.count; 29 } else { 30 bag.Add (name, item.count); 31 } 22 32 } 23 33 }
Note:
See TracChangeset
for help on using the changeset viewer.