using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Sog; using ProtoCSStruct; namespace Game { public struct ExchangeCodeStrcut : IStructObject { public int m_objectID; public int GetObjectID() { return m_objectID; } public void SetObjectID(int id) { m_objectID = id; } public bool IsNull() { return m_objectID == -1; } public bool NeedSave; public void setNeedSave(bool b) { NeedSave = b; } public bool getNeedSave() { return NeedSave; } public ExchangeConfigure data; } public class ExchangeCodeCache : IServerDataObj { //兑换码缓存 public StructMemoryCache m_cache; //兑换码索引map public Dictionary m_codeMap = new Dictionary(); //兑换码id索引map public Dictionary m_codeIdMap = new Dictionary(); public ExchangeCodeCache(int count) { m_cache = new StructMemoryCache(count + 1); } public override int GetDataType() { return GameDataObjType.ExchangeCodeCache; } } }