本文整理汇总了Python中pirates.inventory.ItemGlobals.isFromQuest方法的典型用法代码示例。如果您正苦于以下问题:Python ItemGlobals.isFromQuest方法的具体用法?Python ItemGlobals.isFromQuest怎么用?Python ItemGlobals.isFromQuest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pirates.inventory.ItemGlobals
的用法示例。
在下文中一共展示了ItemGlobals.isFromQuest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getHandHeldPropsDict
# 需要导入模块: from pirates.inventory import ItemGlobals [as 别名]
# 或者: from pirates.inventory.ItemGlobals import isFromQuest [as 别名]
def getHandHeldPropsDict(
versionFilter=None,
rarityFilter=None,
isFromLoot=True,
isFromShop=True,
isFromQuest=True,
isFromPromo=True,
isFromPVP=True,
isFromNPC=True,
):
resultDict = {}
for weaponId in ItemGlobals.getHumanWeaponTypes():
toBeAdded = True
name = ItemGlobals.getModel(weaponId)
if versionFilter is not None:
toBeAdded = ItemGlobals.getVersion(weaponId) == versionFilter
if toBeAdded and rarityFilter is not None:
toBeAdded = ItemGlobals.getRarity(weaponId) == rarityFilter
if not isFromLoot or ItemGlobals.isFromLoot(weaponId):
if not isFromShop or ItemGlobals.isFromShop(weaponId):
if not isFromQuest or ItemGlobals.isFromQuest(weaponId):
if not isFromPromo or ItemGlobals.isFromPromo(weaponId):
if (isFromPVP or ItemGlobals.isFromPVP(weaponId)) and isFromNPC:
pass
toBeAdded &= ItemGlobals.isFromNPC(weaponId)
if toBeAdded:
if ItemGlobals.getType(weaponId) == ItemGlobals.GRENADE:
resultDict[name] = "models/ammunition/%s" % name
else:
resultDict[name] = "models/handheld/%s" % name
ItemGlobals.getType(weaponId) == ItemGlobals.GRENADE
if not versionFilter is not None and rarityFilter is not None:
if isFromLoot == True and isFromShop == True and isFromQuest == True and isFromPromo == True:
pass
if not (isFromPVP == True):
return resultDict
for key in INTERACT_ANIMS.keys():
allIdles = INTERACT_ANIMS[key].get("idles")
if allIdles:
if type(allIdles) is type({}):
props = allIdles.get(3003).get("props")
else:
props = INTERACT_ANIMS[key].get("props")
if props:
if isinstance(props[0], list):
prop = props[0][0]
else:
prop = props[0]
if prop:
name = prop[prop.rfind("/") + 1 :]
resultDict[name] = prop
return resultDict