4862 【主干】【长尾】【BT】宝箱支持部分拍品、非拍品配置
| | |
| | | BYTE ShowType; //前端表现类型0-无表现, >0有表现需同步结果,具体类型前端自定义
|
| | | BYTE IsBind; //开出物品是否绑定
|
| | | BYTE AucionItemCanSell; //开出拍品可否上架集市
|
| | | list AucionItemDiffSellIDList; //可否上架差异拍品ID列表,即可上架代表不可上架的拍品ID列表,不可上架代表可上架的拍品ID列表
|
| | | };
|
| | |
|
| | | //宝箱表产出表
|
| | |
| | | ("BYTE", "ShowType", 0),
|
| | | ("BYTE", "IsBind", 0),
|
| | | ("BYTE", "AucionItemCanSell", 0),
|
| | | ("list", "AucionItemDiffSellIDList", 0),
|
| | | ),
|
| | |
|
| | | "ChestsAward":(
|
| | |
| | | self.CostGold = 0
|
| | | self.ShowType = 0
|
| | | self.IsBind = 0
|
| | | self.AucionItemCanSell = 0 |
| | | self.AucionItemCanSell = 0
|
| | | self.AucionItemDiffSellIDList = [] |
| | | return |
| | | |
| | | def GetChestsItemID(self): return self.ChestsItemID # 宝箱物品ID
|
| | |
| | | def GetCostGold(self): return self.CostGold # 消耗仙玉
|
| | | def GetShowType(self): return self.ShowType # 前端表现类型0-无表现, >0有表现需同步结果,具体类型前端自定义
|
| | | def GetIsBind(self): return self.IsBind # 开出物品是否绑定
|
| | | def GetAucionItemCanSell(self): return self.AucionItemCanSell # 开出拍品可否上架集市 |
| | | def GetAucionItemCanSell(self): return self.AucionItemCanSell # 开出拍品可否上架集市
|
| | | def GetAucionItemDiffSellIDList(self): return self.AucionItemDiffSellIDList # 可否上架差异拍品ID列表,即可上架代表不可上架的拍品ID列表,不可上架代表可上架的拍品ID列表 |
| | | |
| | | # 宝箱表产出表 |
| | | class IPY_ChestsAward(): |
| | |
| | | costItemCountTotal = chestsIpyData.GetCostItemCount() * useCnt
|
| | | costGoldTotal = chestsIpyData.GetCostGold() * useCnt
|
| | | auctionItemCanSell = chestsIpyData.GetAucionItemCanSell()
|
| | | aucionItemDiffSellIDList = chestsIpyData.GetAucionItemDiffSellIDList()
|
| | |
|
| | | 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,auctionItemCanSell=%s" |
| | | % (needSpaceDict, jobAwardItemList, moneyType, moneyCount, notifyItemList, updOpenCount, auctionItemCanSell))
|
| | | GameWorld.DebugLog(" needSpaceDict=%s,jobAwardItemList=%s,moneyType=%s,moneyCount=%s,notifyItemList=%s,updOpenCount=%s,auctionItemCanSell=%s,aucionItemDiffSellIDList=%s" |
| | | % (needSpaceDict, jobAwardItemList, moneyType, moneyCount, notifyItemList, updOpenCount, auctionItemCanSell, aucionItemDiffSellIDList))
|
| | |
|
| | | for packType, needSpace in needSpaceDict.items():
|
| | | packSpace = ItemCommon.GetItemPackSpace(curPlayer, packType, needSpace)
|
| | |
| | | # 给奖励
|
| | | syncItemList = []
|
| | | for itemID, itemCount in jobAwardItemList:
|
| | | isAuctionItem = 1 if auctionItemCanSell and IpyGameDataPY.GetIpyGameDataNotLog("AuctionItem", itemID) else 0
|
| | | canSell = (not auctionItemCanSell) if itemID in aucionItemDiffSellIDList else auctionItemCanSell
|
| | | isAuctionItem = 1 if canSell 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"
|