Fix keyring for low level bots (#1177)

This commit is contained in:
Yunfan Li
2025-04-08 10:11:07 +08:00
committed by GitHub
parent 2f3f8d565c
commit cd5b15ddc1
3 changed files with 7 additions and 2 deletions

View File

@@ -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 ->

View File

@@ -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<uint32> GetCurrentGemsCount();
bool CanEquipArmor(ItemTemplate const* proto);

View File

@@ -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();