public GenericItem GetEquippedItemByID(ItemData.ITEM_ID aItemID) { GenericItem item = new GenericItem(); if (IsItemEquippedOnCharacter(aItemID)) { item = ItemData.ITEM_DICTIONARY[aItemID]; } return(item); }
public bool IsItemEquippedOnCharacter(ItemData.ITEM_ID aItemID) { bool bExists = false; foreach (var index in m_Equipment) { if (index.Value == aItemID) { bExists = true; } } return(bExists); }
//TODO: If, is player, take the previous equip item, and put it in inventory public void AddEquipmentToCharacter(ItemData.ITEM_ID aItemID) { if (aItemID != ItemData.ITEM_ID.NONE) { ItemData.ITEM_TYPE itemType = ItemData.ITEM_DICTIONARY[aItemID].GetItemType(); if (IsEquipSlotFull(itemType) == false) { m_Equipment[itemType] = aItemID; } else { Debug.Log("Warning: aItemID: " + aItemID + " cannot be added, the slot is already filled"); } } }
public void AddItemToDropList(ItemData.ITEM_ID aItemID) { m_ListOfItemDrops.Add(aItemID); }