hxp
2019-04-16 767426c623624202acd0c97854946f4fafafe904
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py
@@ -26,6 +26,7 @@
import PlayerTalk
import CrossBoss
import ChConfig
import PlayerFB
import GMShell
import traceback
@@ -89,6 +90,9 @@
            
        elif msgType == ShareDefine.ClientServerMsg_QueryNPCInfo:
            PlayerQuery.ClientServerMsg_QueryNPCInfo(serverGroupID, msgData)
        elif msgType == ShareDefine.ClientServerMsg_EnterFB:
            PlayerFB.ClientServerMsg_EnterFB(serverGroupID, msgData, tick)
            
        elif msgType == ShareDefine.ClientServerMsg_SetPlayerAttrValue:
            MapServer_CrossSetPlayerAttrValue(msgData)
@@ -246,8 +250,11 @@
        elif msgType == ShareDefine.CrossServerMsg_NPCInfoRet:
            PlayerQuery.CrossServerMsg_NPCInfoRet(msgData, tick)
            
        elif msgType == ShareDefine.CrossServerMsg_EnterFBRet:
            PlayerFB.CrossServerMsg_EnterFBRet(msgData, tick)
        # 需要发送到地图服务器处理的
        elif msgType in [ShareDefine.CrossServerMsg_RebornRet, ShareDefine.CrossServerMsg_CollectNPCOK]:
        elif msgType in [ShareDefine.CrossServerMsg_RebornRet, ShareDefine.CrossServerMsg_CollectNPCOK, ShareDefine.CrossServerMsg_FBEnd]:
            MapServer_ClientServerReceiveMsg(msgType, msgData)
            
        elif msgType == ShareDefine.CrossServerMsg_CrossServerState:
@@ -266,6 +273,22 @@
def MapServer_ClientServerReceiveMsg(msgType, msgData):
    ## 收到跨服服务器信息,需要发送到地图服务器处理
    
    if msgType in [ShareDefine.CrossServerMsg_FBEnd]:
        curServerGroupID = GameWorld.GetServerGroupID()
        for tagPlayerID, msgInfo in msgData.items():
            if not msgInfo:
                continue
            serverGroupID = msgInfo[0]
            if curServerGroupID != serverGroupID:
                continue
            tagPlayer = GameWorld.GetPlayerManager().FindPlayerByID(tagPlayerID)
            if not tagPlayer:
                continue
            msgInfo = str([msgType, msgInfo[1:]])
            tagPlayer.MapServer_QueryPlayerResult(0, 0, "ClientServerReceiveMsg", msgInfo, len(msgInfo))
        return
    if not isinstance(msgData, dict):
        return
    tagPlayerID = msgData.get("PlayerID")