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.
286 lines
7.1 KiB
286 lines
7.1 KiB
/*
|
|
Sog 游戏基础库
|
|
2016 by zouwei
|
|
*/
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using Sog;
|
|
using ProtoCSStruct;
|
|
using Sog.Data;
|
|
|
|
namespace Game
|
|
{
|
|
public class PlayerPingInfo
|
|
{
|
|
public long LastLogTime;
|
|
public long MaxPingTime;
|
|
public long MinPingTime;
|
|
public long TotalPingTime;
|
|
public int PingCount;
|
|
public long LastRecvPingTime;
|
|
}
|
|
|
|
public class RealmRoleBrief
|
|
{
|
|
public long uid;
|
|
public int realmId;
|
|
public int level;
|
|
public string nick;
|
|
public string icon;
|
|
public int iconFramId;
|
|
public long lastLoginTime;
|
|
}
|
|
|
|
|
|
public class KnightData
|
|
{
|
|
//public HeroProp prop = new HeroProp();
|
|
public RoleProp props = new RoleProp();
|
|
}
|
|
|
|
|
|
public class PlayerOnGame : DataSeqSave
|
|
{
|
|
public long SessionID;
|
|
public uint GateServerID;
|
|
public long UserID;
|
|
public int RealmID;
|
|
public int LogicWorld;
|
|
public string Lang; //语言
|
|
|
|
public PlatformType Platform //android ,ios ,windows,等同于AccountInfo里面的
|
|
{
|
|
get
|
|
{
|
|
return clientInfo.Platform;
|
|
}
|
|
private set { }
|
|
}
|
|
|
|
public long appVersion;
|
|
|
|
public string apkVersion
|
|
{
|
|
get
|
|
{
|
|
return clientInfo.apkVersion;
|
|
}
|
|
private set { }
|
|
}
|
|
public int battleVersion; //客户端战斗版本号
|
|
public uint cacheBattleAppId; //缓存的战斗服务器id
|
|
|
|
public bool DoNotSaveRole = false; // 不要存储角色信息, 用于测试
|
|
|
|
public PlayerStatus status;
|
|
|
|
public UInt64 BattleID; //战斗id
|
|
|
|
//上次请求副本时间,限制连续请求,后期副本方案(重连?)确定后再考虑去掉这个限制
|
|
public long lastReqMainlandTime;
|
|
|
|
public uint LoginCountOnThisObject;
|
|
|
|
public AccountInfo AccountInfo;
|
|
public QQPayInfo QQPayInfo;
|
|
|
|
public DBRoleBase RoleBase;
|
|
public DBRoleData RoleData;
|
|
public DBRoleUnimportanceData unimportanceData;
|
|
|
|
public DropRateData DropRateData;
|
|
|
|
|
|
|
|
public long m_battleTeamPower = 0;
|
|
|
|
// 本次登录的在线时长
|
|
public long CurrOnlineTime = 0;
|
|
|
|
//网络断线时间
|
|
public long DisconnectedTime = 0;
|
|
|
|
//下线时间
|
|
public long OfflineTime = 0;
|
|
|
|
//5分钟ping没收到,需要offline
|
|
public long NotifyRoomDisconnectedTime = 0;
|
|
|
|
//客户端ping消息,统计信息
|
|
public PlayerPingInfo PingInfo;
|
|
|
|
|
|
//限制请求频率,免得太多无效数据库请求
|
|
public long LastExchangeCouponReqTime;
|
|
|
|
//禁言解除时间
|
|
public long GagChatEndTime;
|
|
//帐号封号结束时间
|
|
public long BanAccountEndTime;
|
|
// 封号原因
|
|
public FreezeReasonType freezetype;
|
|
// 自定义封号原因
|
|
public string freezeReasonStr;
|
|
|
|
//任务版本号,用于判断是否刷新任务
|
|
public int taskVersion;
|
|
|
|
public int friendCount;
|
|
|
|
//新加用于处理Hero(2018-05-15)
|
|
//public ulong m_serialNumber = 10000;
|
|
//可以开格子的最大数量
|
|
public int m_MaxDBHeroCount;
|
|
|
|
public int m_MaxEquipmentCount;
|
|
|
|
public int m_MaxArtifactCount;
|
|
|
|
public int m_MaxCommanderCount;
|
|
|
|
public uint CurLoginSerialNum;//记录登陆唯一号
|
|
|
|
//session断开连接后会被清理掉, 缓存一份信息用于BDC日志上报
|
|
public string lastDeviceId;
|
|
|
|
public long LastUpgradeRank;
|
|
|
|
public IPlayerMsgCache msgCache;
|
|
public string deviceId
|
|
{
|
|
get
|
|
{
|
|
return clientInfo.DeviceId;
|
|
}
|
|
private set { }
|
|
}
|
|
public string loginIpAddr
|
|
{
|
|
get
|
|
{
|
|
return clientInfo.IPAddr;
|
|
}
|
|
private set { }
|
|
}
|
|
|
|
public long channelId //渠道id
|
|
{
|
|
get
|
|
{
|
|
return clientInfo.channelId;
|
|
}
|
|
private set { }
|
|
}
|
|
public string appChannelId
|
|
{
|
|
get
|
|
{
|
|
return clientInfo.appChannelId;
|
|
}
|
|
private set { }
|
|
}
|
|
|
|
public string deviceIdBdc
|
|
{
|
|
get
|
|
{
|
|
return clientInfo.DeviceIdBdc;
|
|
}
|
|
private set { }
|
|
}
|
|
public string appChannelIdBdc
|
|
{
|
|
get
|
|
{
|
|
return clientInfo.appChannelIdBdc;
|
|
}
|
|
private set { }
|
|
}
|
|
|
|
//账号创建时间
|
|
public long accountCreateTime;
|
|
public uint accountCreateIp;
|
|
public string accountCreateIpStr;
|
|
|
|
// 好友礼物赠送领取数据
|
|
public int todaySelfSendGift;
|
|
public int todaySelfRecvGift;
|
|
public int lastResetGiftDataTime;
|
|
|
|
public int lastUnionOpseq = 0; //公会操作seq(不入库)
|
|
public long lastFindUnionTime; //上次搜索公会的时间
|
|
public long lastRecommendUnion; //上次推荐公会的时间
|
|
public long lastSynRankDataTime; //上次同步排行榜数据的时间
|
|
public long lastDirtyCheckSeq; //脏词检查是异步 防止重复点击只处理当前的
|
|
|
|
public List<RealmRoleBrief> roleBriefList = new List<RealmRoleBrief>();
|
|
public long lastQueryBriefTime;
|
|
|
|
public long m_peakArenaGuessUid; //巅峰竞技场竞猜
|
|
|
|
public List<int> addTreasure = new List<int>();
|
|
|
|
public string taDistinctID;
|
|
|
|
//限制点赞频率,反正多次点击
|
|
public long m_lastArenaLikesTimes;
|
|
public long m_lastArenaLikesUid;
|
|
|
|
|
|
//英雄账号类型以及第三方id
|
|
public int userType;
|
|
public string openId;
|
|
|
|
public ClientInfo clientInfo;
|
|
|
|
// 骑士数据
|
|
public KnightData knight;
|
|
public DataSeqSave heroPropDataSeq;
|
|
|
|
// gm标记位
|
|
public uint gmBits;
|
|
|
|
//赛马的伪随机种子
|
|
public List<List<long>> RandomSeed = new List<List<long>>();
|
|
|
|
public PlayerOnGame(long sessionID, uint gateServerID)
|
|
{
|
|
SessionID = sessionID;
|
|
GateServerID = gateServerID;
|
|
|
|
PingInfo = new PlayerPingInfo();
|
|
|
|
addTreasure = new List<int>();
|
|
|
|
clientInfo = new ClientInfo();
|
|
|
|
knight = new KnightData();
|
|
|
|
heroPropDataSeq = new DataSeqSave();
|
|
heroPropDataSeq.SaveReqMinInterval = 60000;
|
|
heroPropDataSeq.SaveReqWaitAckTimeout = 60000;
|
|
LastUpgradeRank = 0;
|
|
}
|
|
|
|
|
|
|
|
public void MakeHeroDataDirty()
|
|
{
|
|
heroPropDataSeq.MakeDirty();
|
|
}
|
|
|
|
public void MakePowerDirty()
|
|
{
|
|
}
|
|
|
|
public void MakeAllHeroPowerDirty()
|
|
{
|
|
}
|
|
|
|
|
|
//邮件数据
|
|
public long DBMailDataLoadedTime;
|
|
public RepeatedDBMail_150 MailInfo;
|
|
}
|
|
}
|
|
|