| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #---------------------------------------------------------------------  | 
| #  | 
| #---------------------------------------------------------------------  | 
| ##@package GY_Query_GetPlayerInfo  | 
| # @todo: GM²éÑ¯Íæ¼ÒÎïÆ· ÐÅÏ¢  | 
| #  | 
| # @author: wdb  | 
| # @date 2012-06-06 12:00  | 
| # @version 1.3  | 
| # @note  | 
| # @change: "2012-06-14 18:00" wdb gm¹¤¾ßµ÷Õû£¬Ôö¼ÓÃüÁîid  | 
| # @change: "2015-01-30 02:00" hxp Ôö¼ÓתÉú´ÎÊý¡¢×ªÉúµÈ¼¶¡¢°ó×êÐÅÏ¢  | 
| # @change: "2015-05-22 14:30" hxp Ôö¼Ó´óʦµÈ¼¶¡¢Õ½¶·Á¦  | 
| #---------------------------------------------------------------------  | 
| """Version = 2015-05-22 14:30"""  | 
| #---------------------------------------------------------------------  | 
| import GameWorld  | 
| import IPY_GameWorld  | 
| import PlayerControl  | 
| import ShareDefine  | 
| #---------------------------------------------------------------------  | 
|   | 
| ## ÇëÇóÂß¼  | 
| #  @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 ''  | 
|       | 
|     playerInfo = {  | 
|                   'AccID':curPlayer.GetAccID(),   # Õ˺Š | 
|                   'AccState':curPlayer.GetAccState(),  # Õ˺Å״̬  | 
|                   'PlayerID':curPlayer.GetPlayerID(),    | 
|                   'Name':curPlayer.GetPlayerName(),  # Íæ¼ÒÃû  | 
|                   'GMLV':curPlayer.GetGMLevel(),  #gmµÈ¼¶  | 
|                     | 
|                   'Job':curPlayer.GetJob(),  # Ö°Òµ  | 
|                   'LV':curPlayer.GetLV(),  #Íæ¼ÒµÈ¼¶  | 
|                   'OfficialRank':curPlayer.GetOfficialRank(),  #¾³½ç  | 
|                   'FightPower':PlayerControl.GetFightPower(curPlayer),  #Õ½¶·Á¦  | 
|                   'VIPLV':curPlayer.GetVIPLv(),  # vipµÈ¼¶  | 
|                     | 
|                   'MapID':curPlayer.GetMapID(),  #µ±Ç°µØÍ¼id  | 
|                   'Gold':PlayerControl.GetMoneyReal(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money),   # Ôª±¦  | 
|                   'GoldPaper':PlayerControl.GetMoneyReal(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper),   # °ó×ê  | 
|                   'Silver':PlayerControl.GetSilver(curPlayer),  # ÒøÁ½  | 
|                   'SilverPaper':PlayerControl.GetMoneyReal(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Paper),   # ÉñÓñ  | 
|                     | 
|                   'FamilyName':curPlayer.GetFamilyName(),  # ¼Ò×åÃû³Æ  | 
|                     | 
|                   'LogoffTime':curPlayer.GetLogoffTime(), #ÀëÏßʱ¼ä  | 
|                   'LoginTime':curPlayer.GetLoginTime(),  # ÉÏÏßʱ¼ä  | 
|                   'LoginIP':curPlayer.GetIP(),  #µÇÈëIP  | 
|                   'ClientVersion':curPlayer.GetAccountData().GetClientVersion(),  #¿Í»§¶Ë°æ±¾ºÅ  | 
|                     | 
|                   'Online':1,  | 
|                   }  | 
|       | 
|     # ÐèÒª¶îÍâͬ²½µÄ×Ô¶¨Òå»õ±Ò  | 
|     CurrencyValueDict = {}  | 
|     for moneyType in [ShareDefine.TYPE_Price_PayCoin]:  | 
|         CurrencyValueDict['PlayerCurrency_%s' % moneyType] = PlayerControl.GetMoneyReal(curPlayer, moneyType)  | 
|     playerInfo.update(CurrencyValueDict)  | 
|       | 
|     resultMsg = str([packCMDList[0], playerInfo, 'GMT_GetPlayerInfo'])  | 
|     GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'GMToolResult',   | 
|                                                               resultMsg, len(resultMsg))  | 
|     return ''  | 
|       | 
|       | 
|       | 
|       | 
|      |