#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
#---------------------------------------------------------------------  
 | 
#  
 | 
#---------------------------------------------------------------------  
 | 
##@package GY_Query_GetPlayerFuncInfo  
 | 
# @todo: Ìṩ²éÑ¯Íæ¼Ò¹¦ÄÜÐÅÏ¢  
 | 
#  
 | 
# @author: xdh  
 | 
# @date 2017-07-12 12:00  
 | 
# @version 1.0  
 | 
# @note  
 | 
#---------------------------------------------------------------------  
 | 
"""Version = 2017-07-12 12:00"""  
 | 
#---------------------------------------------------------------------  
 | 
import IPY_GameWorld  
 | 
import GameWorld  
 | 
import ChConfig  
 | 
import Operate_EquipPlus  
 | 
import ItemCommon  
 | 
  
 | 
#---------------------------------------------------------------------  
 | 
  
 | 
## ÇëÇóÂß¼  
 | 
#  @param query_Type ÇëÇóÀàÐÍ  
 | 
#  @param query_ID ÇëÇóµÄÍæ¼ÒID  
 | 
#  @param packCMDList ·¢°üÃüÁî [ ]  
 | 
#  @param tick µ±Ç°Ê±¼ä  
 | 
#  @return resultDisc  
 | 
#  @remarks º¯ÊýÏêϸ˵Ã÷.  
 | 
def DoLogic(query_Type, query_ID, packCMDList, tick):  
 | 
    curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(query_ID)  
 | 
      
 | 
    if not curPlayer or curPlayer.IsEmpty():  
 | 
        return ''  
 | 
    #GameWorld.Log('GY_Query_GetPlayerFuncInfo packCMDList=%s'%packCMDList)  
 | 
    queryKeyStr = packCMDList[1]  
 | 
      
 | 
    resultDict = {}  
 | 
    queryKeyList = queryKeyStr.split('|')  
 | 
    for queryKey in queryKeyList:  
 | 
        if queryKey == 'herolv': #½ÇÉ«µÈ¼¶  
 | 
            resultDict['herolv'] = curPlayer.GetLV()  
 | 
        if queryKey == 'viplv': #vipµÈ¼¶  
 | 
            resultDict['viplv'] = curPlayer.GetVIPLv()  
 | 
        #if queryKey == 'rechargeOnce': #Ò»´ÎÐÔ³äֵǮ  
 | 
        #    result = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_RechargeOnce_Coin)  
 | 
        #    resultDict['rechargeOnce'] = result  
 | 
#        elif queryKey == 'horselv': #×øÆï½×¼¶  
 | 
#            result = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Horser_ClassLV, 0, ChConfig.Def_PDictType_Horse)  
 | 
#            resultDict['horselv'] = result  
 | 
        #elif queryKey == 'petlv': #×î¸ßµÄ³èÎï½×¼¶  
 | 
        #    result = curPlayer.GetDictByKey(ChConfig.Def_PDict_BillboardPetClassLV)  
 | 
        #    resultDict['petlv'] = result  
 | 
        elif queryKey == 'officiallv': #¾ôλ½×¼¶  
 | 
            result = curPlayer.GetOfficialRank()  
 | 
            resultDict['officiallv'] = result  
 | 
        #=======================================================================  
 | 
        # elif queryKey == 'pluslv':  
 | 
        #    #È«Éí12²¿Î»Ç¿»¯µÈ¼¶×îµÍµÄÒ»¼þ  
 | 
        #    result = Operate_EquipPlus.GetMinPlusLV(curPlayer)  
 | 
        #    resultDict['pluslv'] = result  
 | 
        #=======================================================================  
 | 
        elif queryKey == 'orangeEquip':  
 | 
            equipPartIndexList = ChConfig.Pack_EquipPart_CanPlusStar.get(IPY_GameWorld.rptEquip, [])  
 | 
            equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)  
 | 
            result = -1 #È«Éí×îµÍ³Èɫװ±¸µÄ½×Êý  
 | 
            for equipIndex in range(0, equipPack.GetCount()):  
 | 
                #·Ç¿ÉÇ¿»¯²¿Î»²»´¦Àí  
 | 
                if equipIndex not in equipPartIndexList:  
 | 
                    continue  
 | 
                curEquip = equipPack.GetAt(equipIndex)  
 | 
                if curEquip.IsEmpty():  
 | 
                    result = 0  
 | 
                    break  
 | 
                if curEquip.GetItemColor() < ChConfig.Def_Quality_Orange:  
 | 
                    result = 0  
 | 
                    break  
 | 
                equipClassLV = ItemCommon.GetItemClassLV(curEquip)  
 | 
                if result == -1 or equipClassLV < result:  
 | 
                    result = equipClassLV  
 | 
            resultDict['orangeEquip'] = result  
 | 
              
 | 
      
 | 
    resultMsg = str([packCMDList[0], resultDict, 'GMT_GetPlayerFuncInfo'])  
 | 
    GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'GMToolResult',   
 | 
                                                              resultMsg, len(resultMsg))  
 | 
    return ''  
 | 
      
 | 
      
 | 
      
 | 
      
 | 
     
 |