From 406c1a6775ef7dde34ba379843322bd2d5ca23d2 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 02 十二月 2025 16:29:24 +0800
Subject: [PATCH] 320 【付费内容】商城-服务端(xssg充值回调接口;游戏服务器兑换充值商品逻辑修改;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py |   30 +++++++++++++++++++++---------
 1 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
index b44dfb8..ddfddca 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -238,11 +238,11 @@
 #    tagHead        Head;
 #};
 def OnQueryRecharge(index, packData, tick):
-    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-    if tick - curPlayer.GetDictByKey("QRtick") < 10000:
-        return
-    curPlayer.SetDict("QRtick", tick)
-    curPlayer.SendDBQueryRecharge()
+    #curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+    #if tick - curPlayer.GetDictByKey("QRtick") < 10000:
+    #    return
+    #curPlayer.SetDict("QRtick", tick)
+    #curPlayer.SendDBQueryRecharge() 不查了,由在线轮询触发即可
     return
 
 #// A1 23 查询充值次数 #tagCMQueryCoinToGoldCount
@@ -409,6 +409,15 @@
     cPlayerCoin.isAddBourseMoney = isAddBourseMoney
     return PlayerCoinToGold(curPlayer, cPlayerCoin, eventName)
 
+def OnDBPushRecharge(curPlayer, orderID, orderInfo, orderAmount):
+    cPlayerCoin = CPY_PlayerCoinToGold()
+    cPlayerCoin.useCoin = orderAmount
+    cPlayerCoin.orderID = orderID
+    cPlayerCoin.orderInfo = orderInfo
+    cPlayerCoin.isAddBourseMoney = True
+    GameWorld.Log("OnDBPushRecharge: useCoin=%s,orderInfo=%s,orderID=%s" % (cPlayerCoin.useCoin, cPlayerCoin.orderInfo, cPlayerCoin.orderID), curPlayer.GetPlayerID())
+    return PlayerCoinToGold(curPlayer, cPlayerCoin, ChConfig.Def_GiveMoney_CoinToGold)
+
 ##特别说明:充值赠送点券都要计算到各个活动中
 ##玩家点卷兑换元宝.
 # @param curPlayer 玩家实例
@@ -422,12 +431,15 @@
     orderInfo = chargeInfo.GetOrderInfo() # 商品编号
     orderID = chargeInfo.GetOrderID() #订单号,兑换成功后清除
     isAddBourseMoney = chargeInfo.GetIsAddBourseMoney()
-    if orderID:
-        curPlayer.SendDBFinishRecharge(orderID)
-        
+    #if orderID:
+    #    curPlayer.SendDBFinishRecharge(orderID)
+    
     appID = chargeInfo.GetAppID()
     if not appID:
         appID = GameWorld.GetPlayerPlatform(curPlayer)
+    if not appID:
+        appID = GameWorld.GetAppIDByAccID(curPlayer.GetAccID())
+        GameWorld.DebugLog("GetAppIDByAccID appID=%s" % appID)
     addDRDict = {"orderCoin":orderCoin, "orderInfo":orderInfo, "orderID":orderID, 
                  "isAddBourseMoney":isAddBourseMoney, "eventName":eventName, "appID":appID}
     
@@ -506,7 +518,7 @@
     recordID = ctgIpyData.GetRecordID() if ctgIpyData else 0
     Sync_CoinToGoldReport(curPlayer, orderID, orderCoin, recordID, orderInfo)
     
-    curPlayer.SendDBQueryRecharge()
+    #curPlayer.SendDBQueryRecharge() 不查了,由在线轮询触发即可
     return True
 
 def __GetCTGInfoByID(curPlayer, recordID, addDRDict):

--
Gitblit v1.8.0