public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_TODAY_DATA, 1, 1, getInstance()); TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_TODAY_AWARD, 2, 2, getInstance()); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx(1032, 1, 1, FundManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1033, 1, 1, FundManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1034, 1, 1, FundManager.getInstance(), TCPCmdFlags.IsStringArrayParams); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_UNION_PALACE_DATA, 1, 1, getInstance()); TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_UNION_PALACE_UP, 1, 1, getInstance()); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_ACTIVATE_INFO, 5, 5, getInstance()); TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_ACTIVATE_AWARD, 5, 5, getInstance()); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx(1410, 2, 2, RoleManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1411, 2, 2, RoleManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1412, 7, 7, RoleManager.getInstance(), TCPCmdFlags.IsStringArrayParams); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessor(20311, SingletonTemplate <YaoSaiMissionManager> .Instance()); TCPCmdDispatcher.getInstance().registerProcessor(20312, SingletonTemplate <YaoSaiMissionManager> .Instance()); TCPCmdDispatcher.getInstance().registerProcessor(20313, SingletonTemplate <YaoSaiMissionManager> .Instance()); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessor(13220, SingletonTemplate <SevenDayActivityManager> .Instance()); TCPCmdDispatcher.getInstance().registerProcessor(13221, SingletonTemplate <SevenDayActivityManager> .Instance()); TCPCmdDispatcher.getInstance().registerProcessor(13222, SingletonTemplate <SevenDayActivityManager> .Instance()); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessor(1382, SingletonTemplate <CoupleArenaDbManager> .Instance()); TCPCmdDispatcher.getInstance().registerProcessor(1371, SingletonTemplate <CoupleArenaDbManager> .Instance()); TCPCmdDispatcher.getInstance().registerProcessor(1383, SingletonTemplate <CoupleArenaDbManager> .Instance()); return(true); }
public bool initialize() { //注册指令处理器 TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_SPR_COPYTEAM, 5, CopyTeamCmdProcessor.getInstance(TCPGameServerCmds.CMD_SPR_COPYTEAM)); TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_SPR_REGEVENTNOTIFY, 4, CopyTeamCmdProcessor.getInstance(TCPGameServerCmds.CMD_SPR_REGEVENTNOTIFY)); TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_SPR_LISTCOPYTEAMS, 4, CopyTeamCmdProcessor.getInstance(TCPGameServerCmds.CMD_SPR_LISTCOPYTEAMS)); //向事件源注册监听器 GlobalEventSource.getInstance().registerListener((int)EventTypes.PlayerLeaveFuBen, CopyTeamEventListener.getInstance()); GlobalEventSource.getInstance().registerListener((int)EventTypes.PlayerLogout, CopyTeamEventListener.getInstance()); //初始化组队副本的列表 lock (SceneIndexRoleIDListDict) { lock (_SceneIndexDict) { foreach (var systemFuBenItem in GameManager.systemFuBenMgr.SystemXmlItemDict.Values) { int copyType = systemFuBenItem.GetIntValue("CopyType"); if (Global.ConstTeamCopyType == copyType) { int copyID = systemFuBenItem.GetIntValue("ID"); _SceneIndexDict.Add(copyID, copyID); SceneIndexRoleIDListDict.Add(copyID, new HashSet <int>()); } } } } //需要记录伤害排名的副本ID集合 RecordDamagesFuBenIDHashSet.Add(4000); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx(1810, 1, 1, ZhuanPanManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1811, 2, 2, ZhuanPanManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1813, 1, 1, ZhuanPanManager.getInstance(), TCPCmdFlags.IsStringArrayParams); return(true); }
public static TCPProcessCmdResults CCProcessCmd(TCPManager tcpMgr, TMSKSocket socket, TCPClientPool tcpClientPool, TCPRandKey tcpRandKey, TCPOutPacketPool pool, int nID, byte[] data, int count, out TCPOutPacket tcpOutPacket) { //if (nID > 30000) // SysConOut.WriteLine("接收:" + nID + "|" + ConvertEnumToString<CC.CommandID>(nID)); //测试用 //System.Diagnostics.Debug.WriteLine("ProcessCmd: {0}", (TCPGameServerCmds)nID); long startTicks = TimeUtil.NOW(); //加入统计 lock (HandlingCmdDict) { HandlingCmdDict[socket] = 1; } TCPProcessCmdResults result = TCPProcessCmdResults.RESULT_FAILED; tcpOutPacket = null; //记录最后一次消息id,事件,总消息数量 socket.session.CmdID = nID; socket.session.CmdTime = startTicks; #region 指令处理 result = TCPCmdDispatcher.getInstance().dispathProcessor(socket, nID, data, count); if (result == TCPProcessCmdResults.RESULT_UNREGISTERED) { result = CMDProcess.GetInstance.AttchFun(tcpMgr, socket, tcpClientPool, tcpRandKey, pool, nID, data, count, out tcpOutPacket); } #endregion /// 总共处理的指令个数 TotalHandledCmdsNum++; //测试用 long nowTicks = TimeUtil.NOW(); long usedTicks = nowTicks - startTicks; // SysConOut.WriteLine(string.Format("ProcessCmd: {0}, ticks: {1}", (TCPGameServerCmds)nID, usedTicks)); if (usedTicks > 0) { //LogManager.WriteLog(LogTypes.Error, string.Format("指令处理时间, CMD={0}, Client={1}, Ticks={2}", //(TCPGameServerCmds)nID, Global.GetSocketRemoteEndPoint(socket), nowTicks - startTicks)); if (usedTicks > MaxUsedTicksByCmdID) { MaxUsedTicksCmdID = nID; MaxUsedTicksByCmdID = usedTicks; } } //删除统计 lock (HandlingCmdDict) { HandlingCmdDict.Remove(socket); } //Thread.Sleep((int)Global.GetRandomNumber(100, 250)); ///模拟卡顿的操作 return(result); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx(1447, 1, 1, ArmorManager.getInstance(), TCPCmdFlags.IsBinaryStreamParams); GlobalEventSource.getInstance().registerListener(10, ArmorManager.getInstance()); GlobalEventSource.getInstance().registerListener(57, ArmorManager.getInstance()); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessor(20319, SingletonTemplate <ZuoQiManager> .Instance()); TCPCmdDispatcher.getInstance().registerProcessor(20320, SingletonTemplate <ZuoQiManager> .Instance()); TCPCmdDispatcher.getInstance().registerProcessor(20321, SingletonTemplate <ZuoQiManager> .Instance()); return(true); }
/// <summary> /// 初始化指令 /// </summary> private void initCmdProcessor() { //修改万魔塔表数据 TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_DB_GET_WANMOTA_DETAIL, GetWanMoTaoDetailCmdProcessor.getInstance()); //获取万魔塔信息 TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_DB_MODIFY_WANMOTA, ModifyWanMoTaCmdProcessor.getInstance()); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_PRESTIGE_MEDAL_INFO, 1, 1, getInstance()); TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_PRESTIGE_MEDAL_UP, 2, 2, getInstance()); return(true); }
public static bool initialize() { InitConfig(); TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_SPR_EXEC_WASHPROPS, 5, WashPropsCmdProcessor.getInstance(TCPGameServerCmds.CMD_SPR_EXEC_WASHPROPS)); TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_SPR_EXEC_WASHPROPSINHERIT, 4, WashPropsCmdProcessor.getInstance(TCPGameServerCmds.CMD_SPR_EXEC_WASHPROPSINHERIT)); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx(1445, 1, 1, HuiJiManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1446, 1, 1, HuiJiManager.getInstance(), TCPCmdFlags.IsBinaryStreamParams); GlobalEventSource.getInstance().registerListener(10, HuiJiManager.getInstance()); return(true); }
public bool initialize() { TCPCmdDispatcher.getInstance().registerProcessor(10138, ZhanMengShiJianCmdProcessor.getInstance()); TCPCmdDispatcher.getInstance().registerProcessor(10139, ZhanMengShiJianDetailCmdProcessor.getInstance()); List <ZhanMengShiJianData> dataList = ZhanMengShiJianDBController.getInstance().getZhanMengShiJianDataList(); bool result; if (null == dataList) { result = true; } else { foreach (ZhanMengShiJianData data in dataList) { List <ZhanMengShiJianData> _dataList = null; if (!this.dataCache.TryGetValue(data.BHID, out _dataList)) { _dataList = new List <ZhanMengShiJianData>(); this.dataCache.Add(data.BHID, _dataList); } if (_dataList.Count < ZhanMengShiJianConstants.MaxCacheNum) { _dataList.Add(data); } } result = true; } return(result); }
public bool initialize() { InitConfig(); TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_SPR_EXEC_LIANZHI, 3, LianZhiCmdProcessor.getInstance(TCPGameServerCmds.CMD_SPR_EXEC_LIANZHI)); TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_SPR_QUERY_LIANZHICOUNT, 1, LianZhiCmdProcessor.getInstance(TCPGameServerCmds.CMD_SPR_QUERY_LIANZHICOUNT)); return(true); }
public bool startup() { //注册指令处理器 TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_KUAFU_MAP_ENTER, 2, 4, getInstance()); TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_KUAFU_MAP_INFO, 1, 1, getInstance()); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx(1085, 1, 1, AlchemyManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1086, 3, 4, AlchemyManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1087, 2, 2, AlchemyManager.getInstance(), TCPCmdFlags.IsStringArrayParams); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx(2082, 4, 4, BoCaiManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(2083, 2, 2, BoCaiManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(2085, 1, 1, BoCaiManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(2086, 4, 4, BoCaiManager.getInstance(), TCPCmdFlags.IsStringArrayParams); this.NotifyEnterHandler1 = new EventSourceEx <KFCallMsg> .HandlerData { ID = 0, EventType = 10039, Handler = new Func <KFCallMsg, bool>(this.KFCallMsgFunc) }; this.NotifyEnterHandler2 = new EventSourceEx <KFCallMsg> .HandlerData { ID = 0, EventType = 10040, Handler = new Func <KFCallMsg, bool>(this.KFCallMsgFunc) }; KFCallManager.MsgSource.registerListener(10039, this.NotifyEnterHandler1); KFCallManager.MsgSource.registerListener(10040, this.NotifyEnterHandler2); BoCaiCaiShuZi.GetInstance().Init(); BoCaiCaiDaXiao.GetInstance().Init(); BoCaiShopManager.GetInstance().Init(); return(true); }
public bool initialize() { //战盟事件指令处理器 TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_DB_ADD_ZHANMENGSHIJIAN, ZhanMengShiJianCmdProcessor.getInstance()); //战盟事件详情指令处理器 TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_DB_ZHANMENGSHIJIAN_DETAIL, ZhanMengShiJianDetailCmdProcessor.getInstance()); List <ZhanMengShiJianData> dataList = ZhanMengShiJianDBController.getInstance().getZhanMengShiJianDataList(); if (null == dataList) { return(true); } foreach (ZhanMengShiJianData data in dataList) { List <ZhanMengShiJianData> _dataList = null; if (!dataCache.TryGetValue(data.BHID, out _dataList)) { _dataList = new List <ZhanMengShiJianData>(); dataCache.Add(data.BHID, _dataList); } if (_dataList.Count >= MaxCacheNum) { continue; } _dataList.Add(data); } return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx(1080, 2, 2, ShenJiFuWenManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1081, 1, 1, ShenJiFuWenManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1082, 2, 2, ShenJiFuWenManager.getInstance(), TCPCmdFlags.IsStringArrayParams); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx(910, 1, 1, ThemeBoss.getInstance(), TCPCmdFlags.IsStringArrayParams); GlobalEventSource.getInstance().registerListener(10, ThemeBoss.getInstance()); GlobalEventSource.getInstance().registerListener(11, ThemeBoss.getInstance()); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessor(13230, SingletonTemplate <KingRoleDataManager> .Instance()); TCPCmdDispatcher.getInstance().registerProcessor(13231, SingletonTemplate <KingRoleDataManager> .Instance()); TCPCmdDispatcher.getInstance().registerProcessor(13232, SingletonTemplate <KingRoleDataManager> .Instance()); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx(1310, 2, 2, SingletonTemplate <SevenDayActivityMgr> .Instance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1311, 3, 3, SingletonTemplate <SevenDayActivityMgr> .Instance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1312, 3, 3, SingletonTemplate <SevenDayActivityMgr> .Instance(), TCPCmdFlags.IsStringArrayParams); GlobalEventSource.getInstance().registerListener(32, SingletonTemplate <SevenDayActivityMgr> .Instance()); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_PET_SKILL_UP, 2, 2, getInstance()); TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_PET_SKILL_AWAKE, 3, 3, getInstance()); TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_PET_SKILL_AWAKE_COST, 1, 1, getInstance()); return(true); }
public bool initialize() { //注册战盟事件指令处理器 TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_SPR_ZHANMENGSHIJIAN_DETAIL, 2, ZhanMengShiJianDetailCmdProcessor.getInstance()); //向事件源注册监听器 GlobalEventSource.getInstance().registerListener((int)EventTypes.ZhanMengShiJian, ZhanMengShiJianEventListener.getInstance()); return(true); }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx(1037, 2, 2, PetSkillManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1038, 3, 3, PetSkillManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1039, 1, 1, PetSkillManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1065, 3, 3, PetSkillManager.getInstance(), TCPCmdFlags.IsStringArrayParams); return(true); }