Maintenance config for altbots (#1693)

* Maintenance config controls

bools in config

* Update TrainerAction.cpp

removed some note-to-selfs (personal config preferences)

* Set default to true

Also tidied up some comments

* Update playerbots.conf.dist

* Reorganised

Changed the description in conf to be less conversational.

Rearranged the order that options are arranged, grouping by what made sense to me (the type of gameplay made easier/skipped by the option being enabled).

Rearranged the order the variables and method calls are listed in the code to match the order they are presented in the conf to make future maintenance of maintenance (:P) more intuitive.

* Update playerbots.conf.dist

Revert previous commit (change to call order in MaintenanceAction::Execute)

conf settings grouped
This commit is contained in:
IainD92
2025-10-03 10:56:16 +01:00
committed by GitHub
parent ffa8c6d94a
commit f2b5580495
4 changed files with 151 additions and 20 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);