| | |
| | | return
|
| | |
|
| | | # 注意: 因为GameServer没传是否套装,所以暂时按策划的ID规则来处理,最后一位代表是否套装
|
| | | if itemID % 10 == 1:
|
| | | if itemID % 10 != 0:
|
| | | #GameWorld.DebugLog("该拍品为套装拍品,不设置系统一口价时间! itemID=%s" % (itemID))
|
| | | return
|
| | |
|
| | |
| | | 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)
|
| | |
| | |
|
| | | def __DoEquipStarAutoBuyEquip(curPlayer, queryData, tick):
|
| | | ## 升星自动购买
|
| | | classLV, equipPlace, curPartStar, equipPackIndex, isAutoBuyPreview, curRate, delEquipIndexList, delItemInfoList, lackItemCostMoney, playerGoldPaper = queryData
|
| | | classLV, equipPlace, curPartStar, equipPackIndex, isAutoBuyPreview, curRate, delEquipGUIDDict, delItemInfoDict, lackItemCostMoney, playerGoldPaper = queryData
|
| | | GameWorld.DebugLog("升星自动购买装备: classLV=%s, equipPlace=%s, curPartStar=%s, equipPackIndex=%s" % (classLV, equipPlace, curPartStar, equipPackIndex))
|
| | | GameWorld.DebugLog(" 是否预览 %s, curRate=%s,lackItemCostMoney=%s, playerGoldPaper=%s" % (isAutoBuyPreview, curRate, lackItemCostMoney, playerGoldPaper))
|
| | | nextStar = curPartStar + 1
|
| | |
| | | # 这里认为一定可以购买成功,不对返回值做处理,即使无法购买也认为购买成功,玩家的消耗照常扣除
|
| | | __DoPlayerBidAuctionItem(curPlayer, worldAuctionItem.ItemGUID, buyoutPrice, tick, False, funcAutoBuyout=True)
|
| | |
|
| | | return classLV, equipPlace, curPartStar, equipPackIndex, curRate, delEquipIndexList, delItemInfoList, lackItemCostMoney, buyEquipCostMoney
|
| | | return classLV, equipPlace, curPartStar, equipPackIndex, curRate, delEquipGUIDDict, delItemInfoDict, lackItemCostMoney, buyEquipCostMoney
|
| | |
|
| | | def __SyncEquipStarAutoBuyCostInfo(curPlayer, classLV, equipPlace, curPartStar, curRate, totalCostMoney):
|
| | | ## 通知自动购买预览结果
|
| | |
| | | return
|
| | |
|
| | | def DR_AuctionHouse(curPlayer, eventName, drDict):
|
| | | accID = "" if not curPlayer else curPlayer.GetAccID()
|
| | | playerID = 0 if not curPlayer else curPlayer.GetPlayerID()
|
| | | dataDict = {"EventName":eventName, "PlayerID":playerID, "AccID":accID}
|
| | | dataDict.update(drDict)
|
| | | DataRecordPack.SendEventPack("AuctionHouse", dataDict, curPlayer)
|
| | | # accID = "" if not curPlayer else curPlayer.GetAccID()
|
| | | # playerID = 0 if not curPlayer else curPlayer.GetPlayerID()
|
| | | # dataDict = {"EventName":eventName, "PlayerID":playerID, "AccID":accID}
|
| | | # dataDict.update(drDict)
|
| | | # DataRecordPack.SendEventPack("AuctionHouse", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | def DoAddFamilyAuctionItem(mapID, familyAuctionItemDict):
|