Merge branch 'liyunfan1223:master' into fix/remove-auras-before-teleport

This commit is contained in:
avirar
2025-10-04 09:42:21 +10:00
committed by GitHub
7 changed files with 191 additions and 277 deletions

View File

@@ -170,26 +170,89 @@ bool MaintenanceAction::Execute(Event event)
botAI->TellMaster("I'm maintaining");
PlayerbotFactory factory(bot, bot->GetLevel());
factory.InitAttunementQuests();
factory.InitBags(false);
factory.InitAmmo();
factory.InitFood();
factory.InitReagents();
factory.InitConsumables();
factory.InitPotions();
factory.InitTalentsTree(true);
factory.InitPet();
factory.InitPetTalents();
factory.InitClassSpells();
factory.InitAvailableSpells();
factory.InitSkills();
factory.InitReputation();
factory.InitSpecialSpells();
factory.InitMounts();
factory.InitGlyphs(false);
factory.InitKeyring();
if (bot->GetLevel() >= sPlayerbotAIConfig->minEnchantingBotLevel)
factory.ApplyEnchantAndGemsNew();
if (!botAI->IsAlt())
{
factory.InitAttunementQuests();
factory.InitBags(false);
factory.InitAmmo();
factory.InitFood();
factory.InitReagents();
factory.InitConsumables();
factory.InitPotions();
factory.InitTalentsTree(true);
factory.InitPet();
factory.InitPetTalents();
factory.InitClassSpells();
factory.InitAvailableSpells();
factory.InitSkills();
factory.InitReputation();
factory.InitSpecialSpells();
factory.InitMounts();
factory.InitGlyphs(false);
factory.InitKeyring();
if (bot->GetLevel() >= sPlayerbotAIConfig->minEnchantingBotLevel)
factory.ApplyEnchantAndGemsNew();
}
else
{
if (sPlayerbotAIConfig->altMaintenanceAttunementQs)
factory.InitAttunementQuests();
if (sPlayerbotAIConfig->altMaintenanceBags)
factory.InitBags(false);
if (sPlayerbotAIConfig->altMaintenanceAmmo)
factory.InitAmmo();
if (sPlayerbotAIConfig->altMaintenanceFood)
factory.InitFood();
if (sPlayerbotAIConfig->altMaintenanceReagents)
factory.InitReagents();
if (sPlayerbotAIConfig->altMaintenanceConsumables)
factory.InitConsumables();
if (sPlayerbotAIConfig->altMaintenancePotions)
factory.InitPotions();
if (sPlayerbotAIConfig->altMaintenanceTalentTree)
factory.InitTalentsTree(true);
if (sPlayerbotAIConfig->altMaintenancePet)
factory.InitPet();
if (sPlayerbotAIConfig->altMaintenancePetTalents)
factory.InitPetTalents();
if (sPlayerbotAIConfig->altMaintenanceClassSpells)
factory.InitClassSpells();
if (sPlayerbotAIConfig->altMaintenanceAvailableSpells)
factory.InitAvailableSpells();
if (sPlayerbotAIConfig->altMaintenanceSkills)
factory.InitSkills();
if (sPlayerbotAIConfig->altMaintenanceReputation)
factory.InitReputation();
if (sPlayerbotAIConfig->altMaintenanceSpecialSpells)
factory.InitSpecialSpells();
if (sPlayerbotAIConfig->altMaintenanceMounts)
factory.InitMounts();
if (sPlayerbotAIConfig->altMaintenanceGlyphs)
factory.InitGlyphs(false);
if (sPlayerbotAIConfig->altMaintenanceKeyring)
factory.InitKeyring();
if (sPlayerbotAIConfig->altMaintenanceGemsEnchants && bot->GetLevel() >= sPlayerbotAIConfig->minEnchantingBotLevel)
factory.ApplyEnchantAndGemsNew();
}
bot->DurabilityRepairAll(false, 1.0f, false);
bot->SendTalentsInfoData(false);