public bool processCmd(Logic.GameClient client, string[] cmdParams) { int nID = (int)TCPGameServerCmds.CMD_SPR_GET_WANMOTA_DETAIL; int nRoleID = Global.SafeConvertToInt32(cmdParams[0]); string strCmd = ""; WanMotaInfo data = WanMotaCopySceneManager.GetWanMoTaDetail(client, false); if (null == data) { strCmd = string.Format("{0}:{1}:{2}:{3}:{4}:{5}:{6}", -1, nRoleID, 0, 0, 0, 0, 0); client.sendCmd(nID, strCmd); return(true); } else { strCmd = string.Format("{0}:{1}:{2}:{3}:{4}:{5}:{6}", 0, nRoleID, data.nPassLayerCount, data.nTopPassLayerCount, SweepWanMotaManager.GetSweepCount(client), data.nSweepLayer, WanMotaCopySceneManager.WanmotaIsSweeping(client)); if (WanMoTaTopLayer < data.nTopPassLayerCount) { WanMoTaTopLayer = data.nTopPassLayerCount; } client.sendCmd(nID, strCmd); return(true); } }
public bool processCmd(GameClient client, string[] cmdParams) { int nID = 618; int nRoleID = Global.SafeConvertToInt32(cmdParams[0]); WanMotaInfo data = WanMotaCopySceneManager.GetWanMoTaDetail(client, false); bool result; if (null == data) { string strCmd = string.Format("{0}:{1}:{2}:{3}:{4}:{5}:{6}", new object[] { -1, nRoleID, 0, 0, 0, 0, 0 }); client.sendCmd(nID, strCmd, false); result = true; } else { if (data.nPassLayerCount != client.ClientData.WanMoTaNextLayerOrder) { LogManager.WriteLog(LogTypes.Error, string.Format("角色roleid={0} 万魔塔层数不一致 nPassLayerCount={1}, WanMoTaNextLayerOrder={2}", client.ClientData.RoleID, data.nPassLayerCount, client.ClientData.WanMoTaNextLayerOrder), null, true); client.ClientData.WanMoTaNextLayerOrder = data.nPassLayerCount; GameManager.ClientMgr.SaveWanMoTaPassLayerValue(client, data.nPassLayerCount, true); } string strCmd = string.Format("{0}:{1}:{2}:{3}:{4}:{5}:{6}", new object[] { 0, nRoleID, data.nPassLayerCount, data.nTopPassLayerCount, SweepWanMotaManager.GetSweepCount(client), data.nSweepLayer, WanMotaCopySceneManager.WanmotaIsSweeping(client) }); SingletonTemplate <WanMoTaTopLayerManager> .Instance().CheckNeedUpdate(data.nTopPassLayerCount); client.sendCmd(nID, strCmd, false); result = true; } return(result); }
public bool processCmd(Logic.GameClient client, string[] cmdParams) { int nID = (int)TCPGameServerCmds.CMD_SPR_GET_WANMOTA_DETAIL; int nRoleID = Global.SafeConvertToInt32(cmdParams[0]); string strCmd = ""; WanMotaInfo data = WanMotaCopySceneManager.GetWanMoTaDetail(client, false); if (null == data) { strCmd = string.Format("{0}:{1}:{2}:{3}:{4}:{5}:{6}", -1, nRoleID, 0, 0, 0, 0, 0); client.sendCmd(nID, strCmd); return(true); } else { if (data.nPassLayerCount != client.ClientData.WanMoTaNextLayerOrder) { LogManager.WriteLog(LogTypes.Error, string.Format("角色roleid={0} 万魔塔层数不一致 nPassLayerCount={1}, WanMoTaNextLayerOrder={2}", client.ClientData.RoleID, data.nPassLayerCount, client.ClientData.WanMoTaNextLayerOrder)); client.ClientData.WanMoTaNextLayerOrder = data.nPassLayerCount; //WanMoTaDBCommandManager.LayerChangeDBCommand(client, data.nPassLayerCount); GameManager.ClientMgr.SaveWanMoTaPassLayerValue(client, data.nPassLayerCount, true); } strCmd = string.Format("{0}:{1}:{2}:{3}:{4}:{5}:{6}", 0, nRoleID, data.nPassLayerCount, data.nTopPassLayerCount, SweepWanMotaManager.GetSweepCount(client), data.nSweepLayer, WanMotaCopySceneManager.WanmotaIsSweeping(client)); // modify by chenjingui. 20150717,解决多线程操作问题 // 其实应该在GameServer启动的时候,加载一次万魔塔最高通关,暂时先按照原有方式 WanMoTaTopLayerManager.Instance().CheckNeedUpdate(data.nTopPassLayerCount); /* * if (WanMoTaTopLayer < data.nTopPassLayerCount) * { * WanMoTaTopLayer = data.nTopPassLayerCount; * }*/ client.sendCmd(nID, strCmd); return(true); } }