Icecrown gunship strategy

This commit is contained in:
Yunfan Li
2024-09-23 13:58:59 +08:00
parent 2cb6f14dad
commit b87ca9da4c
18 changed files with 344 additions and 39 deletions

View File

@@ -30,6 +30,7 @@ bool ChangeTalentsAction::Execute(Event event)
{
bot->ActivateSpec(0);
out << "Active first talent";
botAI->ResetStrategies();
}
else if (param.find("switch 2") != std::string::npos)
{
@@ -40,6 +41,7 @@ bool ChangeTalentsAction::Execute(Event event)
}
bot->ActivateSpec(1);
out << "Active second talent";
botAI->ResetStrategies();
}
}
else if (param.find("autopick") != std::string::npos)
@@ -47,6 +49,7 @@ bool ChangeTalentsAction::Execute(Event event)
PlayerbotFactory factory(bot, bot->GetLevel());
factory.InitTalentsTree(true);
out << "Auto pick talents";
botAI->ResetStrategies();
}
else if (param.find("spec list") != std::string::npos)
{

View File

@@ -963,20 +963,6 @@ void MovementAction::UpdateMovementState()
{
bot->RemoveUnitMovementFlag(MOVEMENTFLAG_FLYING);
}
Transport* newTransport = bot->GetMap()->GetTransportForPos(bot->GetPhaseMask(), bot->GetPositionX(),
bot->GetPositionY(), bot->GetPositionZ(), bot);
if (newTransport != bot->GetTransport())
{
LOG_DEBUG("playerbots", "Bot {} is on a transport", bot->GetName());
if (bot->GetTransport())
bot->GetTransport()->RemovePassenger(bot, true);
if (newTransport)
newTransport->AddPassenger(bot, true);
bot->StopMovingOnCurrentPos();
}
bot->SendMovementFlagUpdate();
// Temporary speed increase in group