/* Sog 游戏基础库 2016 by zouwei */ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Game; using ProtoCSStruct; using Sog; namespace PlayerOp { /// /// 礼包兑换记录 /// public class ExchangeCodeRecord { public string exchangecode { get; set; } public int uid { get; set; } } public class RealmBriefExchangeCodeInfo : RealmBriefInfo { public string ExchangeCode; } public class ExchangeCodeExchangeCodeInfo { 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 PlayerOpServerData : IServerDataObj { public ServerApp m_app; public StructPacketSender m_packetSender; public Dictionary m_uiduseragent = new Dictionary(); // 一个cluster下所有的realm简要信息, 包含其他world的 public List m_allRealm = new List(); public Dictionary m_allRealmOnlineInfo = new Dictionary(); public Dictionary m_clickcount = new Dictionary(); public long[] preTime = new long[1]; public PlayerOpServerData(ServerApp app) { m_app = app; m_packetSender = new StructPacketSender(); m_packetSender.Init(app.ServerID, app.GetCluster()); } public static PlayerOpServerData GetExchangeCodeData() { return ServerDataObjMgr.GetDataObj(PlayerOpDataObjType.ExchangeCodeServerData); } public static ExchangeCodeCache GetExchangeCodeCache() { return ServerDataObjMgr.GetDataObj(PlayerOpDataObjType.ExchangeCodeCache); } public override int GetDataType() { return PlayerOpDataObjType.ExchangeCodeServerData; } } }