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
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Script.Player.GMTExec.BattlefieldBuyOpen
#
# @todo:ÐÞ¸ÄÕÙ¼¯°ñÊý¾Ý
# @author hxp
# @date 2023-02-27
# @version 1.0
#
# ÏêϸÃèÊö: ÐÞ¸ÄÕÙ¼¯°ñÊý¾Ý
#
#-------------------------------------------------------------------------------
#"""Version = 2023-02-27 15:30"""
#-------------------------------------------------------------------------------
 
 
def runMyTest(exec_locals):
    ''' ÔËÐÐÃüÁÊý
    @param exec_locals: GY_Query_GMTExecfile Ä£¿éÖеĠDoLogic º¯Êý locals()
    
    import ÆäËûÄ£¿éÐèҪдÔڴ˺¯ÊýÀ²»È»ÎÞ·¨ÒýÓõ½
    '''
    import PlayerControl
    import PlayerBillboard
    import ShareDefine
    import GameWorld
    import ChConfig
    
    orderId = exec_locals["orderId"]
    cmdInfo = exec_locals["cmdInfo"]
    curPlayer = exec_locals["curPlayer"]
    resultDict = exec_locals["resultDict"] # ½¨Òé¶¼½øÐиüнá¹û×Öµä¼Ç¼Ïêϸ´¦ÀíÐÅÏ¢£¬GY_Query_GMTExecfile Ä£¿é»áͳһдÈëÁ÷Ïò
    
    ## ============== ÃüÁîÅäÖà================
    zoneID = 1 # ·ÖÇøID
    BuyOpenCountToday = 3 # ½ñÈÕÒѹºÂò´ÎÊý
    BuyOpenCountWeek = 3 # ±¾ÖÜÒѹºÂò´ÎÊý
    ## ========================================
    
    playerID = curPlayer.GetPlayerID()
    befBuyOpenCountToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_BuyOpenCountToday)
    befBuyOpenCountWeek = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_BuyOpenCountWeek)
    
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_BuyOpenCountToday, BuyOpenCountToday)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_BuyOpenCountWeek, BuyOpenCountWeek)
    
    aftBuyOpenCountToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_BuyOpenCountToday)
    aftBuyOpenCountWeek = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_BuyOpenCountWeek)
    
    groupValue1 = zoneID
    value1 = curPlayer.GetOfficialRank()
    cmpValue = BuyOpenCountWeek
    PlayerBillboard.UpdatePlayerCrossBillboard(curPlayer, ShareDefine.Def_CBT_BattlefieldWCall, groupValue1, cmpValue, value1=value1)
    
    GameWorld.Log("This is MameServer BattlefieldBuyOpen run %s. orderId=%s" % (cmdInfo, orderId), curPlayer.GetPlayerID())
    resultDict.update({"befBuyOpenCountToday":befBuyOpenCountToday, "aftBuyOpenCountToday":aftBuyOpenCountToday,
                       "befBuyOpenCountWeek":befBuyOpenCountWeek, "aftBuyOpenCountWeek":aftBuyOpenCountWeek,
                       "PlayerID":playerID})
    return
 
exec_locals = locals()
if exec_locals.get("cmdInfo"):
    runMyTest(exec_locals)