- Timestamp:
- Sep 21, 2014, 7:20:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/CustomCommands/Give.cs
r130 r197 36 36 } 37 37 38 ItemBase item = null; 39 40 foreach (ItemBase ib in ItemBase.list) { 41 if (ib.name != null && ib.name.ToLower ().Equals (_params [1].ToLower ())) { 42 item = ib; 43 break; 44 } 45 } 46 47 if (item == null) { 38 Nullable<ItemValue> iv = ItemList.Instance.GetItemValue(_params[1]); 39 if (iv == null) { 48 40 m_Console.SendResult ("Item not found."); 49 41 return; … … 57 49 58 50 EntityPlayer p = CommonMappingFunctions.GetEntityPlayer (ci); 59 CommonMappingFunctions.GetGameManager ().DropEntityItemServer ( item.itemID, n, p.GetPosition (), Vector3.zero, Vector3.zero, 50, CommonMappingFunctions.GetEntityID (ci));51 CommonMappingFunctions.GetGameManager ().DropEntityItemServer ((int)iv.Value.rawData, n, p.GetPosition (), Vector3.zero, Vector3.zero, 50, CommonMappingFunctions.GetEntityID (ci)); 60 52 61 53 m_Console.SendResult ("Dropped item");
Note:
See TracChangeset
for help on using the changeset viewer.