hxp
2025-06-12 edc3910a9d090e5df4deb2dbc37709a740375938
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/python
# -*- coding: GBK -*-
 
##@package GY_GM_MoveToPlayerByID
# Òƶ¯µ½Íæ¼Ò×ø±ê Èç¹ûÍæ¼ÒÔÚ¸±±¾ÖУ¬²»Òƶ¯
# ¿Í»§¶Ë·¢·â°ü [Íæ¼ÒID]
# MapServer·¢·â°ü [] 
#
# @author Mark
# @date 2010-4-22
# @version 1.1
#
# @change: "2012-05-16 15:00" jiang C++Ð޸ĽӿÚGameServer_QueryPlayerByIDºÍGameServer_QueryPlayerResult
#
#------------------------------------------------------------------------------ 
"""Version = 2012-05-16 15:00"""
#------------------------------------------------------------------------------ 
#
# Ä£¿éÏêϸ˵Ã÷
#µ¼Èë
import IPY_GameWorld
import ChConfig
#---------------------------------------------------------------------
#È«¾Ö±äÁ¿
#---------------------------------------------------------------------
 
#---------------------------------------------------------------------
#Âß¼­ÊµÏÖ
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param playerList ²ÎÊýÁбí [Íæ¼ÒID]
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer,playerList):
    if len(playerList) != 1:
        return 
    
    if not __CanMoveToPlayer(curPlayer):
        return
    
    curFindPlayerID = playerList[0]
    
    sendMsg = '%s'%[]
    
    #Ìí¼ÓµØÍ¼·þÎñÆ÷ÇëÇó,ʵÏÖÂß¼­ÔÚPlayerQuery.py -> GameServer_QueryPlayer
    curPlayer.GameServer_QueryPlayerByID(ChConfig.queryType_sqtPlayer, curFindPlayerID, 
                    'MoveToPlayerByID', sendMsg, len(sendMsg))
    return
 
 
## ÊÇ·ñÒÆ¶¯
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @return None or True
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def __CanMoveToPlayer(curPlayer):
#===============================================================================
#GetInitOK        True
#GetIsLoginOff        False
#===============================================================================
    if not curPlayer.GetInitOK():
        return
    
    if curPlayer.GetIsLoginOff():
        return
    
    return True