diff --git a/src/factory/PlayerbotFactory.cpp b/src/factory/PlayerbotFactory.cpp index eb4ee127..9a980971 100644 --- a/src/factory/PlayerbotFactory.cpp +++ b/src/factory/PlayerbotFactory.cpp @@ -78,6 +78,19 @@ void PlayerbotFactory::Init() if (!quest->GetRequiredClasses() || quest->IsRepeatable() || quest->GetMinLevel() < 10) continue; + + if (quest->GetRewSpellCast() > 0) + { + int32 spellId = quest->GetRewSpellCast(); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); + if (!spellInfo) + continue; + } else if (quest->GetRewSpell() > 0) { + int32 spellId = quest->GetRewSpell(); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); + if (!spellInfo) + continue; + } AddPrevQuests(questId, classQuestIds); classQuestIds.remove(questId); @@ -381,7 +394,7 @@ void PlayerbotFactory::Randomize(bool incremental) if (bot->GetLevel() >= 70) { pmo = sPerformanceMonitor->start(PERF_MON_RNDBOT, "PlayerbotFactory_Arenas"); - LOG_INFO("playerbots", "Initializing arena teams..."); + // LOG_INFO("playerbots", "Initializing arena teams..."); InitArenaTeam(); if (pmo) pmo->finish(); @@ -2723,9 +2736,9 @@ void PlayerbotFactory::InitQuests(std::list& questMap) bot->SetQuestStatus(questId, QUEST_STATUS_COMPLETE); bot->RewardQuest(quest, 0, bot, false); - LOG_INFO("playerbots", "Bot {} ({} level) rewarded quest {}: {} (MinLevel={}, QuestLevel={})", - bot->GetName().c_str(), bot->GetLevel(), questId, quest->GetTitle().c_str(), quest->GetMinLevel(), - quest->GetQuestLevel()); + // LOG_INFO("playerbots", "Bot {} ({} level) rewarded quest {}: {} (MinLevel={}, QuestLevel={})", + // bot->GetName().c_str(), bot->GetLevel(), questId, quest->GetTitle().c_str(), quest->GetMinLevel(), + // quest->GetQuestLevel()); if (!(count++ % 10)) ClearInventory(); @@ -2738,7 +2751,7 @@ void PlayerbotFactory::InitInstanceQuests() { // Yunfan: use configuration instead of hard code uint32 currentXP = bot->GetUInt32Value(PLAYER_XP); - LOG_INFO("playerbots", "Initializing quests..."); + // LOG_INFO("playerbots", "Initializing quests..."); InitQuests(classQuestIds); InitQuests(specialQuestIds);