| | |
| | | #---钱不够 返回假如果需要提示的话 提示信息---
|
| | | if needMoneyCount < Price:
|
| | | if needNotify and notifyCode:
|
| | | NotifyCode(curPlayer, notifyCode)
|
| | | pass#NotifyCode(curPlayer, notifyCode)
|
| | | GameWorld.DebugLog("货币不足: TYPE_Price=%s, Price=%s, curMoneyCount=%s" % (TYPE_Price, Price, needMoneyCount))
|
| | | return False
|
| | |
|
| | |
| | | gold = curPlayer.GetGold() # 元宝
|
| | |
|
| | | if goldPaper + gold < Price: # 钱不够
|
| | | if needNotify:
|
| | | NotifyCode(curPlayer, "GoldErr")
|
| | | #if needNotify:
|
| | | # NotifyCode(curPlayer, "GoldErr")
|
| | | return []
|
| | |
|
| | | if goldPaper >= Price: # 只用礼券就够了
|
| | |
| | | __PayMoneyAfter(curPlayer, type_Price, lostMoney, costType, infoDict, quantity, costVIPGold)
|
| | |
|
| | | #通知客户端失去金钱
|
| | | if isNotify:
|
| | | if type_Price == ShareDefine.TYPE_Price_PayCoin:
|
| | | NotifyCode(curPlayer, "LostMoney", [type_Price, str(round(lostMoney/100.0, 2))])
|
| | | else:
|
| | | NotifyCode(curPlayer, "LostMoney", [type_Price, lostMoney])
|
| | | #if isNotify:
|
| | | # if type_Price == ShareDefine.TYPE_Price_PayCoin:
|
| | | # NotifyCode(curPlayer, "LostMoney", [type_Price, str(round(lostMoney/100.0, 2))])
|
| | | # else:
|
| | | # NotifyCode(curPlayer, "LostMoney", [type_Price, lostMoney])
|
| | | return True
|
| | |
|
| | | ## 付款以后后续操作
|
| | |
| | | if priceType == ShareDefine.TYPE_Price_PayCoinDay:
|
| | | priceType = ShareDefine.TYPE_Price_PayCoin
|
| | |
|
| | | if isSysHint and priceType != ShareDefine.TYPE_Price_BourseMoney:
|
| | | #通知客户端得到金钱
|
| | | if priceType == ShareDefine.TYPE_Price_PayCoin:
|
| | | NotifyCode(curPlayer, "GetMoney", [priceType, str(round(value/100.0, 2))])
|
| | | else:
|
| | | NotifyCode(curPlayer, "GetMoney", [priceType, value])
|
| | | #if isSysHint and priceType != ShareDefine.TYPE_Price_BourseMoney:
|
| | | # #通知客户端得到金钱
|
| | | # if priceType == ShareDefine.TYPE_Price_PayCoin:
|
| | | # NotifyCode(curPlayer, "GetMoney", [priceType, str(round(value/100.0, 2))])
|
| | | # else:
|
| | | # NotifyCode(curPlayer, "GetMoney", [priceType, value])
|
| | | __GiveMoneyAfter(curPlayer, priceType, value, giveType, addDataDict)
|
| | |
|
| | | if befMoney == 0:
|