You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

63 lines
1.4 KiB

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<ExchangeCodeStrcut> m_cache;
//兑换码索引map
public Dictionary<string, long> m_codeMap = new Dictionary<string, long>();
//兑换码id索引map
public Dictionary<int, long> m_codeIdMap = new Dictionary<int, long>();
public ExchangeCodeCache(int count)
{
m_cache = new StructMemoryCache<ExchangeCodeStrcut>(count + 1);
}
public override int GetDataType()
{
return GameDataObjType.ExchangeCodeCache;
}
}
}