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.
 
 
 
 
 
 

95 lines
2.7 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 Operation
{
/// <summary>
/// 礼包兑换记录
/// </summary>
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<string, long> m_tokenList = new Dictionary<string, long>();
public Dictionary<string, string> m_accountList = new Dictionary<string, string>();
public Dictionary<string, long> m_uiduseragent = new Dictionary<string, long>();
// 一个cluster下所有的realm简要信息, 包含其他world的
public Dictionary<int, RealmBriefInfo> m_allRealm = new Dictionary<int, RealmBriefInfo>();
public string recvRealmListMd5;
public Dictionary<int,int> m_allRealmOnlineInfo = new Dictionary<int, int>();
public OperationWebsite m_operationWebsite = new();
/// <summary>
/// 礼包码
/// </summary>
///
public Dictionary<long, long> m_clickcount = new Dictionary<long, long>();
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<OperationServerData>(OperationDataObjType.OperationServerData);
}
public static ExchangeCodeCache GetExchangeCodeCache()
{
return ServerDataObjMgr.GetDataObj<ExchangeCodeCache>(OperationDataObjType.ExchangeCodeCache);
}
public override int GetDataType()
{
return OperationDataObjType.OperationServerData;
}
}
}