public List <ITEM> GetFunctionItemsByInvenType(int InvenType, eITEM_SUPPLY_FUNCTION eType) { List <ITEM> list = new List <ITEM>(); if (InvenType < 0 || InvenType >= 7) { return(list); } if (this.m_Inventory[InvenType] == null) { return(list); } int num = 30; for (int i = 0; i < num; i++) { ITEM iTEM = this.m_Inventory[InvenType].m_kInvenItem[i]; if (iTEM != null) { ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(iTEM.m_nItemUnique); if (itemInfo != null) { if (itemInfo.m_nFunctions == (byte)eType) { list.Add(iTEM); } } } } return(list); }
public List <ITEM> GetFunctionItems(eITEM_SUPPLY_FUNCTION eType) { List <ITEM> list = new List <ITEM>(); for (int i = 0; i < 7; i++) { if (this.m_Inventory[i] != null) { for (int j = 0; j < ItemDefine.INVENTORY_ITEMSLOT_MAX; j++) { ITEM iTEM = this.m_Inventory[i].m_kInvenItem[j]; if (iTEM != null) { ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(iTEM.m_nItemUnique); if (itemInfo != null) { if (itemInfo.m_nFunctions == (byte)eType) { list.Add(iTEM); } } } } } } return(list); }
public int GetFunctionItemNum(eITEM_SUPPLY_FUNCTION eType) { int num = 0; for (int i = 0; i < 7; i++) { if (this.m_Inventory[i] != null) { for (int j = 0; j < ItemDefine.INVENTORY_ITEMSLOT_MAX; j++) { ITEM iTEM = this.m_Inventory[i].m_kInvenItem[j]; if (iTEM != null) { ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(iTEM.m_nItemUnique); if (itemInfo != null) { if (itemInfo.m_nFunctions == (byte)eType) { num += iTEM.m_nItemNum; } } } } } } return(num); }