mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Fix keyring for low level bots (#1177)
This commit is contained in:
@@ -491,6 +491,7 @@ void PlayerbotFactory::Refresh()
|
|||||||
InitSpecialSpells();
|
InitSpecialSpells();
|
||||||
InitMounts();
|
InitMounts();
|
||||||
InitKeyring();
|
InitKeyring();
|
||||||
|
InitPotions();
|
||||||
if (bot->GetLevel() >= sPlayerbotAIConfig->minEnchantingBotLevel)
|
if (bot->GetLevel() >= sPlayerbotAIConfig->minEnchantingBotLevel)
|
||||||
{
|
{
|
||||||
ApplyEnchantAndGemsNew();
|
ApplyEnchantAndGemsNew();
|
||||||
@@ -4280,6 +4281,9 @@ void PlayerbotFactory::InitKeyring()
|
|||||||
if (!bot)
|
if (!bot)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (bot->GetLevel() < 70)
|
||||||
|
return;
|
||||||
|
|
||||||
ReputationMgr& repMgr = bot->GetReputationMgr(); // Reference, use . instead of ->
|
ReputationMgr& repMgr = bot->GetReputationMgr(); // Reference, use . instead of ->
|
||||||
|
|
||||||
std::vector<std::pair<uint32, uint32>> keysToCheck;
|
std::vector<std::pair<uint32, uint32>> keysToCheck;
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ public:
|
|||||||
void InitKeyring();
|
void InitKeyring();
|
||||||
void InitReputation();
|
void InitReputation();
|
||||||
void InitAttunementQuests();
|
void InitAttunementQuests();
|
||||||
|
void InitPotions();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Prepare();
|
void Prepare();
|
||||||
@@ -159,7 +160,6 @@ private:
|
|||||||
void ClearInventory();
|
void ClearInventory();
|
||||||
void ClearAllItems();
|
void ClearAllItems();
|
||||||
void ResetQuests();
|
void ResetQuests();
|
||||||
void InitPotions();
|
|
||||||
|
|
||||||
std::vector<uint32> GetCurrentGemsCount();
|
std::vector<uint32> GetCurrentGemsCount();
|
||||||
bool CanEquipArmor(ItemTemplate const* proto);
|
bool CanEquipArmor(ItemTemplate const* proto);
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ bool MaintenanceAction::Execute(Event event)
|
|||||||
factory.InitMounts();
|
factory.InitMounts();
|
||||||
factory.InitGlyphs(true);
|
factory.InitGlyphs(true);
|
||||||
factory.InitKeyring();
|
factory.InitKeyring();
|
||||||
|
factory.InitPotions();
|
||||||
if (bot->GetLevel() >= sPlayerbotAIConfig->minEnchantingBotLevel)
|
if (bot->GetLevel() >= sPlayerbotAIConfig->minEnchantingBotLevel)
|
||||||
factory.ApplyEnchantAndGemsNew();
|
factory.ApplyEnchantAndGemsNew();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user