From af2d900905b6858a9ab1a7592ccf1b1c894fff03 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 13 十二月 2023 18:29:17 +0800
Subject: [PATCH] 10037 quick海外包充值传美元价格
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 7 +++++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py | 21 +++++++++++++++++----
PySysDB/PySysDBPY.h | 1 +
3 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 3a625fa..41f5e01 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1519,6 +1519,7 @@
DWORD CTGID; //对应充值ID
DWORD GiftbagID; //对应限时礼包编号
DWORD CoinExp; //对应转化经验
+ float UsdMoney; //美元价格
};
//充值表
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 3bb46a8..3d38445 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1213,6 +1213,7 @@
("DWORD", "CTGID", 0),
("DWORD", "GiftbagID", 0),
("DWORD", "CoinExp", 0),
+ ("float", "UsdMoney", 0),
),
"CTG":(
@@ -4688,7 +4689,8 @@
self.PayRMBNum = 0.0
self.CTGID = 0
self.GiftbagID = 0
- self.CoinExp = 0
+ self.CoinExp = 0
+ self.UsdMoney = 0.0
return
def GetOrderInfo(self): return self.OrderInfo # 商品编号
@@ -4696,7 +4698,8 @@
def GetPayRMBNum(self): return self.PayRMBNum # 付费额度,元
def GetCTGID(self): return self.CTGID # 对应充值ID
def GetGiftbagID(self): return self.GiftbagID # 对应限时礼包编号
- def GetCoinExp(self): return self.CoinExp # 对应转化经验
+ def GetCoinExp(self): return self.CoinExp # 对应转化经验
+ def GetUsdMoney(self): return self.UsdMoney # 美元价格
# 充值表
class IPY_CTG():
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 5cba0ff..e54867e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -334,10 +334,23 @@
DataRecordPack.DR_CTGError(curPlayer, "Can not found the orderInfo.", addDRDict)
return
- payRMBNum = ipyData.GetPayRMBNum() # 单位,元
- if orderCoin != CommFunc.RMBToCoin(payRMBNum):
- DataRecordPack.DR_CTGError(curPlayer, "The orderCoin is not equal to the ipyData's RMB(%s)!" % payRMBNum, addDRDict)
- return
+ # quick海外用美元验证
+ if "@9997@" in curPlayer.GetAccID():
+ GameWorld.Log("quikc海外充值验证美元: orderInfo=%s,orderCoin=%s,orderID=%s" % (orderInfo, orderCoin, orderID), curPlayer.GetPlayerID())
+ orderCoinUsd = orderCoin # 入库的是美元分
+ orderCoin = CommFunc.RMBToCoin(ipyData.GetPayRMBNum()) # 游戏内orderCoin转化为人民币
+ usdMoney = ipyData.GetUsdMoney()
+ GameWorld.Log(" 转化后: orderInfo=%s,orderCoin=%s,orderCoinUsd=%s" % (orderInfo, orderCoin, orderCoinUsd), curPlayer.GetPlayerID())
+ addDRDict["orderCoin"] = orderCoin
+ addDRDict["orderCoinUsd"] = orderCoinUsd
+ if orderCoinUsd != CommFunc.RMBToCoin(usdMoney):
+ DataRecordPack.DR_CTGError(curPlayer, "The orderCoinUsd is not equal to the ipyData's UsdMoney(%s)!" % usdMoney, addDRDict)
+ return
+ else:
+ payRMBNum = ipyData.GetPayRMBNum() # 单位,元
+ if orderCoin != CommFunc.RMBToCoin(payRMBNum):
+ DataRecordPack.DR_CTGError(curPlayer, "The orderCoin is not equal to the ipyData's RMB(%s)!" % payRMBNum, addDRDict)
+ return
# 港台0.1折特殊处理:游戏内部逻辑按原版原价处理,所以验证完金额后需要乘100
orderCoin *= 100
--
Gitblit v1.8.0