/* Sog 游戏基础库 2016 by zouwei */ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Game; using ProtoCSStruct; using Sog; namespace Operation { /// /// 礼包兑换记录 /// public class ExchangeCodeRecord { public string exchangecode { get; set; } public int uid { get; set; } } public class RealmBriefOperationInfo : RealmBriefInfo { public string operation; } public class OperationExchangeCodeInfo { public int id; public string exchangeCode; //礼包码 public long beginTime; public long endTime;//过期时间 public int mainline; // 主线限制 public int maxExchangeNum; //礼包码兑款数量限制 0为无限制 public int exchangeNum; // 已经兑换的数量 public ExchangeContent content; //增加现金,IDValue32 Id为类型,value 为值 } public class OperationServerData : IServerDataObj { public ServerApp m_app; public StructPacketSender m_packetSender; public Dictionary m_tokenList = new Dictionary(); public Dictionary m_accountList = new Dictionary(); public Dictionary m_uiduseragent = new Dictionary(); // 一个cluster下所有的realm简要信息, 包含其他world的 public Dictionary m_allRealm = new Dictionary(); public string recvRealmListMd5; public Dictionary m_allRealmOnlineInfo = new Dictionary(); public OperationWebsite m_operationWebsite = new(); /// /// 礼包码 /// /// public Dictionary m_clickcount = new Dictionary(); public long[] preTime = new long[1]; public OperationServerData(ServerApp app) { m_app = app; m_packetSender = new StructPacketSender(); m_packetSender.Init(app.ServerID, app.GetCluster()); } public static OperationServerData GetOperationData() { return ServerDataObjMgr.GetDataObj(OperationDataObjType.OperationServerData); } public static ExchangeCodeCache GetExchangeCodeCache() { return ServerDataObjMgr.GetDataObj(OperationDataObjType.ExchangeCodeCache); } public override int GetDataType() { return OperationDataObjType.OperationServerData; } } }