using Cal; using ET; using System; using System.Collections.Generic; using System.ComponentModel; namespace ET { public class Equip { public int EquipId; public long ServerId; public bool IsLocked; public int star; public Quality quality; public int level; public AttributeType specialKey; public int specialId; public Dictionary mainAttribute; public List randomAttributes; public List addtionalAttributes; public List gemList; public Equip() { } public Equip(EquipTransMessage equip) { mainAttribute = new Dictionary(); gemList = new List(equip.GemList.Count); randomAttributes = new List(equip.randomAttributes.Count); addtionalAttributes = new List(equip.addtionalAttributes.Count); specialKey = (AttributeType)equip.specialKey; specialId = equip.specialId; EquipId = equip.EquipId; IsLocked = equip.IsLocked; foreach (AttributeMap item in equip.mainAttribute) { mainAttribute.Add(item.Key, item.Value); } gemList.AddRange(equip.GemList); randomAttributes.AddRange(equip.randomAttributes); addtionalAttributes.AddRange(equip.addtionalAttributes); star = equip.Star; quality = (Quality)equip.Quality; level = equip.Level; } } public class ClientItemData:Entity { public int ItemId; public ItemType ItemType; public int Count; public Equip Equip; public bool IsLock; public string getSource; } public class ConsignmentItemData : ClientItemData { public bool isNeedPwd; } public class ClientItemDataComponentAwakeSystem : AwakeSystem { public override void Awake(ClientItemDataComponent self) { ClientItemDataComponent.Instance = self; } } public class ClientItemDataComponent:Entity { public static ClientItemDataComponent Instance{ get; set; } //!int 为Index public DoubleDictionary ItemDic { get; }= new DoubleDictionary(); public SortedDictionary StoreItemDic { get; }= new SortedDictionary(); public SortedDictionary WornEquipDic { get; } = new SortedDictionary(); public SortedDictionary ConsignmentDic { get; } = new SortedDictionary(); } }