コード例 #1
0
ファイル: Inventory.cs プロジェクト: Guiedo/BehaviorIsManaged
 public IEnumerable<Item> GetItems(ItemSuperTypeEnum superType)
 {
     return m_items.Where(item => item.SuperType == superType);
 }
コード例 #2
0
 public IEnumerable <Item> GetItems(ItemSuperTypeEnum superType)
 {
     return(m_items.Where(item => item.SuperType == superType));
 }
コード例 #3
0
        public Inventory(Character owner)
        {
            System.Collections.Generic.Dictionary <ItemSuperTypeEnum, CharacterInventoryPositionEnum[]> dictionary = new System.Collections.Generic.Dictionary <ItemSuperTypeEnum, CharacterInventoryPositionEnum[]>();
            System.Collections.Generic.Dictionary <ItemSuperTypeEnum, CharacterInventoryPositionEnum[]> arg_167_0  = dictionary;
            ItemSuperTypeEnum arg_167_1 = ItemSuperTypeEnum.SUPERTYPE_AMULET;

            CharacterInventoryPositionEnum[] value = new CharacterInventoryPositionEnum[1];
            arg_167_0.Add(arg_167_1, value);
            dictionary.Add(ItemSuperTypeEnum.SUPERTYPE_WEAPON, new CharacterInventoryPositionEnum[]
            {
                CharacterInventoryPositionEnum.ACCESSORY_POSITION_WEAPON
            });
            dictionary.Add(ItemSuperTypeEnum.SUPERTYPE_WEAPON_8, new CharacterInventoryPositionEnum[]
            {
                CharacterInventoryPositionEnum.ACCESSORY_POSITION_WEAPON
            });
            dictionary.Add(ItemSuperTypeEnum.SUPERTYPE_CAPE, new CharacterInventoryPositionEnum[]
            {
                CharacterInventoryPositionEnum.ACCESSORY_POSITION_CAPE
            });
            dictionary.Add(ItemSuperTypeEnum.SUPERTYPE_HAT, new CharacterInventoryPositionEnum[]
            {
                CharacterInventoryPositionEnum.ACCESSORY_POSITION_HAT
            });
            dictionary.Add(ItemSuperTypeEnum.SUPERTYPE_RING, new CharacterInventoryPositionEnum[]
            {
                CharacterInventoryPositionEnum.INVENTORY_POSITION_RING_LEFT,
                CharacterInventoryPositionEnum.INVENTORY_POSITION_RING_RIGHT
            });
            dictionary.Add(ItemSuperTypeEnum.SUPERTYPE_BOOTS, new CharacterInventoryPositionEnum[]
            {
                CharacterInventoryPositionEnum.ACCESSORY_POSITION_BOOTS
            });
            dictionary.Add(ItemSuperTypeEnum.SUPERTYPE_BELT, new CharacterInventoryPositionEnum[]
            {
                CharacterInventoryPositionEnum.ACCESSORY_POSITION_BELT
            });
            dictionary.Add(ItemSuperTypeEnum.SUPERTYPE_PET, new CharacterInventoryPositionEnum[]
            {
                CharacterInventoryPositionEnum.ACCESSORY_POSITION_PETS
            });
            dictionary.Add(ItemSuperTypeEnum.SUPERTYPE_DOFUS, new CharacterInventoryPositionEnum[]
            {
                CharacterInventoryPositionEnum.INVENTORY_POSITION_DOFUS_1,
                CharacterInventoryPositionEnum.INVENTORY_POSITION_DOFUS_2,
                CharacterInventoryPositionEnum.INVENTORY_POSITION_DOFUS_3,
                CharacterInventoryPositionEnum.INVENTORY_POSITION_DOFUS_4,
                CharacterInventoryPositionEnum.INVENTORY_POSITION_DOFUS_5,
                CharacterInventoryPositionEnum.INVENTORY_POSITION_DOFUS_6
            });
            dictionary.Add(ItemSuperTypeEnum.SUPERTYPE_SHIELD, new CharacterInventoryPositionEnum[]
            {
                CharacterInventoryPositionEnum.ACCESSORY_POSITION_SHIELD
            });
            dictionary.Add(ItemSuperTypeEnum.SUPERTYPE_BOOST, new CharacterInventoryPositionEnum[]
            {
                CharacterInventoryPositionEnum.INVENTORY_POSITION_BOOST_FOOD
            });
            this.m_itemsPositioningRules = dictionary;
            this.Owner = owner;
            this.InitializeEvents();
        }