| | |
| | | auctionItemMgr.sysBuyoutItemByTimeList.sort(key=operator.attrgetter("SysBuyTime"))
|
| | | return
|
| | |
|
| | | def __EndAuctionItem(endItemList, endEvent, funcAutoBuyout=False):
|
| | | def __EndAuctionItem(endItemList, endEvent, funcAutoBuyout=False, buyPlayer=None):
|
| | | ''' 结束拍品竞拍
|
| | | @param delItemStateDict: 删除的拍品竞拍状态
|
| | | '''
|
| | |
| | |
|
| | | # 竞拍成功邮件,发放物品
|
| | | if bidderID:
|
| | | mailTypeKey = "PaimaiMail3"
|
| | | paramList = [bidderPrice]
|
| | | detail = {"ItemGUID":itemGUID}
|
| | | addItemList = [{"ItemID":itemID, "Count":itemCount, "IsAuctionItem":False, "UserData":auctionItem.UserData}]
|
| | | if funcAutoBuyout:
|
| | | # 功能自动购买的不给物品,由功能根据功能需求处理
|
| | | pass
|
| | | ## 如果有玩家的,直接给到背包
|
| | | elif buyPlayer and buyPlayer.GetPlayerID() == bidderID:
|
| | | mailInfo = [mailTypeKey, addItemList, paramList, detail]
|
| | | resultMsg = str([itemGUID, itemID, itemCount, auctionItem.UserData, mailInfo])
|
| | | buyPlayer.MapServer_QueryPlayerResult(0, 0, "AuctionHouseGiveItem", resultMsg, len(resultMsg))
|
| | | else:
|
| | | paramList = [bidderPrice]
|
| | | detail = {"ItemGUID":itemGUID}
|
| | | addItemList = [{"ItemID":itemID, "Count":itemCount, "IsAuctionItem":False, "UserData":auctionItem.UserData}]
|
| | | PlayerCompensation.SendMailByKey("PaimaiMail3", [bidderID], addItemList, paramList, detail=detail)
|
| | | PlayerCompensation.SendMailByKey(mailTypeKey, [bidderID], addItemList, paramList, detail=detail)
|
| | | AddAuctionRecord(auctionItem, AuctionRecordResult_BidOK)
|
| | |
|
| | | # 拍卖成功收益,都以玩家收益向上取整
|
| | |
| | | #GameWorld.DebugLog("拍品有人竞价了,移除系统一口价拍品列表!")
|
| | |
|
| | | if isBuyout:
|
| | | __EndAuctionItem([auctionItem], "Buyout", funcAutoBuyout)
|
| | | __EndAuctionItem([auctionItem], "Buyout", funcAutoBuyout, buyPlayer=curPlayer)
|
| | | else:
|
| | | if __AddAuctionItemEndTimeByBid(auctionItem):
|
| | | __SortAuctionitem(isSortWorldItem=False)
|