#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
  
 | 
##@package GY_Query_MoveToPlayerByID  
 | 
# ´«Ë͵½Íæ¼ÒÉí±ß  
 | 
#  
 | 
# @author mark  
 | 
# @date 2010-3-31  
 | 
# @version 1.1  
 | 
#  
 | 
# ÐÞ¸Äʱ¼ä ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ  
 | 
# @change: "2014-01-07 15:30" hxp ÏµÍ³markÐÞ¸Ä  
 | 
#  
 | 
# VER = "2014-01-07 15:30" zhengyang Ìí¼Ó×¢ÊÍ  
 | 
#  
 | 
# Ä£¿éÏêϸ˵Ã÷  
 | 
#---------------------------------------------------------------------  
 | 
#µ¼Èë  
 | 
import GameWorld  
 | 
import IPY_GameWorld  
 | 
import PlayerControl  
 | 
import EventShell  
 | 
#---------------------------------------------------------------------  
 | 
#È«¾Ö±äÁ¿  
 | 
#---------------------------------------------------------------------  
 | 
  
 | 
#---------------------------------------------------------------------  
 | 
#Â߼ʵÏÖ  
 | 
## ÇëÇóÂß¼  
 | 
#  @param query_Type ÇëÇóÀàÐÍ  
 | 
#  @param query_ID ÇëÇóµÄÍæ¼ÒID  
 | 
#  @param packCMDList ·¢°üÃüÁî [ ]  
 | 
#  @param tick µ±Ç°Ê±¼ä  
 | 
#  @return [mapID,posX,posY,lineID]  
 | 
#  @remarks º¯ÊýÏêϸ˵Ã÷.  
 | 
def DoLogic(query_Type , query_ID , packCMDList , tick):  
 | 
    curFindPlayer = GameWorld.GetPlayerManager().FindPlayerByID(query_ID)  
 | 
      
 | 
    if not curFindPlayer or curFindPlayer.IsEmpty():  
 | 
        return ''  
 | 
      
 | 
    mapManager = GameWorld.GetMap()  
 | 
      
 | 
    if mapManager.GetMapFBType() != IPY_GameWorld.fbtNull:  
 | 
        return 'InFB'  
 | 
      
 | 
    return ['%d'%mapManager.GetMapID() , '%d'%curFindPlayer.GetPosX() , '%d'%curFindPlayer.GetPosY() , '%d'%GameWorld.GetGameWorld().GetLineID()]  
 | 
#---------------------------------------------------------------------  
 | 
#Ö´Ðнá¹û  
 | 
## Ö´Ðнá¹û  
 | 
#  @param curPlayer ·¢³öÇëÇóµÄÍæ¼Ò  
 | 
#  @param callFunName ¹¦ÄÜÃû³Æ  
 | 
#  @param funResult [mapID,posX,posY,lineID]  
 | 
#  @param tick µ±Ç°Ê±¼ä  
 | 
#  @return None  
 | 
#  @remarks º¯ÊýÏêϸ˵Ã÷.  
 | 
def DoResult(curPlayer , callFunName , funResult , tick):  
 | 
    if funResult == '':  
 | 
        #GeRen_chenxin_112395 ¶Ô²»Æð£¬Ä¿±êÍæ¼Ò²»ÔÚÏߣ¬GMÖ¸Áî²Ù×÷ʧ°Ü  
 | 
        PlayerControl.NotifyCode(curPlayer,"GeRen_chenxin_112395")  
 | 
        return  
 | 
      
 | 
    if funResult == 'InFB':  
 | 
        #GM_Operate_Null02 ¶Ô²»Æð£¬Ä¿±êÍæ¼ÒÔÚ¸±±¾µ±ÖУ¬GMÖ¸Áî²Ù×÷ʧ°Ü  
 | 
        PlayerControl.NotifyCode(curPlayer,"GM_Operate_Null02")  
 | 
        return  
 | 
      
 | 
    #»¹Ô¸ñʽ '[]' -> []  
 | 
    funResult = eval(funResult)  
 | 
    mapID = int(funResult[0])  
 | 
    posX = int(funResult[1])  
 | 
    posY = int(funResult[2])  
 | 
    lineID = int(funResult[3])  
 | 
      
 | 
    __DoLogic_ResetWorldPos(curPlayer)  
 | 
      
 | 
    PlayerControl.PlayerResetWorldPosFB( curPlayer, mapID, posX, posY, False, lineID )  
 | 
      
 | 
    #GeRen_chenxin_673416 GMÖ¸ÁîÒÑÉúЧ£¬²Ù×÷³É¹¦  
 | 
    PlayerControl.NotifyCode(curPlayer,"GeRen_chenxin_673416")  
 | 
    return  
 | 
#---------------------------------------------------------------------  
 | 
## ÖØÖÃÍæ¼Ò×ø±ê£¬½â³ýʼþ״̬  
 | 
#  @param curPlayer µ±Ç°Íæ¼Ò  
 | 
#  @return None  
 | 
#  @remarks º¯ÊýÏêϸ˵Ã÷.  
 | 
def __DoLogic_ResetWorldPos(curPlayer):  
 | 
    playerAction = curPlayer.GetPlayerAction()  
 | 
    #ʼþ״̬,½áÊøÊ¼þ  
 | 
    if playerAction == IPY_GameWorld.paEvent:  
 | 
        EventShell.DoExitEvent(curPlayer)  
 | 
          
 | 
    return  
 | 
  
 |