#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#---------------------------------------------------------------------
|
#
|
#---------------------------------------------------------------------
|
##@package GY_Query_PlayerMirror
|
|
import GameWorld
|
import PlayerEventCounter
|
import ChPlayer
|
import GameServerRefresh
|
#---------------------------------------------------------------------
|
|
# @param query_Type ÇëÇóÀàÐÍ
|
# @param query_ID ÇëÇóµÄÍæ¼ÒID
|
# @param packCMDList ·¢°üÃüÁî
|
# @param tick µ±Ç°Ê±¼ä
|
# @return "True" or "False" or ""
|
def DoLogic(query_Type, query_ID, packCMDList, tick):
|
curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(query_ID)
|
|
if not curPlayer or curPlayer.IsEmpty():
|
return ''
|
playerData = packCMDList['playerData']
|
# playerDataΪbase64ºóµÄÊý¾Ý
|
mirrorPlayer = GameWorld.GetGameWorld().CreateMirrorPlayer(playerData, curPlayer.GetPosX(), curPlayer.GetPosY())
|
|
|
#CreateMirrorPlayer Öлáµ÷Óõ½ ChPlayer.PlayerLogin
|
#ÊÇ·ñ¾µÏñÍæ¼Ò ÅÐ¶Ï mirrorPlayer.GetRealPlayerID()ÊÇ·ñΪ0
|
#python×Ô¼º´¦Àí£¬ÒÔÏÂÂß¼£¬¿ÉÒÔÔÚDoPlayerLoginº¯Êý×îºó ÅжÏÊǾµÏñÍæ¼Òºóͳһ´¦Àí
|
|
index = mirrorPlayer.GetIndex()
|
tick = GameWorld.GetGameWorld().GetTick()
|
PlayerEventCounter.GameServer_InitOK(index, tick)
|
ChPlayer.LoadMapOK(index, tick)
|
GameServerRefresh.GameSever_PlayerInitOK(index, tick)
|
return ''
|
|
|
|
|