using System; using System.Collections.Generic; using System.Text; using D2Data; using D2Packets; namespace Chief { public class Item { public ItemActionType Action; public BaseItem BaseItem; public ItemCategory Category; public CharacterClass Class; public ItemContainer Container; public ItemDestination Destination; public ItemFlags Flags; public int Level; public EquipmentLocation Location; public List MagicPrefix; public List MagicSuffix; public List Mods; public string Name; public ItemAffix Prefix; public ItemQuality Quality; public BaseRuneword Runeword; public int RunewordID; public int RunewordParam; //public List SetBonuses; public BaseSetItem SetItem; public List Stats; public ItemAffix Suffix; public SuperiorItemType SuperiorType; public uint UID; public BaseUniqueItem UniqueItem; public int Use; public int UsedSockets; public ItemVersion Version; public int X; public int Y; public Dictionary SimpleMods; public Dictionary SimpleStats; public Item(GameServer.WorldItemAction packet) { this.Initialize(packet); } public void Initialize(GameServer.WorldItemAction packet) { this.Action = packet.Action; this.BaseItem = packet.BaseItem; this.Category = packet.Category; this.Class = packet.Class; this.Container = packet.Container; this.Destination = packet.Destination; this.Flags = packet.Flags; this.Level = packet.Level; this.Location = packet.Location; this.MagicPrefix = packet.MagicPrefixes; this.MagicSuffix = packet.MagicSuffixes; this.Mods = packet.Mods; this.Name = packet.Name; this.Prefix = packet.Prefix; this.Quality = packet.Quality; this.Runeword = packet.Runeword; this.RunewordID = packet.RunewordID; this.RunewordParam = packet.RunewordParam; this.SetItem = packet.SetItem; this.Stats = packet.Stats; this.Suffix = packet.Suffix; this.SuperiorType = packet.SuperiorType; this.UID = packet.UID; this.UniqueItem = packet.UniqueItem; this.Use = packet.Use; this.UsedSockets = packet.UsedSockets; this.Version = packet.Version; this.X = packet.X; this.Y = packet.Y; this.SimpleStats = new Dictionary(); foreach (D2Data.StatBase stat in this.Stats) { this.SimpleStats.Add(stat.BaseStat.Name, (stat as D2Data.SignedStat).Value); } /* this.SimpleMods = new Dictionary(); foreach (D2Data.StatBase stat in this.Mods) { this.SimpleMods.Add(stat.BaseStat.Name, (int)(stat as D2Data.UnsignedStat).Value); }*/ } } }