| | |
| | | import PlayerWeekParty
|
| | | import PlayerGoldInvest
|
| | | import ItemCommon
|
| | | import PyGameData
|
| | | import CommFunc
|
| | |
|
| | | import time
|
| | |
| | | CoinType_Buy, # 直购,非直接充仙玉的,如RMB直接购买某个物品或激活某个功能
|
| | | CoinType_Item, # 使用物品,类充值仙玉效果,但是有某些功能上的限制,一般是bt版本赠送
|
| | | ) = range(3)
|
| | |
|
| | | # 充值类型定义
|
| | | PayType_Gold = 2 # 常规仙玉充值
|
| | | PayType_GoldPlus = 3 # 至尊仙玉充值
|
| | | PayType_GrowupBuy = 16 # 成长必买
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | #注意: GetChangeCoinPointTotal 充值点和赠送点总和
|
| | |
| | | return
|
| | |
|
| | | coinExp = ipyData.GetCoinExp()
|
| | | coinType = CoinType_Gold if (ctgIpyData and ctgIpyData.GetPayType() in [2, 3]) else CoinType_Buy # 规定2为直充,其他为直购
|
| | | 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)
|
| | |
|
| | | #充值成功主动查询一次,无充值数量就不会继续查询
|
| | |
| | | addDRDict.update({"recordID":recordID})
|
| | |
|
| | | # 成长必买类型
|
| | | if ipyData.GetPayType() == 16:
|
| | | if ipyData.GetPayType() == PayType_GrowupBuy:
|
| | | canBuy, errInfo = PlayerActGrowupBuy.CheckGrowupBuyState(curPlayer, recordID)
|
| | | if not canBuy:
|
| | | DataRecordPack.DR_CTGError(curPlayer, errInfo, addDRDict)
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCount % recordID, todayBuyCount + 1)
|
| | | addDRDict.update({"todayBuyCountUpd":(todayBuyCount + 1)})
|
| | |
|
| | | giveItemList = ipyData.GetGainItemList()
|
| | | gainItemList = ipyData.GetGainItemList()
|
| | | actWorldLVGainItemInfo = ipyData.GetActWorldLVGainItemInfo()
|
| | | giveItemList = []
|
| | | # 活动世界等级对应物品信息,如果有对应活动支持 且 该配置有配,则默认走该配置,否则使用常规的默认物品配置
|
| | | payTypeActNameDict = {PayType_GrowupBuy:ShareDefine.OperationActionName_GrowupBuy,
|
| | | |
| | | # ... 有新增的活动需要支持,则在此新增配置上即可,后面取物品的逻辑都是一样的
|
| | | }
|
| | | if actWorldLVGainItemInfo and ipyData.GetPayType() in payTypeActNameDict:
|
| | | actName = payTypeActNameDict[ipyData.GetPayType()]
|
| | | actInfo = PyGameData.g_operationActionDict.get(actName, {})
|
| | | if not actInfo or not actInfo.get(ShareDefine.ActKey_State):
|
| | | DataRecordPack.DR_CTGError(curPlayer, "Can not find act info actName=%s" % actName, addDRDict)
|
| | | return
|
| | | actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | actWorldLVList = [int(strWorldLV) for strWorldLV in actWorldLVGainItemInfo.keys()]
|
| | | actWorldLVList.sort() # 使用 int 的值排,否则可能引起排序错误
|
| | | for worldLV in actWorldLVList:
|
| | | if actWorldLV <= worldLV:
|
| | | giveItemList = actWorldLVGainItemInfo[str(worldLV)]
|
| | | break
|
| | | if not giveItemList:
|
| | | giveItemList = actWorldLVGainItemInfo[str(actWorldLVList[-1])] # 没有匹配到的话默认取最后一个等级配置
|
| | | else:
|
| | | giveItemList = gainItemList
|
| | | |
| | | addGold = ipyData.GetGainGold() # 获得仙玉数
|
| | | gainGoldPrize = ipyData.GetGainGoldPrize() # 赠送仙玉数,首次充值赠送仙玉时,此仙玉不给
|
| | | firstGoldPrize = ipyData.GetFirstGoldPrize() # 首次充值赠送的仙玉
|