| | |
| | | import PlayerActivity
|
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | | import PlayerXiangong
|
| | | import IpyGameDataPY
|
| | | import PlayerGubao
|
| | | import PyGameData
|
| | | import PlayerHero
|
| | | import PlayerMail
|
| | |
|
| | | import math
|
| | | import time
|
| | |
| | | tagItem.Clear()
|
| | | return True
|
| | |
|
| | | #气运
|
| | | if itemEff.GetEffectID() == ChConfig.Def_Effect_TiandaoQiyun:
|
| | | isAutoUse = itemEff.GetEffectValue(1)
|
| | | if isAutoUse:
|
| | | addQiyun = itemEff.GetEffectValue(0) * tagItemCount
|
| | | PlayerXiangong.AddTiandaoQiyun(curPlayer, addQiyun, {"ItemID":itemID, "ItemCount":tagItemCount, "isAutoUse":1})
|
| | | tagItem.Clear()
|
| | | return True
|
| | | if PlayerHero.AutoChangeToSkinPoint(curPlayer, tagItem):
|
| | | tagItem.Clear()
|
| | | return True
|
| | | |
| | | #增加副本次数
|
| | | if itemEff.GetEffectID() == ChConfig.Def_Effect_AddFBCnt:
|
| | | isAutoUse = itemEff.GetEffectValue(1)
|
| | |
| | | GameWorld.ErrLog('DoLogic_PutItemInPack Error 物品无法放入背包')
|
| | | return False
|
| | |
|
| | | def GetIsBindValue(isBind=0, srcSign=0):
|
| | | ## 获取IsBind值,适用于配置或者通知前端特殊标记用,兼容是否绑定/拍品设定
|
| | | # @param isBind: 可支持原绑定/拍品逻辑,如果该项目没有该逻辑暂时默认都为0
|
| | | # @param srcSign: 标记物品特殊来源,如xx特权额外产出等
|
| | | return srcSign * 10 + isBind
|
| | |
|
| | | ## 是否拍品
|
| | | def GetIsAuctionItem(curItem): return curItem.GetIsBind()
|
| | | def GetIsAuctionItem(curItem): return 0#curItem.GetIsBind()
|
| | | def SetIsAuctionItem(curItem, isAuctionItem, curPlayer=None):
|
| | | curItem.SetIsBind(isAuctionItem)
|
| | | |
| | | if isAuctionItem:
|
| | | curItem.SetUserAttr(ShareDefine.Def_IudetAuctionItemCreateTime, int(time.time()))
|
| | | return
|
| | | #curItem.SetIsBind(isAuctionItem)
|
| | | #
|
| | | #if isAuctionItem:
|
| | | # curItem.SetUserAttr(ShareDefine.Def_IudetAuctionItemCreateTime, int(time.time()))
|
| | | # return
|
| | | return
|
| | |
|
| | | def GetItemCountByID(curPlayer, itemID):
|
| | |
| | | break
|
| | |
|
| | | if isSendMail:
|
| | | PlayerControl.SendMailByKey(mailKey, [curPlayer.GetPlayerID()], giveItemList)
|
| | | PlayerMail.SendMailByKey(mailKey, curPlayer.GetPlayerID(), giveItemList)
|
| | | GameWorld.DebugLog("GivePlayerItemOrMail背包空间不够,发送邮件: mailItemList=%s" % str(giveItemList), curPlayer.GetPlayerID())
|
| | | else:
|
| | | for itemID, itemCnt, isAuctionItem in giveItemList:
|
| | |
| | |
|
| | | if notifyMailKey:
|
| | | paramList = [itemID, itemID, recycleCount]
|
| | | PlayerControl.SendMailByKey(notifyMailKey, [playerID], addItemList, paramList)
|
| | | PlayerMail.SendMailByKey(notifyMailKey, playerID, addItemList, paramList)
|
| | | elif addItemList:
|
| | | GivePlayerItemOrMail(curPlayer, addItemList, event=["RecycleItem", False, {"RecycleItemID":itemID}])
|
| | |
|