1111 【bt】优化充值兑换商品流程(直接通过db轮询处理在线玩家未兑换的充值订单)
2个文件已添加
81 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_GetCoinReqs.py 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GetCoinReqs.py 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_GetCoinReqs.py
New file
@@ -0,0 +1,37 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.GMT_GetCoinReqs
#
# @todo:批量请求点券
# @author hxp
# @date 2025-02-11
# @version 1.0
#
# 详细描述: 批量请求点券
#
#---------------------------------------------------------------------
#"""Version = 2025-02-11 04:30"""
#---------------------------------------------------------------------
import GameWorld
def OnExec(orderId, gmCmdDict):
    accIDList = eval(gmCmdDict.get("AccIDList", '[]'))
    GameWorld.DebugLog("GMT_GetCoinReqs count=%s, %s" % (len(accIDList), accIDList))
    playerManager = GameWorld.GetPlayerManager()
    for accID in accIDList:
        tagPlayer = playerManager.FindPlayerByAccID(str(accID))
        if not tagPlayer:
            continue
        tagMapID = GameWorld.GetQueryPlayerMapID(tagPlayer)
        if not tagMapID:
            continue
        cmdStr = ""
        playerManager.MapServer_QueryPlayer(0, 0, tagPlayer.GetPlayerID(), tagMapID, "GetCoinReqs",
                                            cmdStr, len(cmdStr), tagPlayer.GetRouteServerIndex())
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GetCoinReqs.py
New file
@@ -0,0 +1,44 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Player.RemoteQuery.GY_Query_GetCoinReqs
#
# @todo:请求点券
# @author hxp
# @date 2025-02-11
# @version 1.0
#
# 详细描述: 请求点券
#
#-------------------------------------------------------------------------------
#"""Version = 2025-02-11 04: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()
    GameWorld.DebugLog("GY_Query_GetCoinReqs %s" % query_ID, curPlayer.GetPlayerID())
    return ''