public void processCmd(GameServerClient client, int nID, byte[] cmdParams, int count) { int[] challengeRankings = DataHelper.BytesToObject <int[]>(cmdParams, 0, count); List <PlayerJingJiMiniData> miniDatas = JingJiChangManager.getInstance().getChallengeData(challengeRankings); client.sendCmd <List <PlayerJingJiMiniData> >(10141, miniDatas); }
public static void SetPrestigeLevel(GameClient client, int level) { Global.SaveRoleParamsInt32ValueWithTimeStampToDB(client, "ShengWangLevel", level, true, "2020-12-12 12:12:12"); GameManager.logDBCmdMgr.AddDBLogInfo(-1, "声望等级", "GM", "系统", client.ClientData.RoleName, "修改", level, client.ClientData.ZoneID, client.strUserID, level, client.ServerId, null); EventLogManager.AddRoleEvent(client, OpTypes.Trace, OpTags.GM, LogRecordType.IntValueWithType, new object[] { level, RoleAttributeType.ShengWangLevel }); if (level > 0) { JingJiChangManager.getInstance().activeJunXianBuff(client, true); } Global.UpdateBufferData(client, BufferItemTypes.MU_JINGJICHANG_JUNXIAN, new double[] { (double)level - 1.0 }, 0, true); ChengJiuManager.OnRoleJunXianChengJiu(client); Global.BroadcastClientMUShengWang(client, level); GameManager.ClientMgr.NotifySelfParamsValueChange(client, RoleCommonUseIntParamsIndexs.ShengWangLevel, level); GameManager.ClientMgr.NotifyUpdateEquipProps(Global._TCPManager.MySocketListener, Global._TCPManager.TcpOutPacketPool, client); GameManager.ClientMgr.NotifyOthersLifeChanged(Global._TCPManager.MySocketListener, Global._TCPManager.TcpOutPacketPool, client, true, false, 7); client._IconStateMgr.CheckJingJiChangJunXian(client); client._IconStateMgr.CheckSpecialActivity(client); client._IconStateMgr.CheckEverydayActivity(client); client._IconStateMgr.SendIconStateToClient(client); }
public void processCmd(GameServerClient client, int nID, byte[] cmdParams, int count) { int roleId = DataHelper.BytesToObject <int>(cmdParams, 0, count); bool result = JingJiChangManager.getInstance().removeCD(roleId); client.sendCmd <bool>(10147, result); }
public bool processCmd(Logic.GameClient client, string[] cmdParams) { int result = JingJiChangManager.getInstance().upGradeJunXian(client); client.sendCmd <int>((int)TCPGameServerCmds.CMD_SPR_JINGJICHANG_JUNXIAN_LEVELUP, result); return(true); }
/// <summary> /// 声望军衔——设置等级 /// </summary> /// <param name="client"></param> /// <param name="level"></param> /// <returns></returns> public static void SetPrestigeLevel(GameClient client, int level) { //更新到数据库 Global.SaveRoleParamsInt32ValueWithTimeStampToDB(client, RoleParamName.ShengWangLevel, level, true); GameManager.logDBCmdMgr.AddDBLogInfo(-1, "声望等级", "GM", "系统", client.ClientData.RoleName, "修改", level, client.ClientData.ZoneID, client.strUserID, level, client.ServerId); EventLogManager.AddRoleEvent(client, OpTypes.Trace, OpTags.GM, LogRecordType.IntValueWithType, level, RoleAttributeType.ShengWangLevel); if (level > 0) { JingJiChangManager.getInstance().activeJunXianBuff(client, true); } //更新BufferData double[] actionParams = new double[1]; actionParams[0] = (double)level - 1; Global.UpdateBufferData(client, BufferItemTypes.MU_JINGJICHANG_JUNXIAN, actionParams, 0); ChengJiuManager.OnRoleJunXianChengJiu(client); Global.BroadcastClientMUShengWang(client, level); //通知自己 GameManager.ClientMgr.NotifySelfParamsValueChange(client, RoleCommonUseIntParamsIndexs.ShengWangLevel, level); //通知客户端属性变化 GameManager.ClientMgr.NotifyUpdateEquipProps(Global._TCPManager.MySocketListener, Global._TCPManager.TcpOutPacketPool, client); // 总生命值和魔法值变化通知(同一个地图才需要通知) GameManager.ClientMgr.NotifyOthersLifeChanged(Global._TCPManager.MySocketListener, Global._TCPManager.TcpOutPacketPool, client); // 军衔升级成功时,刷新相应的图标状态 client._IconStateMgr.CheckJingJiChangJunXian(client); client._IconStateMgr.CheckSpecialActivity(client); client._IconStateMgr.SendIconStateToClient(client); }
public bool processCmd(Logic.GameClient client, string[] cmdParams) { int result = JingJiChangManager.getInstance().removeCD(client); client.sendCmd <int>((int)TCPGameServerCmds.CMD_SPR_JINGJICHANG_REMOVE_CD, result); return(true); }
public bool processCmd(Logic.GameClient client, string[] cmdParams) { int roleId = Convert.ToInt32(cmdParams[0]); //被挑战者ID int beChallengerId = Convert.ToInt32(cmdParams[1]); //被挑战者排名 int beChallengeRanking = Convert.ToInt32(cmdParams[2]); //挑战方式: 0:免费, 1:vip int enterType = Convert.ToInt32(cmdParams[3]); //非法参数 int result = 0; if (beChallengerId < 0 || beChallengeRanking < 1 || beChallengeRanking > JingJiChangConstants.RankingListMaxNum || (enterType != JingJiChangConstants.Enter_Type_Free && enterType != JingJiChangConstants.Enter_Type_Vip)) { client.sendCmd <int>((int)TCPGameServerCmds.CMD_SPR_JINGJI_REQUEST_CHALLENGE, result); return(true); } result = JingJiChangManager.getInstance().requestChallenge(client, beChallengerId, beChallengeRanking, enterType); client.sendCmd <int>((int)TCPGameServerCmds.CMD_SPR_JINGJI_REQUEST_CHALLENGE, result); return(true); }
public void processCmd(GameServerClient client, int nID, byte[] cmdParams, int count) { JingJiChallengeResultData data = DataHelper.BytesToObject <JingJiChallengeResultData>(cmdParams, 0, count); int ranking = JingJiChangManager.getInstance().onChallengeEnd(data); client.sendCmd <int>(10144, ranking); }
public static void startup() { //战盟事件管理器 ZhanMengShiJianManager.getInstance().startup(); //竞技场管理器 JingJiChangManager.getInstance().startup(); //离线摆摊 LiXianBaiTanManager.getInstance().startup(); //离线挂机 LiXianGuaJiManager.getInstance().startup(); //副本活动组队管理器 CopyTeamManager.getInstance().startup(); //指令注册管理器 CmdRegisterTriggerManager.getInstance().startup(); //发送指令管理 SendCmdManager.getInstance().startup(); //Boss AI管理器 BossAIManager.getInstance().startup(); //MU交易所 SaleManager.getInstance().startup(); //炼制系统 LianZhiManager.GetInstance().startup(); // 成就升级 ChengJiuManager.GetInstance().startup(); }
public bool processCmd(GameClient client, string[] cmdParams) { int result = JingJiChangManager.getInstance().upGradeJunXian(client); client.sendCmd <int>(586, result, false); return(true); }
public void processCmd(GameServerClient client, int nID, byte[] cmdParams, int count) { int roleId = DataHelper.BytesToObject <int>(cmdParams, 0, count); PlayerJingJiData data = JingJiChangManager.getInstance().getPlayerJingJiDataById(roleId); client.sendCmd <PlayerJingJiData>(10140, data); }
public void processCmd(GameServerClient client, byte[] cmdParams, int count) { int[] challengeRankings = DataHelper.BytesToObject <int[]>(cmdParams, 0, count); List <PlayerJingJiMiniData> miniDatas = JingJiChangManager.getInstance().getChallengeData(challengeRankings); client.sendCmd <List <PlayerJingJiMiniData> >((int)TCPGameServerCmds.CMD_DB_JINGJICHANG_GET_CHALLENGE_DATA, miniDatas); }
public void processCmd(GameServerClient client, int nID, byte[] cmdParams, int count) { JingJiSaveData data = DataHelper.BytesToObject <JingJiSaveData>(cmdParams, 0, count); int winCount; JingJiChangManager.getInstance().saveData(data, out winCount); client.sendCmd <int>(10145, winCount); }
public void processCmd(GameServerClient client, byte[] cmdParams, int count) { int pageIndex = DataHelper.BytesToObject <int>(cmdParams, 0, count); List <PlayerJingJiRankingData> rankingDatas = JingJiChangManager.getInstance().getRankingList(pageIndex); client.sendCmd <List <PlayerJingJiRankingData> >((int)TCPGameServerCmds.CMD_DB_JINGJICHANG_GET_RANKINGLIST_DATA, rankingDatas); }
public void processEvent(EventObject eventObject) { if (eventObject.getEventType() == 9) { PlayerLevelupEventObject levelupEvent = (PlayerLevelupEventObject)eventObject; JingJiChangManager.getInstance().onPlayerLevelup(levelupEvent.Player); } }
public bool processCmd(GameClient client, string[] cmdParams) { int type = Convert.ToInt32(cmdParams[1]); JingJiDetailData data = JingJiChangManager.getInstance().getDetailData(client, type); client.sendCmd <JingJiDetailData>(578, data, false); return(true); }
public void processCmd(GameServerClient client, byte[] cmdParams, int count) { int roleId = DataHelper.BytesToObject <int>(cmdParams, 0, count); PlayerJingJiData data = JingJiChangManager.getInstance().getPlayerJingJiDataById(roleId); client.sendCmd <PlayerJingJiData>((int)TCPGameServerCmds.CMD_DB_JINGJICHANG_GET_DATA, data); }
public void processCmd(GameServerClient client, byte[] cmdParams, int count) { int roleId = DataHelper.BytesToObject <int>(cmdParams, 0, count); bool result = JingJiChangManager.getInstance().removeCD(roleId); client.sendCmd <bool>((int)TCPGameServerCmds.CMD_DB_JINGJICHANG_REMOVE_CD, result); }
public void processEvent(EventObject eventObject) { if (eventObject.getEventType() == 13) { PlayerLeaveFuBenEventObject _eventObject = eventObject as PlayerLeaveFuBenEventObject; JingJiChangManager.getInstance().onChallengeEndForPlayerLeaveFuBen(_eventObject.getPlayer()); } }
public void processCmd(GameServerClient client, byte[] cmdParams, int count) { JingJiChallengeResultData data = DataHelper.BytesToObject <JingJiChallengeResultData>(cmdParams, 0, count); int ranking = JingJiChangManager.getInstance().onChallengeEnd(data); client.sendCmd <int>((int)TCPGameServerCmds.CMD_DB_JINGJICHANG_CHALLENGE_END, ranking); }
public void processEvent(EventObject eventObject) { if (eventObject.getEventType() == 12) { PlayerLogoutEventObject _eventObject = (PlayerLogoutEventObject)eventObject; JingJiChangManager.getInstance().onChallengeEndForPlayerLogout(_eventObject.getPlayer()); } }
/// <summary> /// 检查“剩余挑战次数”项是否要显示要更新图标状态 /// </summary> public bool CheckJingJiChangLeftTimes(GameClient client) { if (JingJiChangManager.getInstance().checkEnterNum(client, (int)JingJiChangManager.Enter_Type_Free) == ResultCode.Success) { return(AddFlushIconState((ushort)ActivityTipTypes.JingJiChangLeftTimes, true)); } return(AddFlushIconState((ushort)ActivityTipTypes.JingJiChangLeftTimes, false)); }
/// <summary> /// 检查“奖励预览”项是否要显示要更新图标状态 /// </summary> public bool CheckJingJiChangJiangLi(GameClient client) { if (JingJiChangManager.getInstance().CanGetrankingReward(client)) { return(AddFlushIconState((ushort)ActivityTipTypes.JingJiChangJiangLi, true)); } return(AddFlushIconState((ushort)ActivityTipTypes.JingJiChangJiangLi, false)); }
public void processCmd(GameServerClient client, int nID, byte[] cmdParams, int count) { int[] _cmdParams = DataHelper.BytesToObject <int[]>(cmdParams, 0, count); int roleId = _cmdParams[0]; int pageIndex = _cmdParams[1]; List <JingJiChallengeInfoData> rankingListData = JingJiChangManager.getInstance().getChallengeInfoDataList(roleId, pageIndex); client.sendCmd <List <JingJiChallengeInfoData> >(10146, rankingListData); }
/// <summary> /// 检查“军衔提升”项是否要显示要更新图标状态 /// </summary> public bool CheckJingJiChangJunXian(GameClient client) { if (JingJiChangManager.getInstance().CanGradeJunXian(client)) { return(AddFlushIconState((ushort)ActivityTipTypes.JingJiChangJunXian, true)); } return(AddFlushIconState((ushort)ActivityTipTypes.JingJiChangJunXian, false)); }
public void processCmd(GameServerClient client, int nID, byte[] cmdParams, int count) { long[] _cmdParams = DataHelper.BytesToObject <long[]>(cmdParams, 0, count); int roleId = (int)_cmdParams[0]; long nextRewardTime = _cmdParams[1]; bool result = JingJiChangManager.getInstance().updateNextRewardTime(roleId, nextRewardTime); client.sendCmd <int>(10149, result ? 1 : 0); }
public bool processCmd(Logic.GameClient client, string[] cmdParams) { int type = Convert.ToInt32(cmdParams[1]); JingJiDetailData data = JingJiChangManager.getInstance().getDetailData(client, type); client.sendCmd <JingJiDetailData>((int)TCPGameServerCmds.CMD_SPR_JINGJI_DETAIL, data); return(true); }
public void processCmd(GameServerClient client, byte[] cmdParams, int count) { JingJiSaveData data = DataHelper.BytesToObject <JingJiSaveData>(cmdParams, 0, count); int winCount; JingJiChangManager.getInstance().saveData(data, out winCount); client.sendCmd <int>((int)TCPGameServerCmds.CMD_DB_JINGJICHANG_SAVE_DATA, winCount); }
public bool processCmd(Logic.GameClient client, string[] cmdParams) { int result; long nextRewardTime; JingJiChangManager.getInstance().rankingReward(client, out result, out nextRewardTime); client.sendCmd <long[]>((int)TCPGameServerCmds.CMD_SPR_JINGJI_RANKING_REWARD, new long[] { result, nextRewardTime }); return(true); }
public void processCmd(GameServerClient client, int nID, byte[] cmdParams, int count) { int[] _cmdParams = DataHelper.BytesToObject <int[]>(cmdParams, 0, count); int challengerId = _cmdParams[0]; int beChallengerId = _cmdParams[1]; int beChallengerRanking = _cmdParams[2]; JingJiBeChallengeData result = JingJiChangManager.getInstance().requestChallenge(challengerId, beChallengerId, beChallengerRanking); client.sendCmd <JingJiBeChallengeData>(10143, result); }