当前位置: 首页>>代码示例>>Python>>正文


Python Quests.getQuestToNpcId方法代码示例

本文整理汇总了Python中toontown.quest.Quests.getQuestToNpcId方法的典型用法代码示例。如果您正苦于以下问题:Python Quests.getQuestToNpcId方法的具体用法?Python Quests.getQuestToNpcId怎么用?Python Quests.getQuestToNpcId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在toontown.quest.Quests的用法示例。


在下文中一共展示了Quests.getQuestToNpcId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: avatarChoseQuest

# 需要导入模块: from toontown.quest import Quests [as 别名]
# 或者: from toontown.quest.Quests import getQuestToNpcId [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'))
开发者ID:InvisbleMario,项目名称:Toontown-Community,代码行数:12,代码来源:QuestManagerAI.py

示例2: requestSkipTutorial

# 需要导入模块: from toontown.quest import Quests [as 别名]
# 或者: from toontown.quest.Quests import getQuestToNpcId [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)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:13,代码来源:TutorialManagerAI.py

示例3: avatarChoseQuest

# 需要导入模块: from toontown.quest import Quests [as 别名]
# 或者: from toontown.quest.Quests import getQuestToNpcId [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'))
开发者ID:Teku16,项目名称:MikeyTheRepository,代码行数:21,代码来源:QuestManagerAI.py

示例4: avatarChoseQuest

# 需要导入模块: from toontown.quest import Quests [as 别名]
# 或者: from toontown.quest.Quests import getQuestToNpcId [as 别名]
    def avatarChoseQuest(self, avId, npc, questId, rewardId, toNpcId):
        # Get the avatar.
        av = self.air.doId2do.get(avId)
        if not av:
            return

        # Get the npcIds
        fromNpcId = npc.npcId
        if toNpcId == 0:
            toNpcId = Quests.getQuestToNpcId(questId)

        # Add the quest to the avatars list.
        transformedRewardId = Quests.transformReward(rewardId, av)
        av.addQuest([questId, fromNpcId, toNpcId, rewardId, 0], transformedRewardId)

        # Remove the tasks for timeout.
        taskMgr.remove(npc.uniqueName('clearMovie'))

        # Assign the quest.
        npc.assignQuest(avId, questId, rewardId, toNpcId)
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:22,代码来源:QuestManagerAI.py


注:本文中的toontown.quest.Quests.getQuestToNpcId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。