6332 【后端】【2.0】主要是拍品相关规则调整及背包优化(给非拍卖物品为拍品时优化)
| | |
| | |
|
| | | import IPY_GameWorld
|
| | | import ItemControler
|
| | | import IpyGameDataPY
|
| | | import GameWorld
|
| | | import ChConfig
|
| | | import ItemCommon
|
| | |
| | |
|
| | | # 拍品
|
| | | if auctionGroup > 0:
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("AuctionItem", itemID)
|
| | | if not ipyData:
|
| | | GameWorld.DebugAnswer(curPlayer, "非可拍卖物品itemID=%s" % (itemID))
|
| | | return
|
| | | for _ in xrange(auctionGroup):
|
| | | if not ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, True, [IPY_GameWorld.rptItem], event=event):
|
| | | GameWorld.DebugAnswer(curPlayer, "###放入物品失败!")
|
| | |
| | | def CalcEquipSuiteAttr(curPlayer, suitCntDict, allAttrListSuit):
|
| | | if not suitCntDict:
|
| | | return
|
| | | GameWorld.DebugLog(' suitCntDict=%s'%suitCntDict)
|
| | | #GameWorld.DebugLog(' suitCntDict=%s'%suitCntDict)
|
| | | learnSkillList = []
|
| | | delSkillID = []
|
| | | skillManager = curPlayer.GetSkillManager()
|
| | |
| | | curSingleItem.SetRemainHour(outTimeServerDay)
|
| | |
|
| | | if isAuctionItem:
|
| | | curSingleItem.SetUserAttr(ShareDefine.Def_IudetAuctionItemCreateTime, int(time.time()))
|
| | | curSingleItem.SetIsBind(1)
|
| | | |
| | | if IpyGameDataPY.GetIpyGameDataNotLog("AuctionItem", itemID):
|
| | | curSingleItem.SetUserAttr(ShareDefine.Def_IudetAuctionItemCreateTime, int(time.time()))
|
| | | curSingleItem.SetIsBind(1)
|
| | | else:
|
| | | GameWorld.ErrLog("拍卖物品表不存在该ID!创建拍品失败,默认转为非拍品!itemID=%s" % itemID)
|
| | | |
| | | ItemControler.SetItemCount(curSingleItem, itemCount)
|
| | |
|
| | | if expireTime > 0:
|
| | |
| | |
|
| | | def __CreateDropItem(self, curNPC, itemID, count, isAuctionItem, dropPlayer):
|
| | | ## 创建掉落的物品
|
| | | if isAuctionItem and not IpyGameDataPY.GetIpyGameDataNotLog("AuctionItem", itemID):
|
| | | isAuctionItem = 0
|
| | | curItem = ItemControler.GetOutPutItemObj(itemID, count, isAuctionItem, curPlayer=dropPlayer)
|
| | | if not curItem:
|
| | | return
|