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
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------
#
##@package Player.RemoteQuery.GY_Query_GetCoinReq
#
# @todo:ÇëÇóµãȯ
# @author hxp
# @date 2015-5-27
# @version 1.1
#
# @change: "2016-08-22 16:30" hxp ·µ»ØÍæ¼ÒÃû¼°µÈ¼¶
#
# ÏêϸÃèÊö: ÇëÇóµãȯ
#
#---------------------------------------------------------------------
"""Version = 2016-08-22 16:30"""
#---------------------------------------------------------------------
 
import GameWorld
#---------------------------------------------------------------------
 
## ÇëÇóÂß¼­
#  @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 ''
    
    if not curPlayer.GetMapLoadOK():
        return ''
    
    #²éѯµ±Ç°Íæ¼ÒµãȯÊýÄ¿
    curPlayer.SendDBQueryRecharge()
    
    playerInfoDict = {
                      'Name':curPlayer.GetPlayerName(),  # Íæ¼ÒÃû
                      'LV':curPlayer.GetLV(),  #Íæ¼ÒµÈ¼¶
                      }
    GameWorld.DebugLog("GY_Query_GetCoinReq playerInfoDict=%s" % playerInfoDict)
    resultMsg = str([packCMDList[0], playerInfoDict, 'GMT_GetCoinReq'])
    GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'GMToolResult', 
                                                              resultMsg, len(resultMsg))
    return ''