From d39dea987b7d74e5f5e78366bbba28b1425b3475 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期六, 07 十月 2023 01:42:43 +0800 Subject: [PATCH] 9905 【BT0.1】【主干】新增每周、每月限购(累充支持线下活动) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py | 31 ++++++++++++++----------------- 1 files changed, 14 insertions(+), 17 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 0a98b93..e12c021 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py @@ -69,14 +69,6 @@ import time import copy - -# 充值点券处理类型 -( -CoinType_Gold, # 直接充仙玉 -CoinType_Buy, # 直购,非直接充仙玉的,如RMB直接购买某个物品或激活某个功能 -CoinType_Item, # 使用物品,类充值仙玉效果,但是有某些功能上的限制,一般是bt版本赠送 -) = range(3) - # 充值类型定义 PayType_Gold = 2 # 常规仙玉充值 PayType_GoldPlus = 3 # 至尊仙玉充值 @@ -282,11 +274,11 @@ coinExp = int(orderRMB * oneRMBCoinExp) addGold = coinExp # 此方式增加的仙玉 = 直充经验 addDRDict = {"orderCoin":orderCoin, "isAddBourseMoney":isAddBourseMoney, "eventName":eventName} - DoCTGLogic(curPlayer, CoinType_Gold, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict, coinExp=coinExp) + DoCTGLogic(curPlayer, ChConfig.CoinType_Gold, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict, coinExp=coinExp) return True def PlayerItemCTG(curPlayer, orderRMB, eventName, isAddBourseMoney, addDataDict={}): - ## 使用赠送的物品兑换点券,一般用于bt版 + ## 使用赠送的物品兑换点券,一般用于bt版,限超级现金 # 20210120 港台主干版暂废弃 # prizeGold = 0 # giveItemList = [] @@ -294,7 +286,7 @@ # addGold = orderRMB * GetCoinRate() # addDRDict = {"orderCoin":orderCoin, "eventName":eventName} # addDRDict.update(addDataDict) -# DoCTGLogic(curPlayer, CoinType_Item, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict) +# DoCTGLogic(curPlayer, ChConfig.CoinType_ItemSuper, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict) return def DoGMCTG(curPlayer, orderInfo, appID, isAddBourseMoney, eventName): @@ -367,8 +359,9 @@ return coinExp = ipyData.GetCoinExp() - coinType = CoinType_Gold if (ctgIpyData and ctgIpyData.GetPayType() in [PayType_Gold, PayType_GoldPlus]) else CoinType_Buy # 规定2为直充,其他为直购 - DoCTGLogic(curPlayer, coinType, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict, ctgIpyData, coinExp) + 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): + return #充值成功主动查询一次,无充值数量就不会继续查询 if orderID: @@ -488,6 +481,10 @@ def DoCTGLogic(curPlayer, coinType, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict, ctgIpyData=None, coinExp=0): + 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,后台充值的不算真实货币充值 ctgRealToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealToday) # 当日真实货币充值Coin数 ,不含后台充值- 今日 ctgRealTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealTotal) # 累计真实货币充值Coin数 ,不包后台充值 - 总计 @@ -538,7 +535,7 @@ # 功能统一以分存储记录,玩家字典不支持存小数 # 所有真实充值均有效的 - if coinType in [CoinType_Gold, CoinType_Buy]: + if coinType in [ChConfig.CoinType_Gold, ChConfig.CoinType_Buy]: #跨服充值排行活动 CrossActCTGBillboard.AddCTGRMB(curPlayer, orderCoin) #跨服全民充值 @@ -548,7 +545,7 @@ PlayerFamilyRedPacket.OnPlayerRecharge(curPlayer, orderCoin) # 只算充仙玉的 - if coinType == CoinType_Gold: + if coinType == ChConfig.CoinType_Gold: PlayerActRechargeRebateGold.AddRechargeRebateGoldRMB(curPlayer, addGold) #仙界盛典-充值大礼 @@ -556,7 +553,7 @@ PlayerNewFairyCeremony.OnFCRecharge(curPlayer) PlayerGoldGift.OnPlayerChargeGold(curPlayer) #累积充值X元 - PlayerActTotalRecharge.AddTotalRechargeGold(curPlayer, orderCoin) + PlayerActTotalRecharge.AddTotalRechargeGold(curPlayer, orderCoin, coinType) PlayerActGarbageSorting.AddActGarbageTaskProgress(curPlayer, ChConfig.Def_GarbageTask_CTG, addVIPExp, coinType) # 垃圾分类 PlayerActSingleRecharge.UpdSingleRechargeValue(curPlayer, orderCoin, coinType) # 单笔累充 PlayerActTurntable.OnPlayerRecharge(curPlayer, orderCoin, coinType) # 转盘 @@ -577,7 +574,7 @@ "ctgRealToday":ctgRealToday, "ctgRealTotal":ctgRealTotal, "ctgRealFirstTime":GameWorld.ChangeTimeNumToStr(ctgRealFirstTime) if ctgRealFirstTime else ""}) DataRecordPack.DR_CTGOK(curPlayer, addDRDict) GameWorld.Log("Billing: coinType=%s,eventName=%s, %s" % (coinType, eventName, addDRDict), curPlayer.GetPlayerID()) - return + return True #=============================================================================== -- Gitblit v1.8.0