Changeset 224 for binary-improvements/7dtd-server-fixes/src/ItemList.cs
- Timestamp:
- Apr 2, 2015, 9:16:34 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/ItemList.cs
r199 r224 27 27 } 28 28 29 public Nullable<ItemValue>GetItemValue (string itemName)29 public ItemValue GetItemValue (string itemName) 30 30 { 31 31 if (items.ContainsKey (itemName)) { 32 return items [itemName] ;32 return items [itemName].Clone (); 33 33 } else { 34 34 itemName = itemName.ToLower (); 35 35 foreach (KeyValuePair<string, ItemValue> kvp in items) { 36 36 if (kvp.Key.ToLower ().Equals (itemName)) { 37 return kvp.Value ;37 return kvp.Value.Clone (); 38 38 } 39 39 } … … 47 47 foreach (InventoryField invF in cm.GetAllItems()) { 48 48 ItemBase ib = ItemBase.list [invF.itemValue.type]; 49 string name = ib.GetItemName ( invF.itemValue);49 string name = ib.GetItemName (); 50 50 if (name != null && name.Length > 0) { 51 51 if (!items.ContainsKey (name)) { … … 58 58 foreach (InventoryField invF in cm.GetAllBlocks()) { 59 59 ItemBase ib = ItemBase.list [invF.itemValue.type]; 60 string name = ib.GetItemName ( invF.itemValue);60 string name = ib.GetItemName (); 61 61 if (name != null && name.Length > 0) { 62 62 if (!items.ContainsKey (name)) {
Note:
See TracChangeset
for help on using the changeset viewer.