tutorial: fix tutorial

This commit is contained in:
Aidan Noll 2014-08-12 20:28:22 -04:00
parent cea10adec0
commit eeaa7f48e6
4 changed files with 14 additions and 5 deletions

View file

@ -531,8 +531,8 @@ dclass DistributedToon : DistributedPlayer {
setDisguisePageFlag(int8 flag) ownrecv;
setSosPageFlag(int8 flag) ownrecv;
setHouseId(uint32 id = 0) required ownrecv db;
setQuests(uint32 flattenedQuests[] = [175, 401000019, 1000, 100, 1]) required broadcast ownrecv db;
setQuestHistory(uint16 questList[] = [175]) required ownrecv db;
setQuests(uint32 flattenedQuests[] = []) required broadcast ownrecv db;
setQuestHistory(uint16 questList[] = []) required ownrecv db;
setRewardHistory(uint8 rewardTier = 0, uint16 rewardList[] = [100]) required ownrecv db;
setQuestCarryLimit(uint8 limit = 1) required ownrecv db;
requestDeleteQuest(uint32 questDesc[]) ownsend airecv;

View file

@ -48,7 +48,9 @@ class DistributedPhoneAI(DistributedFurnitureItemAI):
taskMgr.doMethodLater(1, self.__resetMovie, 'resetMovie-%d' % self.getDoId(), extraArgs=[])
self.notify.debug("No Catalogs")
return
self.air.questManager.toonCalledClarabelle(av)
self.notify.debug("Loading the catalog")
self.avId = avId
self.d_setMovie(PhoneGlobals.PHONE_MOVIE_PICKUP, avId, globalClockDelta.getRealNetworkTime())
@ -139,4 +141,4 @@ class DistributedPhoneAI(DistributedFurnitureItemAI):
def requestGiftPurchaseResponse(self, todo0, todo1):
pass

View file

@ -159,6 +159,12 @@ class QuestManagerAI:
self.__incrementQuestProgress(toon.quests[index])
toon.updateQuests()
def toonCalledClarabelle(self, toon):
for index, quest in enumerate(self.__toonQuestsList2Quests(toon.quests)):
if isinstance(quest, Quests.PhoneQuest):
self.__incrementQuestProgress(toon.quests[index])
toon.updateQuests()
def completeQuest(self, toon, questId):
"""
@ -189,7 +195,7 @@ class QuestManagerAI:
# If non-zero, this indicates this is the first quest in the whole ToonTask.
# This means we want to store the reward in the toons setRewardHistory.
finalReward = rewardId if storeReward else 0
progress = 1 if questId == Quests.PHONE_QUEST_ID else 0 # hacky fix to cattlelog quest...
progress = 0
toon.addQuest((questId, npc.getDoId(), toNpcId, rewardId, progress), finalReward)
# Tell the NPC that we assigned this quest to the given toon.
npc.assignQuest(toon.getDoId(), questId, rewardId, toNpcId)

View file

@ -146,6 +146,7 @@ class TutorialManagerAI(DistributedObjectAI):
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)