コード例 #1
0
        public ItemWrapper(ACDItem item)
        {
            ActorSNO            = item.ActorSNO;
            GameBalanceId       = item.GameBalanceId;
            DynamicID           = item.DynamicId;
            ACDGuid             = item.ACDGuid;
            InventorySlot       = item.InventorySlot;
            ValidInventorySlots = item.ValidInventorySlots;
            RequiredLevel       = item.RequiredLevel;
            IsUnidentified      = item.IsUnidentified;
            IsTwoHand           = item.IsTwoHand;
            IsOneHand           = item.IsOneHand;
            Name              = item.Name;
            InternalName      = item.InternalName;
            this.ItemType     = item.ItemType;
            this.ItemBaseType = item.ItemBaseType;
            IsShield          = ShieldTypes.Contains(ItemType);
            IsOffHand         = OffHandTypes.Contains(ItemType);
            IsArmor           = ArmorTypes.Contains(ItemType);
            IsJewlery         = JewleryTypes.Contains(ItemType);
            IsWeapon          = WeaponTypes.Contains(ItemType);
            IsMisc            = MiscTypes.Contains(ItemType);

            HasSingleUseSlot = IsSingleSlotItem();

            Item  = item;
            Stats = item.Stats;
        }
コード例 #2
0
        public ItemWrapper(ACDItem item)
        {
            try
            {
                ActorSNO            = item.ActorSNO;
                GameBalanceId       = item.GameBalanceId;
                DynamicId           = item.DynamicId;
                ACDGuid             = item.ACDGuid;
                InventorySlot       = item.InventorySlot;
                ValidInventorySlots = item.ValidInventorySlots;
                RequiredLevel       = item.RequiredLevel;
            }
            catch (Exception ex)
            {
                Logger.LogError("Error wrapping non-attribute properties on item {0}: " + ex);
            }
            try
            {
                Name                  = item.Name;
                IsUnidentified        = item.IsUnidentified;
                IsTwoHand             = item.IsTwoHand;
                IsOneHand             = item.IsOneHand;
                InternalName          = item.InternalName;
                ItemType              = item.ItemType;
                ItemBaseType          = item.ItemBaseType;
                IsShield              = ShieldTypes.Contains(ItemType);
                IsOffHand             = OffHandTypes.Contains(ItemType);
                IsArmor               = ArmorTypes.Contains(ItemType);
                IsJewelry             = JewleryTypes.Contains(ItemType);
                IsWeapon              = WeaponTypes.Contains(ItemType);
                IsEquipment           = item.ItemBaseType == ItemBaseType.Armor || item.ItemBaseType == ItemBaseType.Jewelry || item.ItemBaseType == ItemBaseType.Weapon;
                IsMisc                = MiscTypes.Contains(ItemType);
                IsGem                 = item.ItemBaseType == ItemBaseType.Gem;
                IsTwoSquareItem       = (item.ItemBaseType == ItemBaseType.Armor || item.ItemBaseType == ItemBaseType.Weapon) && item.IsTwoSquareItem;
                IsPotion              = item.IsPotion;
                ItemQualityLevel      = item.ItemQualityLevel;
                GemQuality            = item.GemQuality;
                TieredLootRunKeyLevel = item.TieredLootRunKeyLevel;
                ItemStackQuantity     = item.ItemStackQuantity;
                IsSetItem             = item.IsSetItem();
                ItemSetName           = item.ItemSetName();

                HasSingleUseSlot = IsSingleSlotItem();

                Item          = item;
                Stats         = item.Stats;
                StatsData     = ItemStatsDataFactory.GetItemStatsDataFromStats(Stats);
                ReferenceItem = new Item(Item);
            }
            catch (Exception ex)
            {
                Logger.LogError("Error wrapping item {0}: " + ex);
            }
        }