New file |
| | |
| | | #!/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)
|
| | | |