| | |
| | | costItemID = chestsIpyData.GetCostItemID()
|
| | | costItemCountTotal = chestsIpyData.GetCostItemCount() * useCnt
|
| | | costGoldTotal = chestsIpyData.GetCostGold() * useCnt
|
| | | auctionItemCanSell = chestsIpyData.GetAucionItemCanSell()
|
| | |
|
| | | if costGoldTotal and not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costGoldTotal):
|
| | | return
|
| | |
| | | if not awardInfo:
|
| | | return
|
| | | needSpaceDict, jobAwardItemList, moneyType, moneyCount, notifyItemList, updOpenCount = awardInfo
|
| | | GameWorld.DebugLog(" needSpaceDict=%s,jobAwardItemList=%s,moneyType=%s,moneyCount=%s,notifyItemList=%s,updOpenCount=%s" |
| | | % (needSpaceDict, jobAwardItemList, moneyType, moneyCount, notifyItemList, updOpenCount))
|
| | | GameWorld.DebugLog(" needSpaceDict=%s,jobAwardItemList=%s,moneyType=%s,moneyCount=%s,notifyItemList=%s,updOpenCount=%s,auctionItemCanSell=%s" |
| | | % (needSpaceDict, jobAwardItemList, moneyType, moneyCount, notifyItemList, updOpenCount, auctionItemCanSell))
|
| | |
|
| | | for packType, needSpace in needSpaceDict.items():
|
| | | packSpace = ItemCommon.GetItemPackSpace(curPlayer, packType, needSpace)
|
| | |
| | | # 给奖励
|
| | | syncItemList = []
|
| | | for itemID, itemCount in jobAwardItemList:
|
| | | curItem = ItemControler.GetOutPutItemObj(itemID, itemCount, False, curPlayer=curPlayer)
|
| | | isAuctionItem = 1 if auctionItemCanSell and IpyGameDataPY.GetIpyGameDataNotLog("AuctionItem", itemID) else 0
|
| | | curItem = ItemControler.GetOutPutItemObj(itemID, itemCount, isAuctionItem, curPlayer=curPlayer)
|
| | | if not curItem:
|
| | | GameWorld.ErrLog("宝箱创建奖励物品异常!chestsItemID=%s,useCnt=%s,itemID=%s,itemCount=%s,isBind=%s"
|
| | | % (chestsItemID, useCnt, itemID, itemCount, isBind), curPlayer.GetPlayerID())
|
| | |
| | | notifyItemList = []
|
| | | jobAwardItemList = []
|
| | | for itemID, itemCount in awardItemDict.items():
|
| | | if not itemCount:
|
| | | continue
|
| | | jobItemID = __GetChestsJobItem(chestsItemID, job, itemID, jobItemList)
|
| | | if not jobItemID:
|
| | | return
|