예제 #1
0
        public EquipResult EquipItem(Item equippable)
        {
            var result = EquipResult.WrongItem;

            switch (equippable.ItemType)
            {
            case ItemType.Apparel:
                result = EquipItem(equippable as Apparel);
                break;

            case ItemType.Weapon:
                result = EquipItem(equippable as Weapon);
                break;
            }

            if (result == EquipResult.Success)
            {
                UpdateDynamicItems();
                RPG.Events.OnEquippedItem(new RPGEvents.EquippedItemEventArgs()
                {
                    Item = equippable
                });
                Player.FullUpdateStats();
            }

            return(result);
        }