2021-04-08 20:09:59 +08:00
|
|
|
|
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<int, float> mainAttribute;
|
|
|
|
|
|
|
|
|
|
public List<int> randomAttributes;
|
|
|
|
|
public List<int> addtionalAttributes;
|
|
|
|
|
|
|
|
|
|
public List<int> gemList;
|
|
|
|
|
public Equip() { }
|
|
|
|
|
public Equip(EquipTransMessage equip)
|
|
|
|
|
{
|
|
|
|
|
mainAttribute = new Dictionary<int, float>();
|
|
|
|
|
gemList = new List<int>(equip.GemList.Count);
|
|
|
|
|
randomAttributes = new List<int>(equip.randomAttributes.Count);
|
|
|
|
|
addtionalAttributes = new List<int>(equip.addtionalAttributes.Count);
|
|
|
|
|
|
|
|
|
|
specialKey = (AttributeType)equip.specialKey;
|
|
|
|
|
specialId = equip.specialId;
|
|
|
|
|
EquipId = equip.EquipId;
|
|
|
|
|
IsLocked = equip.IsLocked;
|
2021-04-11 19:50:39 +08:00
|
|
|
|
foreach (AttributeMap item in equip.mainAttribute)
|
2021-04-08 20:09:59 +08:00
|
|
|
|
{
|
|
|
|
|
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<ClientItemDataComponent>
|
|
|
|
|
{
|
|
|
|
|
public override void Awake(ClientItemDataComponent self)
|
|
|
|
|
{
|
|
|
|
|
ClientItemDataComponent.Instance = self;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ClientItemDataComponent:Entity
|
|
|
|
|
{
|
|
|
|
|
public static ClientItemDataComponent Instance{ get; set; }
|
|
|
|
|
//!int 为Index
|
|
|
|
|
public DoubleDictionary<int,int, ClientItemData> ItemDic { get; }= new DoubleDictionary<int,int, ClientItemData>();
|
|
|
|
|
public SortedDictionary<int, ClientItemData> StoreItemDic { get; }= new SortedDictionary<int, ClientItemData>();
|
|
|
|
|
public SortedDictionary<int, ClientItemData> WornEquipDic { get; } = new SortedDictionary<int, ClientItemData>();
|
|
|
|
|
public SortedDictionary<int, ConsignmentItemData> ConsignmentDic { get; } = new SortedDictionary<int, ConsignmentItemData>();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|