| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
|   | 
| ##@package GY_Query_PullPlayerByID  | 
| # °ÑÍæ¼Ò´«Ë͵½GMÉí±ß  | 
| #  | 
| # @author mark  | 
| # @date 2010-3-31  | 
| # @version 1.1  | 
| #  | 
| # ÐÞ¸Äʱ¼ä ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ  | 
| # @change: "2014-01-07 15:30" hxp ÏµÍ³markÐÞ¸Ä  | 
| #  | 
| # VER = "2014-01-07 15:30" zhengyang Ìí¼Ó×¢ÊÍ  | 
| #  | 
| # Ä£¿éÏêϸ˵Ã÷  | 
| #  | 
| #packCMDList [µØÍ¼ID ,×ø±êX, ×ø±êY, Ïß·]  | 
| #---------------------------------------------------------------------  | 
| #µ¼Èë  | 
| import PlayerControl  | 
| import EventShell  | 
| import GameWorld  | 
| import IPY_GameWorld  | 
| #---------------------------------------------------------------------  | 
| #È«¾Ö±äÁ¿  | 
| #---------------------------------------------------------------------  | 
|   | 
| #---------------------------------------------------------------------  | 
| #Â߼ʵÏÖ  | 
| ## ÇëÇóÂß¼  | 
| #  @param query_Type ÇëÇóÀàÐÍ  | 
| #  @param query_ID ÇëÇóµÄÍæ¼ÒID  | 
| #  @param packCMDList ·¢°üÃüÁî [µØÍ¼ID ,×ø±êX, ×ø±êY, Ïß·]  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return resultDisc  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoLogic(query_Type , query_ID , packCMDList , tick):  | 
|     curFindPlayer = GameWorld.GetPlayerManager().FindPlayerByID(query_ID)  | 
|       | 
|     if not curFindPlayer or curFindPlayer.IsEmpty():  | 
|         return ''  | 
|       | 
|     if not __CanPullPlayer(curFindPlayer):  | 
|         return 'ReadMap'  | 
|       | 
|     mapID = packCMDList[0]  | 
|     posX = packCMDList[1]  | 
|     posY = packCMDList[2]  | 
|     lineID = packCMDList[3]  | 
|     #Ö´ÐÐÇл»µØÍ¼Âß¼  | 
|     __DoLogic_ResetWorldPos(curFindPlayer)  | 
|       | 
|     PlayerControl.PlayerResetWorldPosFB( curFindPlayer, mapID, posX, posY, False, lineID )  | 
|       | 
|     return  | 
| #---------------------------------------------------------------------  | 
| ## ÖØÖÃλÖÃʱ£¬Òª½â³ýʼþ״̬  | 
| #  @param curFindPlayer µ±Ç°Íæ¼Ò  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def __DoLogic_ResetWorldPos(curFindPlayer):  | 
|     playerAction = curFindPlayer.GetPlayerAction()  | 
|     #ʼþ״̬,½áÊøÊ¼þ  | 
|     if playerAction == IPY_GameWorld.paEvent:  | 
|         EventShell.DoExitEvent(curFindPlayer)  | 
|           | 
|     return  | 
|   | 
| #---------------------------------------------------------------------  | 
| ## ÊÇ·ñ¿ÉÒÔÀ  | 
| #  @param curFindPlayer µ±Ç°Íæ¼Ò  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def __CanPullPlayer(curFindPlayer):  | 
| #===============================================================================  | 
| #GetInitOK        True  | 
| #GetIsLoginOff        False  | 
| #===============================================================================  | 
|     if not curFindPlayer.GetInitOK():  | 
|         return  | 
|       | 
|     if curFindPlayer.GetIsLoginOff():  | 
|         return  | 
|       | 
|     return True  | 
| #---------------------------------------------------------------------  | 
| #Ö´Ðнá¹û  | 
| ## Ö´Ðнá¹û  | 
| #  @param curPlayer ·¢³öÇëÇóµÄÍæ¼Ò  | 
| #  @param callFunName ¹¦ÄÜÃû³Æ  | 
| #  @param funResult ²éѯµÄ½á¹û  | 
| #  @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 == 'ReadMap':  | 
|         #GM_Operate_GoalPlayerReadMap  ¶Ô²»Æð£¬Ä¿±êÍæ¼ÒÕý´¦ÓÚµØÍ¼¶Áȡ״̬Ï£¬GMÖ¸Áî²Ù×÷ʧ°Ü  | 
|         PlayerControl.NotifyCode(curPlayer,"GM_Operate_GoalPlayerReadMap")  | 
|         return  | 
|       | 
|     #GeRen_chenxin_673416 GMÖ¸ÁîÒÑÉúЧ£¬²Ù×÷³É¹¦  | 
|     PlayerControl.NotifyCode(curPlayer,"GeRen_chenxin_673416")  | 
|       | 
|     return  |