#!/usr/bin/python
|
# -*- coding: GBK -*-
|
|
##@package GY_GM_Offline_FindPlayer
|
# ÍÑ»ú¹¤¾ß,²éÑ¯Íæ¼Ò
|
# ¿Í»§¶Ë·¢°ü [²ÎÊý1: (1:ÕË»§²éѯ 2:ID²éѯ 3:Ãû×Ö²éѯ) , ²ÎÊý2:Öµ]
|
#
|
# @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 GameWorld
|
import ChConfig
|
#---------------------------------------------------------------------
|
#È«¾Ö±äÁ¿
|
#---------------------------------------------------------------------
|
|
#---------------------------------------------------------------------
|
#Â߼ʵÏÖ
|
## GMÃüÁîÖ´ÐÐÈë¿Ú
|
# @param curPlayer µ±Ç°Íæ¼Ò
|
# @param playerList ²ÎÊýÁбí [²ÎÊý1: (1:ÕË»§²éѯ 2:ID²éѯ 3:Ãû×Ö²éѯ) , ²ÎÊý2:Öµ]
|
# @return None
|
# @remarks º¯ÊýÏêϸ˵Ã÷.
|
def OnExec(curPlayer , playerList):
|
if len(playerList) != 2:
|
return
|
|
#·â°üÖµ
|
packValue = playerList[0]
|
packKey = playerList[1]
|
sendMsg = '%s'%(packKey)
|
|
if packValue == 1:
|
#°´ÕË»§²éѯ
|
curPlayer.GameServer_QueryPlayerByID(ChConfig.queryType_sqtPlayerByAccID, 0, 'Offline_FindPlayer', sendMsg, len(sendMsg))
|
elif packValue == 2:
|
#ID²éѯ
|
curPlayer.GameServer_QueryPlayerByID(ChConfig.queryType_sqtPlayer , int(packKey), 'Offline_FindPlayer', '', 0)
|
elif packValue == 3:
|
#Ãû×Ö²éѯ
|
curPlayer.GameServer_QueryPlayerByID(ChConfig.queryType_sqtPlayerByName , 0, 'Offline_FindPlayer', sendMsg, len(sendMsg))
|
else:
|
GameWorld.Log('ÍÑ»ú¹¤¾ß,²éÑ¯Íæ¼ÒÒì³£ = %s , %s'%(packValue , packKey))
|
|
return
|