From 804befeedae0a6d09c493fbc310ad29cd481b534 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 07 二月 2025 11:58:33 +0800
Subject: [PATCH] 10352 【BT】免费买断版本(充代币的真实订单算真实充值)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py |   29 ++++++++++++++++++++++++++---
 1 files changed, 26 insertions(+), 3 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 938d482..0bd765b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -659,6 +659,21 @@
         giveItemList = gainItemList
     return giveItemList
 
+def __OnCTGReal(curPlayer, orderCoin):
+    ctgRealToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealToday) # 当日真实货币充值Coin数 ,不含后台充值- 今日
+    ctgRealTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealTotal) # 累计真实货币充值Coin数 ,不包后台充值 - 总计
+    ctgRealFirstTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealFirstTime) # 首次真实货币充值时间戳
+    
+    if not ctgRealFirstTime:
+        ctgRealFirstTime = int(time.time())
+        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealFirstTime, ctgRealFirstTime)
+    ctgRealToday = min(ctgRealToday + orderCoin, ChConfig.Def_UpperLimit_DWord)
+    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealToday, ctgRealToday)
+    ctgRealTotal = min(ctgRealTotal + orderCoin, ChConfig.Def_UpperLimit_DWord)
+    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealTotal, ctgRealTotal)
+    Sync_CoinToGoldCountInfo(curPlayer, [])
+    return
+
 def DoCTGLogic(curPlayer, coinType, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict, ctgIpyData=None, moneyType=IPY_GameWorld.TYPE_Price_Gold_Money, coinExp=0):
     
     if ctgIpyData and ctgIpyData.GetPayType() == PayType_PayCoin:
@@ -673,13 +688,21 @@
             drDict = {ChConfig.Def_Give_Reason_SonKey:orderInfo, "payOrderType":payOrderType, "orderInfo":orderInfo}
             PlayerControl.GiveMoney(curPlayer, moneyType, addGold, eventName, drDict)
         aftPayCoin = PlayerControl.GetPayCoin(curPlayer)
-        GameWorld.Log("充值代币: orderInfo=%s,orderCoin=%s,payOrderType=%s,eventName=%s,befPayCoin=%s,aftPayCoin=%s" 
-                      % (orderInfo, orderCoin, payOrderType, eventName, befPayCoin, aftPayCoin), playerID)
         
+        isRealMoney = True if addDRDict.get("orderID") else False # tqxbqy 真实订单充代币算真实充值
+        if isRealMoney:
+            __OnCTGReal(curPlayer, orderCoin)
+            
+        ctgRealToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealToday) # 当日真实货币充值Coin数 ,不含后台充值- 今日
+        ctgRealTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealTotal) # 累计真实货币充值Coin数 ,不包后台充值 - 总计
+        ctgRealFirstTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealFirstTime) # 首次真实货币充值时间戳
         serverDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
         addDRDict.update({"coinType":coinType, "PayCoin":[befPayCoin, aftPayCoin], 
-                          "VIPLv":curPlayer.GetVIPLv(), "ServerDay":serverDay, "eventName":eventName})
+                          "VIPLv":curPlayer.GetVIPLv(), "ServerDay":serverDay, "eventName":eventName, 
+                          "ctgRealToday":ctgRealToday, "ctgRealTotal":ctgRealTotal, "ctgRealFirstTime":GameWorld.ChangeTimeNumToStr(ctgRealFirstTime) if ctgRealFirstTime else ""})
         DataRecordPack.DR_CTGOK(curPlayer, addDRDict)
+        GameWorld.Log("充值代币: orderInfo=%s,orderCoin=%s,payOrderType=%s,eventName=%s,befPayCoin=%s,aftPayCoin=%s, %s" 
+                      % (orderInfo, orderCoin, payOrderType, eventName, befPayCoin, aftPayCoin, addDRDict), playerID)
         return True
     
     if coinType not in [ChConfig.CoinType_Gold, ChConfig.CoinType_Buy, ChConfig.CoinType_ItemSuper]:

--
Gitblit v1.8.0