| | |
| | | for i in range(0, curPack.GetCount()):
|
| | | item = curPack.GetAt(i)
|
| | |
|
| | | if not ItemCommon.CheckItemCanUse(item):
|
| | | if not ItemCommon.CheckItemCanUse(item) or GetIsAuctionItem(item):
|
| | | continue
|
| | |
|
| | | if item.GetItemTypeID() == id:
|
| | |
| | | for i in range(0, curPack.GetCount()):
|
| | | item = curPack.GetAt(i)
|
| | |
|
| | | if not ItemCommon.CheckItemCanUse(item):
|
| | | if not ItemCommon.CheckItemCanUse(item) or GetIsAuctionItem(item):
|
| | | continue
|
| | |
|
| | | if item.GetItemTypeID() == id:
|
| | |
| | | for i in range(0, curPack.GetCount()):
|
| | | item = curPack.GetAt(i)
|
| | |
|
| | | if not ItemCommon.CheckItemCanUse(item):
|
| | | if not ItemCommon.CheckItemCanUse(item) or GetIsAuctionItem(item):
|
| | | continue
|
| | |
|
| | | effect = item.GetEffectByIndex(0)
|
| | |
| | | for i in range(0, curPack.GetCount()):
|
| | |
|
| | | item = curPack.GetAt(i)
|
| | | if not ItemCommon.CheckItemCanUse(item):
|
| | | if not ItemCommon.CheckItemCanUse(item) or GetIsAuctionItem(item):
|
| | | continue
|
| | |
|
| | | if item.GetItemTypeID() != id:
|
| | |
| | | #GameWorld.DebugLog("不需要记录的物品类型或ID! itemType=%s,itemID=%s" % (itemType, itemID))
|
| | | return True
|
| | | return False
|
| | |
|
| | | #物品属性判断------------------------------------------------------------------
|
| | | ## 使用物品检查是否满足属性
|
| | | # @param curPlayer 当前玩家
|
| | | # @param curItem 当前物品
|
| | | # @return False or True
|
| | | def CheckItemAttrLimit(curPlayer, curItem):
|
| | | # 取消限制的物品
|
| | | if curItem.GetUserAttr(ShareDefine.Def_IudetCancelUseLimit) == 1:
|
| | | return True
|
| | | #智力为基础限制
|
| | | if curItem.GetLimitPNE() > curPlayer.GetPNE():
|
| | | return False
|
| | | |
| | | #由于可变属性强化表加载问题, 暂时不处理强化表的属性点限制,以物品表为主,如有需要再开启此判断 20151210 by hxp
|
| | | # 从强化表中获得数据,装备强化限制力量 敏捷
|
| | | # if curItem.GetType() in ReadChConfig.GetEvalChConfig("EquipPlus_EquipType"):
|
| | | # plusInfo = ...
|
| | | # |
| | | # if plusInfo is None:
|
| | | # GameWorld.ErrLog("tagItemPlus.txt can't find equip:%s" % curItem.GetItemTypeID())
|
| | | # return False
|
| | | # |
| | | # limitSTR, limitPHY = plusInfo.GetLimitSTR(), plusInfo.GetLimitPHY()
|
| | | # |
| | | # # 物品表中获得信息
|
| | | # else:
|
| | | limitSTR, limitPHY = curItem.GetLimitSTR(), curItem.GetLimitPHY()
|
| | | |
| | | if limitSTR > curPlayer.GetSTR() or limitPHY > curPlayer.GetPHY():
|
| | | return False
|
| | | |
| | | return True
|
| | |
|
| | |
|
| | | #物品使用等级判断----------------------------------------------------------------
|
| | | ## 物品使用等级判断
|
| | |
| | | # return False
|
| | |
|
| | | #职业检查
|
| | | if not ItemCommon.JobUseable(curPlayer, curItem):
|
| | | if not ItemCommon.CheckJob(curPlayer, curItem):
|
| | | if needNotify:
|
| | | PlayerControl.NotifyCode(curPlayer, "GeRen_lhs_31379")
|
| | |
|
| | |
| | | #等级检查
|
| | | if not CheckItemUseLV(curPlayer, curItem, needNotify):
|
| | | return False
|
| | |
|
| | | #使用物品检查是否满足属性
|
| | | if not CheckItemAttrLimit(curPlayer, curItem):
|
| | | if needNotify:
|
| | | PlayerControl.NotifyCode(curPlayer, "itemuse_andyshao_671654")
|
| | | return False
|
| | | |
| | | |
| | | #=======================================================================
|
| | | # #马匹检查
|
| | | # if curItem.GetType() == ChConfig.Def_Item_Type_Horse and not CheckCanEquipHorse(curPlayer):
|