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.
80 lines
2.3 KiB
80 lines
2.3 KiB
/*
|
|
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
|
|
{
|
|
/// <summary>
|
|
/// 礼包兑换记录
|
|
/// </summary>
|
|
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<string, long> m_uiduseragent = new Dictionary<string, long>();
|
|
|
|
// 一个cluster下所有的realm简要信息, 包含其他world的
|
|
public List<RealmBriefInfo> m_allRealm = new List<RealmBriefInfo>();
|
|
|
|
public Dictionary<int,int> m_allRealmOnlineInfo = new Dictionary<int, int>();
|
|
|
|
public Dictionary<long, long> m_clickcount = new Dictionary<long, long>();
|
|
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<PlayerOpServerData>(PlayerOpDataObjType.ExchangeCodeServerData);
|
|
}
|
|
|
|
public static ExchangeCodeCache GetExchangeCodeCache()
|
|
{
|
|
return ServerDataObjMgr.GetDataObj<ExchangeCodeCache>(PlayerOpDataObjType.ExchangeCodeCache);
|
|
}
|
|
public override int GetDataType()
|
|
{
|
|
return PlayerOpDataObjType.ExchangeCodeServerData;
|
|
}
|
|
}
|
|
}
|
|
|