From d477930132af65b154dd344855b5dadd97afcd07 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 11 二月 2025 04:36:54 +0800
Subject: [PATCH] 1111 【bt】优化充值兑换商品流程(直接通过db轮询处理在线玩家未兑换的充值订单)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GetCoinReqs.py |   44 ++++++++++++++++++++++
 ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_GetCoinReqs.py                                  |   37 ++++++++++++++++++
 2 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_GetCoinReqs.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_GetCoinReqs.py
new file mode 100644
index 0000000..8e1cd92
--- /dev/null
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_GetCoinReqs.py
@@ -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
+
+
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GetCoinReqs.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GetCoinReqs.py
new file mode 100644
index 0000000..a6875b9
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GetCoinReqs.py
@@ -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 ''
+    
+    
+    
+    
+    
\ No newline at end of file

--
Gitblit v1.8.0