From 20360c075dcb4cbedefe968cd88eff52675e193d Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 05 一月 2024 10:32:05 +0800 Subject: [PATCH] 10090 【后端】越南货币价格(coin与越南盾默认1:1;充值表增加货币类型字段;充值表配置代币充值;) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py | 2 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossActCTGBillboard.py | 2 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 7 + ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py | 98 ++++++++++++++++---------------- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py | 13 ++- PySysDB/PySysDBPY.h | 5 + ServerPython/CoreServerGroup/GameServer/Script/CommFunc.py | 9 +- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossActAllRecharge.py | 2 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActManyDayRecharge.py | 2 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 3 10 files changed, 77 insertions(+), 66 deletions(-) diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h index 41f5e01..b64e99a 100644 --- a/PySysDB/PySysDBPY.h +++ b/PySysDB/PySysDBPY.h @@ -1532,8 +1532,9 @@ BYTE DailyBuyCount; //每日限购次数 BYTE WeekBuyCount; //每周限购次数 BYTE MonthBuyCount; //每月限购次数 - WORD GainGold; //获得仙玉数 - WORD GainGoldPrize; //赠送仙玉数 + BYTE MoneyType; //获得货币类型 + WORD GainGold; //获得货币数 + WORD GainGoldPrize; //赠送货币数 WORD FirstGoldPrize; //首次充值该档位赠送仙玉 list GainItemList; //获得物品列表[[物品ID,个数,是否绑定], ...] dict ActWorldLVGainItemInfo; //根据活动世界等级获得物品信息,活动专用 {"世界等级":[[物品ID,个数,是否绑定], ...], ...} diff --git a/ServerPython/CoreServerGroup/GameServer/Script/CommFunc.py b/ServerPython/CoreServerGroup/GameServer/Script/CommFunc.py index 3e65f93..428a919 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/CommFunc.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/CommFunc.py @@ -560,10 +560,11 @@ return "" def RMBToCoin(floatRMB): - ''' 元转为分,统一函数,方便修改及搜索 + ''' 元转为coin,统一函数,方便修改及搜索 @param floatRMB: 单位元,float 类型,支持 RMB 或 美元 - @return: 转化为分数值 + @return: 转化为coin数值 ''' - # 由于float会有不精确的现象出现xxx.9999999的问题,所以这里计算出的结果向上取整 - return int(math.ceil(floatRMB * 100)) + # 由于float会有不精确的现象出现xxx.9999999或xxx.0000000000001的问题,所以这里计算出的结果向上取整 + rate = 1 # 越南版本配表及coin均使用越南盾原值,即比例为1:1 + return int(math.ceil(round(floatRMB * rate))) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py index 9fd08be..0a1c69e 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py @@ -6053,4 +6053,5 @@ CoinType_4, CoinType_5, CoinType_ExchangePayCoin, # 代表转换 6 -) = range(7) +CoinType_PayCoin, # 代币充值 7 +) = range(8) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py index ce9f7be..ac67dc6 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py @@ -593,17 +593,20 @@ return "" def CoinToYuan(orderCoin): - '''分转化为元 + '''coin转化为元 ''' - yuan = orderCoin / 100.0 + rate = 1 + yuan = orderCoin / float(rate) if str(yuan).endswith(".0"): return int(yuan) return yuan def RMBToCoin(floatRMB): - ''' 元转为分,统一函数,方便修改及搜索 + ''' 元转为coin,统一函数,方便修改及搜索 @param floatRMB: 单位元,float 类型,支持 RMB 或 美元 - @return: 转化为分数值 + @return: 转化为coin数值 ''' # 由于float会有不精确的现象出现xxx.9999999或xxx.0000000000001的问题,所以这里计算出的结果向上取整 - return int(math.ceil(round(floatRMB * 100))) + rate = 1 # 越南版本配表及coin均使用越南盾原值,即比例为1:1 + return int(math.ceil(round(floatRMB * rate))) + diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py index 3d38445..408f3fc 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py @@ -1223,6 +1223,7 @@ ("BYTE", "DailyBuyCount", 0), ("BYTE", "WeekBuyCount", 0), ("BYTE", "MonthBuyCount", 0), + ("BYTE", "MoneyType", 0), ("WORD", "GainGold", 0), ("WORD", "GainGoldPrize", 0), ("WORD", "FirstGoldPrize", 0), @@ -4711,6 +4712,7 @@ self.DailyBuyCount = 0 self.WeekBuyCount = 0 self.MonthBuyCount = 0 + self.MoneyType = 0 self.GainGold = 0 self.GainGoldPrize = 0 self.FirstGoldPrize = 0 @@ -4726,8 +4728,9 @@ def GetDailyBuyCount(self): return self.DailyBuyCount # 每日限购次数 def GetWeekBuyCount(self): return self.WeekBuyCount # 每周限购次数 def GetMonthBuyCount(self): return self.MonthBuyCount # 每月限购次数 - def GetGainGold(self): return self.GainGold # 获得仙玉数 - def GetGainGoldPrize(self): return self.GainGoldPrize # 赠送仙玉数 + def GetMoneyType(self): return self.MoneyType # 获得货币类型 + def GetGainGold(self): return self.GainGold # 获得货币数 + def GetGainGoldPrize(self): return self.GainGoldPrize # 赠送货币数 def GetFirstGoldPrize(self): return self.FirstGoldPrize # 首次充值该档位赠送仙玉 def GetGainItemList(self): return self.GainItemList # 获得物品列表[[物品ID,个数,是否绑定], ...] def GetActWorldLVGainItemInfo(self): return self.ActWorldLVGainItemInfo # 根据活动世界等级获得物品信息,活动专用 {"世界等级":[[物品ID,个数,是否绑定], ...], ...} diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossActAllRecharge.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossActAllRecharge.py index 4bbd84b..6d5c5f1 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossActAllRecharge.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossActAllRecharge.py @@ -139,7 +139,7 @@ GameWorld.DebugLog("跨服全民充值非活动中! playerServerID=%s" % GameWorld.GetPlayerServerID(curPlayer), curPlayer.GetPlayerID()) return - totalRMB = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CA_AllRechargeRMB) + addRMB + totalRMB = min(curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CA_AllRechargeRMB) + addRMB, ChConfig.Def_UpperLimit_DWord) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CA_AllRechargeRMB, totalRMB) GameWorld.DebugLog("跨服全民充值活动增加玩家累计充值RMB: addRMB=%s,totalRMB=%s" % (addRMB, totalRMB), curPlayer.GetPlayerID()) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossActCTGBillboard.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossActCTGBillboard.py index c7b121a..548de7f 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossActCTGBillboard.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossActCTGBillboard.py @@ -185,7 +185,7 @@ GameWorld.DebugLog("玩家区服ID跨服充值排行非活动中!playerServerID=%s" % GameWorld.GetPlayerServerID(curPlayer)) return - totalRMB = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CA_CTGBillboardRMB) + addRMB + totalRMB = min(curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CA_CTGBillboardRMB) + addRMB, ChConfig.Def_UpperLimit_DWord) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CA_CTGBillboardRMB, totalRMB) GameWorld.DebugLog("跨服充值排行活动增加玩家累计充值RMB: addRMB=%s,totalRMB=%s" % (addRMB, totalRMB), curPlayer.GetPlayerID()) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActManyDayRecharge.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActManyDayRecharge.py index 877d11a..631c610 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActManyDayRecharge.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActManyDayRecharge.py @@ -160,7 +160,7 @@ continue curRechargeValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ManyDayRechargeValue % (actNum, dayIndex)) - updRechargeValue = curRechargeValue + addValue + updRechargeValue = min(curRechargeValue + addValue, ChConfig.Def_UpperLimit_DWord) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ManyDayRechargeValue % (actNum, dayIndex), updRechargeValue) Sync_ManyDayRechargePlayerInfo(curPlayer, actNum) GameWorld.DebugLog("多日连充充值活动增加充值额度: actNum=%s,dayIndex=%s,curRechargeValue=%s,addValue=%s,updRechargeValue=%s" diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py index 208725e..e45af8d 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py @@ -180,7 +180,7 @@ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeTemplateID % actNum, templateID) curRechargeGold = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeGold % actNum) - updRechargeGold = curRechargeGold + addGold + updRechargeGold = min(curRechargeGold + addGold, ChConfig.Def_UpperLimit_DWord) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeGold % actNum, updRechargeGold) Sync_TotalRechargeInfo(curPlayer, actNum) GameWorld.DebugLog("玩家累计充值活动: actNum=%s,actID=%s,templateID=%s,curRechargeGold=%s,addGold=%s,updRechargeGold=%s" 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 bb42295..89c096e 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py @@ -80,10 +80,13 @@ PayOrderType_PayCoin, # 代币 6 ) = range(1, 1 + 6) +PayOrderType_Default = PayOrderType_VND + # 充值类型定义 PayType_Gold = 2 # 常规仙玉充值 PayType_GoldPlus = 3 # 至尊仙玉充值 PayType_GrowupBuy = 16 # 成长必买 +PayType_PayCoin = 17 # 代币充值 #--------------------------------------------------------------------- #注意: GetChangeCoinPointTotal 充值点和赠送点总和 @@ -266,12 +269,8 @@ ipyData = IpyGameDataPY.GetIpyGameData("OrderInfo", orderInfo, appID) if not ipyData: return - if "@9997@" in curPlayer.GetAccID(): - orderCoin = CommFunc.RMBToCoin(ipyData.GetUsdMoney()) - else: - orderCoin = CommFunc.RMBToCoin(ipyData.GetPayRMBNum()) cPlayerCoin = CPY_PlayerCoinToGold() - cPlayerCoin.useCoin = orderCoin + cPlayerCoin.useCoin = CommFunc.RMBToCoin(ipyData.GetPayRMBNum()) cPlayerCoin.orderInfo = orderInfo cPlayerCoin.appID = appID cPlayerCoin.orderID = "" @@ -285,7 +284,7 @@ ''' orderInfo = addDRDict.get("orderInfo", "") orderCoin = addDRDict.get("orderCoin", 0) - payOrderType = addDRDict.get("payOrderType", PayOrderType_RMB) + payOrderType = addDRDict.get("payOrderType", PayOrderType_Default) if not orderCoin or not orderInfo: DataRecordPack.DR_CTGError(curPlayer, errorInfo, addDRDict) return @@ -368,10 +367,7 @@ return cPlayerCoin = CPY_PlayerCoinToGold() - if "@9997@" in curPlayer.GetAccID(): - cPlayerCoin.useCoin = CommFunc.RMBToCoin(ipyData.GetUsdMoney()) - else: - cPlayerCoin.useCoin = CommFunc.RMBToCoin(ipyData.GetPayRMBNum()) + cPlayerCoin.useCoin = CommFunc.RMBToCoin(ipyData.GetPayRMBNum()) cPlayerCoin.orderInfo = orderInfo cPlayerCoin.appID = appID cPlayerCoin.isAddBourseMoney = isAddBourseMoney @@ -383,9 +379,9 @@ # @param useCoin 使用的点卷 # @param eventName 兑换事件名 # @return None -def PlayerCoinToGold(curPlayer, chargeInfo, eventName, payOrderType=PayOrderType_RMB): +def PlayerCoinToGold(curPlayer, chargeInfo, eventName, payOrderType=PayOrderType_Default): ## 按商品编号充值 - orderCoin = chargeInfo.GetCoin() # 金额 已乘以100 人民币单位为分 + orderCoin = chargeInfo.GetCoin() #notePrizeCoin = chargeInfo.GetPrizeCoin() orderInfo = chargeInfo.GetOrderInfo() # 商品编号 orderID = chargeInfo.GetOrderID() #订单号,兑换成功后清除 @@ -408,27 +404,10 @@ DataRecordPack.DR_CTGError(curPlayer, "Can not found the orderInfo.", 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 - addDRDict["orderCoin"] = orderCoin + payRMBNum = ipyData.GetPayRMBNum() # 越南版本配表及coin均使用越南盾原值 + if orderCoin != CommFunc.RMBToCoin(payRMBNum): + DataRecordPack.DR_CTGError(curPlayer, "The orderCoin is not equal to the ipyData's RMB(%s)!" % payRMBNum, addDRDict) + return if payOrderType == PayOrderType_PayCoin: #直接扣,类似充值扣钱,这里是发放物品,可能会有发放失败的当做 CTGError 处理 @@ -439,13 +418,13 @@ addDRDict["payOrderType"] = payOrderType - addGold, prizeGold, giveItemList, ctgIpyData = 0, 0, [], None + moneyType, addGold, prizeGold, giveItemList, ctgIpyData = 0, 0, 0, [], None if ipyData.GetCTGID(): ctgResultInfo = __GetCTGInfoByID(curPlayer, ipyData.GetCTGID(), addDRDict) if not ctgResultInfo: return - addGold, prizeGold, giveItemList, ctgIpyData = ctgResultInfo + moneyType, addGold, prizeGold, giveItemList, ctgIpyData = ctgResultInfo elif ipyData.GetGiftbagID(): giftbagID = ipyData.GetGiftbagID() @@ -461,7 +440,7 @@ coinExp = ipyData.GetCoinExp() coinType = ChConfig.CoinType_Gold if (ctgIpyData and ctgIpyData.GetPayType() in [PayType_Gold, PayType_GoldPlus]) else ChConfig.CoinType_Buy # 规定2为直充,其他为直购 - if not DoCTGLogic(curPlayer, coinType, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict, ctgIpyData, coinExp): + if not DoCTGLogic(curPlayer, coinType, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict, ctgIpyData, moneyType, coinExp): return #充值成功主动查询一次,无充值数量就不会继续查询 @@ -542,17 +521,19 @@ addDRDict.update({"monthBuyCountUpd":monthBuyCountUpd}) giveItemList = GetCTGGiveItemList(ipyData) - addGold = ipyData.GetGainGold() # 获得仙玉数 - gainGoldPrize = ipyData.GetGainGoldPrize() # 赠送仙玉数,首次充值赠送仙玉时,此仙玉不给 + moneyType = ipyData.GetMoneyType() # 获得货币类型 + addGold = ipyData.GetGainGold() # 获得货币数 + gainGoldPrize = ipyData.GetGainGoldPrize() # 赠送货币数,首次充值赠送仙玉时,此仙玉不给 firstGoldPrize = ipyData.GetFirstGoldPrize() # 首次充值赠送的仙玉 prizeGold = firstGoldPrize if (not totalBuyCount and firstGoldPrize) else gainGoldPrize - actPrizeGold = PlayerActRechargePrize.DoAddPlayerActRechargePrizeCount(curPlayer, recordID) - if actPrizeGold: - prizeGold += actPrizeGold - addDRDict.update({"actRechargePrize":1}) - + if moneyType == IPY_GameWorld.TYPE_Price_Gold_Money: + actPrizeGold = PlayerActRechargePrize.DoAddPlayerActRechargePrizeCount(curPlayer, recordID) + if actPrizeGold: + prizeGold += actPrizeGold + addDRDict.update({"actRechargePrize":1}) + Sync_CoinToGoldCountInfo(curPlayer, [recordID]) - return addGold, prizeGold, giveItemList, ipyData + return moneyType, addGold, prizeGold, giveItemList, ipyData def GetCTGGiveItemList(ipyData): ## 获取充值ID对应给物品列表 @@ -583,14 +564,35 @@ giveItemList = gainItemList return giveItemList -def DoCTGLogic(curPlayer, coinType, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict, ctgIpyData=None, coinExp=0): +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: + # 代币充值,仅给代币,不触发其他内容 + coinType = ChConfig.CoinType_PayCoin + orderInfo = addDRDict.get("orderInfo", "") + orderCoin = addDRDict.get("orderCoin", 0) + payOrderType = addDRDict.get("payOrderType", PayOrderType_Default) + playerID = curPlayer.GetPlayerID() + befPayCoin = PlayerControl.GetPayCoin(curPlayer) + if addGold and moneyType == ShareDefine.TYPE_Price_PayCoin: + drDict = {ChConfig.Def_Give_Reason_SonKey:orderInfo, "payOrderType":payOrderType} + 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) + + serverDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1 + addDRDict.update({"coinType":coinType, "PayCoin":[befPayCoin, aftPayCoin], + "VIPLv":curPlayer.GetVIPLv(), "ServerDay":serverDay, "eventName":eventName}) + DataRecordPack.DR_CTGOK(curPlayer, addDRDict) + return True if coinType not in [ChConfig.CoinType_Gold, ChConfig.CoinType_Buy, ChConfig.CoinType_ItemSuper]: DataRecordPack.DR_CTGError(curPlayer, "coinType error! coinType(%s)!" % coinType, addDRDict) return isRealMoney = True if addDRDict.get("orderID") else False # 是否真实货币充值,仅真实货币充值订单有orderID,后台充值的不算真实货币充值 - payOrderType = addDRDict.get("payOrderType", PayOrderType_RMB) + payOrderType = addDRDict.get("payOrderType", PayOrderType_Default) if payOrderType == PayOrderType_PayCoin: isRealMoney = True # 代币充值在游戏内容上算真实充值 ctgRealToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealToday) # 当日真实货币充值Coin数 ,不含后台充值- 今日 @@ -610,10 +612,10 @@ bourseMoneyBefore = PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney) if addGold: - PlayerControl.GiveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, addGold, eventName, addDRDict, isGiveBourseMoney=isAddBourseMoney) + PlayerControl.GiveMoney(curPlayer, moneyType, addGold, eventName, addDRDict, isGiveBourseMoney=isAddBourseMoney) if prizeGold: - PlayerControl.GiveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, prizeGold, eventName, addDRDict, isGiveBourseMoney=isAddBourseMoney) + PlayerControl.GiveMoney(curPlayer, moneyType, prizeGold, eventName, addDRDict, isGiveBourseMoney=isAddBourseMoney) if giveItemList: ItemControler.GivePlayerItemOrMail(curPlayer, giveItemList, "", event=[ChConfig.ItemGive_CTG, True, copy.deepcopy(addDRDict)]) -- Gitblit v1.8.0