diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index d297de82..8a8becd4 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -149,6 +149,8 @@ void PlayerbotFactory::Randomize(bool incremental) if (pmo) pmo->finish(); */ + InitInstanceQuests(); + bot->GiveLevel(level); if (sPlayerbotAIConfig->randomBotPreQuests) { @@ -2181,6 +2183,24 @@ void PlayerbotFactory::InitQuests(std::list& questMap) ClearInventory(); } +void PlayerbotFactory::InitInstanceQuests() +{ + // The Caverns of Time + if (bot->GetLevel() >= 64) { + uint32 questId = 10277; + Quest const *quest = sObjectMgr->GetQuestTemplate(questId); + bot->SetQuestStatus(questId, QUEST_STATUS_COMPLETE); + bot->RewardQuest(quest, 0, bot, false); + } + // Return to Andormu + if (bot->GetLevel() >= 66) { + uint32 questId = 10285; + Quest const *quest = sObjectMgr->GetQuestTemplate(questId); + bot->SetQuestStatus(questId, QUEST_STATUS_COMPLETE); + bot->RewardQuest(quest, 0, bot, false); + } +} + void PlayerbotFactory::ClearInventory() { DestroyItemsVisitor visitor(bot); diff --git a/src/PlayerbotFactory.h b/src/PlayerbotFactory.h index 551ad136..3c8f010f 100644 --- a/src/PlayerbotFactory.h +++ b/src/PlayerbotFactory.h @@ -138,6 +138,7 @@ class PlayerbotFactory : public InventoryAction void InitTalents(uint32 specNo); void InitTalentsByTemplate(uint32 specNo); void InitQuests(std::list& questMap); + void InitInstanceQuests(); void ClearInventory(); void ClearAllItems(); void ResetQuests();