public WowArmor(WowBasicItem wowBasicItem) : base(wowBasicItem) { Id = wowBasicItem.Id; BagId = wowBasicItem.BagId; BagSlot = wowBasicItem.BagSlot; Type = wowBasicItem.Type; Subtype = wowBasicItem.Subtype; Name = wowBasicItem.Name; ItemLink = wowBasicItem.ItemLink; EquipSlot = wowBasicItem.EquipSlot; ItemQuality = wowBasicItem.ItemQuality; ItemLevel = wowBasicItem.ItemLevel; RequiredLevel = wowBasicItem.RequiredLevel; Price = wowBasicItem.Price; Count = wowBasicItem.Count; MaxStack = wowBasicItem.MaxStack; Durability = wowBasicItem.Durability; MaxDurability = wowBasicItem.MaxDurability; EquipLocation = wowBasicItem.EquipLocation; ArmorType = Enum.TryParse(Subtype.ToUpper(), out ArmorType armorType) ? armorType : ArmorType.MISCELLANEOUS; }
public WowWeapon(WowBasicItem wowBasicItem) : base(wowBasicItem) { Id = wowBasicItem.Id; BagId = wowBasicItem.BagId; BagSlot = wowBasicItem.BagSlot; Type = wowBasicItem.Type; Subtype = wowBasicItem.Subtype; Name = wowBasicItem.Name; ItemLink = wowBasicItem.ItemLink; EquipSlot = wowBasicItem.EquipSlot; ItemQuality = wowBasicItem.ItemQuality; ItemLevel = wowBasicItem.ItemLevel; RequiredLevel = wowBasicItem.RequiredLevel; Price = wowBasicItem.Price; Count = wowBasicItem.Count; MaxStack = wowBasicItem.MaxStack; Durability = wowBasicItem.Durability; MaxDurability = wowBasicItem.MaxDurability; EquipLocation = wowBasicItem.EquipLocation; WeaponType = Enum.TryParse(Subtype.ToUpper().Replace("-", string.Empty).Replace(" ", "_"), out WeaponType armorType) ? armorType : WeaponType.MISCELLANEOUS; }
public WowBasicItem(WowBasicItem item) { if (item != null) { BagId = item.BagId; BagSlot = item.BagSlot; Count = item.Count; Durability = item.Durability; EquipLocation = item.EquipLocation; EquipSlot = item.EquipSlot; Id = item.Id; ItemLevel = item.ItemLevel; ItemLink = item.ItemLink; ItemQuality = item.ItemQuality; MaxDurability = item.MaxDurability; MaxStack = item.MaxStack; Name = item.Name; Price = item.Price; RequiredLevel = item.RequiredLevel; Stats = item.Stats; Subtype = item.Subtype; Type = item.Type; } }
/** * Copy Constructor */ public WowBasicItem(WowBasicItem item) { if (item != null) { this.BagId = item.BagId; this.BagSlot = item.BagSlot; this.Count = Count; this.Durability = item.Durability; this.EquipLocation = item.EquipLocation; this.EquipSlot = item.EquipSlot; this.Id = item.Id; this.ItemLevel = item.ItemLevel; this.ItemLink = item.ItemLink; this.ItemQuality = item.ItemQuality; this.MaxDurability = item.MaxDurability; this.MaxStack = item.MaxStack; this.Name = item.Name; this.Price = item.Price; this.RequiredLevel = item.RequiredLevel; this.Stats = item.Stats; this.Subtype = item.Subtype; this.Type = item.Type; } }