mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 17:09:08 +00:00
Maintenance command
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "TrainerAction.h"
|
||||
#include "BudgetValues.h"
|
||||
#include "Event.h"
|
||||
#include "PlayerbotFactory.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
void TrainerAction::Learn(uint32 cost, TrainerSpell const* tSpell, std::ostringstream& msg)
|
||||
@@ -146,3 +147,24 @@ void TrainerAction::TellFooter(uint32 totalCost)
|
||||
botAI->TellMaster(out);
|
||||
}
|
||||
}
|
||||
|
||||
bool MaintenanceAction::Execute(Event event)
|
||||
{
|
||||
if (!sPlayerbotAIConfig->maintenanceCommand)
|
||||
return false;
|
||||
botAI->TellMaster("maintenance");
|
||||
PlayerbotFactory factory(bot, bot->GetLevel());
|
||||
factory.InitBags(false);
|
||||
factory.InitAmmo();
|
||||
factory.InitFood();
|
||||
factory.InitReagents();
|
||||
factory.InitTalentsTree(true);
|
||||
factory.InitPet();
|
||||
factory.InitPetTalents();
|
||||
factory.InitClassSpells();
|
||||
factory.InitAvailableSpells();
|
||||
factory.InitSkills();
|
||||
factory.InitMounts();
|
||||
bot->DurabilityRepairAll(false, 1.0f, false);
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user