Beispiel #1
0
    public GenericItem GetEquippedItemByID(ItemData.ITEM_ID aItemID)
    {
        GenericItem item = new GenericItem();

        if (IsItemEquippedOnCharacter(aItemID))
        {
            item = ItemData.ITEM_DICTIONARY[aItemID];
        }

        return(item);
    }
Beispiel #2
0
    public bool IsItemEquippedOnCharacter(ItemData.ITEM_ID aItemID)
    {
        bool bExists = false;

        foreach (var index in m_Equipment)
        {
            if (index.Value == aItemID)
            {
                bExists = true;
            }
        }

        return(bExists);
    }
Beispiel #3
0
    //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");
            }
        }
    }
Beispiel #4
0
 public void AddItemToDropList(ItemData.ITEM_ID aItemID)
 {
     m_ListOfItemDrops.Add(aItemID);
 }