diff --git a/src/factory/PlayerbotFactory.cpp b/src/factory/PlayerbotFactory.cpp index f45b525f..ff493666 100644 --- a/src/factory/PlayerbotFactory.cpp +++ b/src/factory/PlayerbotFactory.cpp @@ -491,6 +491,7 @@ void PlayerbotFactory::Refresh() InitSpecialSpells(); InitMounts(); InitKeyring(); + InitPotions(); if (bot->GetLevel() >= sPlayerbotAIConfig->minEnchantingBotLevel) { ApplyEnchantAndGemsNew(); @@ -4279,6 +4280,9 @@ void PlayerbotFactory::InitKeyring() { if (!bot) return; + + if (bot->GetLevel() < 70) + return; ReputationMgr& repMgr = bot->GetReputationMgr(); // Reference, use . instead of -> diff --git a/src/factory/PlayerbotFactory.h b/src/factory/PlayerbotFactory.h index 96fa9cac..fed26fd9 100644 --- a/src/factory/PlayerbotFactory.h +++ b/src/factory/PlayerbotFactory.h @@ -140,7 +140,8 @@ public: void InitKeyring(); void InitReputation(); void InitAttunementQuests(); - + void InitPotions(); + private: void Prepare(); // void InitSecondEquipmentSet(); @@ -159,7 +160,6 @@ private: void ClearInventory(); void ClearAllItems(); void ResetQuests(); - void InitPotions(); std::vector GetCurrentGemsCount(); bool CanEquipArmor(ItemTemplate const* proto); diff --git a/src/strategy/actions/TrainerAction.cpp b/src/strategy/actions/TrainerAction.cpp index 91de174a..e9004c36 100644 --- a/src/strategy/actions/TrainerAction.cpp +++ b/src/strategy/actions/TrainerAction.cpp @@ -181,6 +181,7 @@ bool MaintenanceAction::Execute(Event event) factory.InitMounts(); factory.InitGlyphs(true); factory.InitKeyring(); + factory.InitPotions(); if (bot->GetLevel() >= sPlayerbotAIConfig->minEnchantingBotLevel) factory.ApplyEnchantAndGemsNew();