#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
##@package Player.RemoteQuery.GY_Query_CrossRealmReg
|
#
|
# @todo:¿ç·þ»î¶¯Íæ¼Ò×¢²á
|
# @author hxp
|
# @date 2018-12-21
|
# @version 1.0
|
#
|
# ÏêϸÃèÊö: ¿ç·þ»î¶¯Íæ¼Ò×¢²á
|
#
|
#-------------------------------------------------------------------------------
|
#"""Version = 2018-12-21 18:00"""
|
#-------------------------------------------------------------------------------
|
|
import GameWorld
|
import CrossRealmPlayer
|
import IPY_GameWorld
|
import ChPlayer
|
|
|
#------------------------------------------------------------------------------
|
## ¿ç·þÈü±¨Ãûµ÷ÓýӿÚ
|
# @param query_Type ÇëÇóÀàÐÍ
|
# @param query_ID ÇëÇóµÄÍæ¼ÒID
|
# @param packCMDList ·¢°üÃüÁî
|
# @param tick µ±Ç°Ê±¼ä
|
# @return "True" or "False" or ""
|
# @remarks º¯ÊýÏêϸ˵Ã÷.
|
def DoLogic(query_Type, query_ID, packCMDList, tick):
|
return
|
|
|
#------------------------------------------------------------------------------
|
## Ö´Ðнá¹û
|
# @param curPlayer ·¢³öÇëÇóµÄÍæ¼Ò
|
# @param callFunName ¹¦ÄÜÃû³Æ
|
# @param funResult ²éѯµÄ½á¹û
|
# @param tick µ±Ç°Ê±¼ä
|
# @return None
|
# @remarks º¯ÊýÏêϸ˵Ã÷.
|
def DoResult(curPlayer, callFunName, funResult, tick):
|
resultInfo = eval(funResult)
|
actionType = resultInfo[0]
|
mapPosInfo = resultInfo[1:]
|
if not curPlayer:
|
return
|
|
playerID = curPlayer.GetPlayerID()
|
GameWorld.Log("GY_Query_CrossRealmReg DoResult %s" % funResult, playerID)
|
|
if GameWorld.IsMergeServer():
|
GameWorld.Log(" ¿ç·þ·þÎñÆ÷²»ÔÊÐíÉÏ´«±¨ÃûÊý¾Ý!", playerID)
|
return
|
|
if not mapPosInfo:
|
return
|
|
#¿ç·þǰ¸üÐÂ×Ô¼ºËùÊô·þÎñÆ÷×éID
|
ChPlayer.UpdatePlayerServerGroupID(curPlayer)
|
|
mapID, dataMapID, copyMapID, posX, posY = mapPosInfo
|
#curPlayer.SendMergeRegisterPlayer(mapID, dataMapID, copyMapID, posX, posY)
|
curPlayer.SendMergeRegisterPlayerAfterChange(CrossRealmPlayer.GetCrossPlayerName(curPlayer), mapID, dataMapID, copyMapID, posX, posY)
|
GameWorld.Log(" ·¢ËÍ¿ç·þÍæ¼ÒÊý¾Ý×¢²á: actionType=%s,mapID=%s,dataMapID=%s,copyMapID=%s,posX=%s,posY=%s,GetVsRoomId=%s"
|
% (actionType, mapID, dataMapID, copyMapID, posX, posY, curPlayer.GetVsRoomId()), playerID)
|
return
|
|
## ¿ç·þÈü±¨Ãû½á¹û£¨ÉÏ´«Êý¾Ý£©
|
# @param index Íæ¼ÒË÷Òý
|
# @param tick µ±Ç°Ê±¼ä
|
# @return None
|
def GameServer_MergeRegisterResult(index, tick):
|
registerResult = IPY_GameWorld.IPY_GMMergeRegisterPlayerResult()
|
curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
playerID = curPlayer.GetPlayerID()
|
result = registerResult.GetResult()
|
if not result:
|
errorMsg = registerResult.GetErrorMsg()
|
GameWorld.Log("CrossRealmReg result Error:%s" % errorMsg, playerID)
|
return
|
|
#newAccount = registerResult.GetAccount()
|
#newName = registerResult.GetPwd()
|
|
msgList = str([])
|
GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(curPlayer.GetID(), 0, 0, "CrossRealmReg", msgList, len(msgList))
|
GameWorld.Log("GameServer_MergeRegisterResult msgList=%s" % msgList, playerID)
|
return
|
|
|
|