本文整理汇总了Python中toontown.quest.Quests.getQuestFromNpcId方法的典型用法代码示例。如果您正苦于以下问题:Python Quests.getQuestFromNpcId方法的具体用法?Python Quests.getQuestFromNpcId怎么用?Python Quests.getQuestFromNpcId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.quest.Quests
的用法示例。
在下文中一共展示了Quests.getQuestFromNpcId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: avatarChoseQuest
# 需要导入模块: from toontown.quest import Quests [as 别名]
# 或者: from toontown.quest.Quests import getQuestFromNpcId [as 别名]
def avatarChoseQuest(self, avId, npc, questId, rewardId, building):
toon = self.air.doId2do.get(avId)
if not toon:
return
fromNpc = Quests.getQuestFromNpcId(questId)
toNpc = Quests.getQuestToNpcId(questId)
toon.addQuest([questId, fromNpc, toNpc, rewardId, 0], 0,
recordHistory = 0)
npc.assignQuest(avId, questId, rewardId, toNpc)
taskMgr.remove(npc.uniqueName('clearMovie'))
示例2: requestSkipTutorial
# 需要导入模块: from toontown.quest import Quests [as 别名]
# 或者: from toontown.quest.Quests import getQuestFromNpcId [as 别名]
def requestSkipTutorial(self):
avId = self.air.getAvatarIdFromSender()
av = self.air.doId2do.get(avId)
if av:
av.b_setTutorialAck(1)
av.b_setQuestHistory([110, 100])
av.addQuest((110, Quests.getQuestFromNpcId(110), Quests.getQuestToNpcId(110), Quests.getQuestReward(110, av), 0), 0)
self.air.questManager.toonRodeTrolleyFirstTime(av) #gg hacky
self.d_skipTutorialResponse(avId, 1)
else:
self.d_skipTutorialResponse(avId, 0)
示例3: avatarChoseQuest
# 需要导入模块: from toontown.quest import Quests [as 别名]
# 或者: from toontown.quest.Quests import getQuestFromNpcId [as 别名]
def avatarChoseQuest(self, avId, npc, questId, reward, _):
av = self.air.doId2do.get(avId)
if not av:
return
fromNpc = Quests.getQuestFromNpcId(questId)
toNpc = Quests.getQuestToNpcId(questId)
if reward in (110, 1000):
toNpc = Quests.ToonTailor
npc.assignQuest(avId, questId, reward, toNpc)
progress = 0
quest = [questId, fromNpc, toNpc, reward, progress]
av.addQuest(quest, reward, True)
taskMgr.remove(npc.uniqueName('clearMovie'))