| | |
| | | NetPackCommon.SendFakePack(curPlayer, sendPack)
|
| | | return
|
| | |
|
| | | def NotifyUseMoneyTotal(curPlayer, moneyTypeList=None):
|
| | | if moneyTypeList:
|
| | | notifyMoneyTypeList = moneyTypeList
|
| | | else:
|
| | | notifyMoneyTypeList = ShareDefine.UseTotalPriceTypeList
|
| | | |
| | | infoList = []
|
| | | for moneyType in notifyMoneyTypeList:
|
| | | useTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UseMoneyTotal % moneyType)
|
| | | if not useTotal and moneyTypeList == None:
|
| | | continue
|
| | | info = ChPyNetSendPack.tagMCUseMoneyTotal()
|
| | | info.MoneyType = moneyType
|
| | | info.UseTotal = useTotal
|
| | | infoList.append(info)
|
| | | |
| | | if not infoList:
|
| | | return
|
| | | |
| | | clientPack = ChPyNetSendPack.tagMCUseMoneyTotalInfo()
|
| | | clientPack.Clear()
|
| | | clientPack.InfoList = infoList
|
| | | clientPack.Count = len(clientPack.InfoList)
|
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|
| | | return
|
| | |
|
| | | ##玩家是否有钱款
|
| | | # @param curPlayer 玩家实例
|
| | |
| | | # @param quantity 消费数量
|
| | | # @return None
|
| | | def __PayMoneyAfter(curPlayer, type_Price, price, costType, infoDict, quantity, costVIPGold):
|
| | | if type_Price in ShareDefine.UseTotalPriceTypeList:
|
| | | useTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UseMoneyTotal % type_Price)
|
| | | useTotal = min(useTotal + price, ChConfig.Def_UpperLimit_DWord)
|
| | | NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UseMoneyTotal % type_Price, useTotal)
|
| | | NotifyUseMoneyTotal(curPlayer, [type_Price])
|
| | | |
| | | #金子支付
|
| | | if type_Price == IPY_GameWorld.TYPE_Price_Gold_Money:
|
| | | __PayMoneyAfterByGoldMoney(curPlayer, type_Price, price, costType, infoDict, costVIPGold)
|