fix:3268 【后端】仙盟vip6封红包只能发真实的仙玉,不能发内部发的仙玉
| | |
| | |
|
| | | # 可在跨服中消费的类型列表
|
| | | MergeServerCanCostType = [Def_Cost_UseSpeaker, Def_Cost_Revive, Def_Cost_FBEncourage]
|
| | |
|
| | | #内部仙玉不能用的消费类型列表
|
| | | UnUseInner_CostType = [Def_Cost_BourseBuy, Def_Cost_FamilyRedPacket]
|
| | | # 消费类型对应信息字典{消费类型:[eventName, 中文说明reason_name, 发送给9377的数据是否分消费子类], }
|
| | | # 由于9377那边数据建议所有消费点总和最好不超过500个,故这里对部分发送给对方的数据进行归组为不分子类,或直接归属于商城分组
|
| | | # .使用原价购买的物品统一归属为商城组,消费对应为AutoBuy的也归属于商城分组
|
| | |
| | |
|
| | | curBourseMoney = GetMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney)
|
| | | updBourseMoney = curBourseMoney
|
| | | #当是交易所扣费时,则必定扣除交易额度
|
| | | if costType == ChConfig.Def_Cost_BourseBuy:
|
| | | #当是交易所扣费、钻石红包时,则必定扣除交易额度
|
| | | if costType in ChConfig.UnUseInner_CostType:
|
| | | updBourseMoney = max(0, curBourseMoney - price)
|
| | | #其他如果当前金子比交易额度还少,则强制调整交易额度为当前金子数(这种情况一般是非交易所消费的,需要同步扣除交易所可购买额度)
|
| | | elif updPlayerGold < updBourseMoney:
|
| | |
| | | if awardNum + goldLimit > familyRedPacketGoldLimit:
|
| | | GameWorld.DebugLog(' 主动发仙盟钻石红包,额度已超%s,不可发送!' % familyRedPacketGoldLimit, playerID)
|
| | | return
|
| | | |
| | | if not PlayerControl.HaveMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney, awardNum):
|
| | | curBourseMoney = PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney)
|
| | | GameWorld.Log(" 不能发钻石红包 no enough bourse money! priceCount=%s,curBourseMoney=%s" |
| | | % (awardNum, curBourseMoney), playerID)
|
| | | return
|
| | | if not PlayerControl.PayMoney(curPlayer, moneyType, awardNum, ChConfig.Def_Cost_FamilyRedPacket):
|
| | | return
|
| | |
|