mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-18 19:25:44 +00:00
Movement priority
This commit is contained in:
@@ -87,7 +87,7 @@ bool SummonAction::Execute(Event event)
|
||||
if (master->GetSession()->GetSecurity() >= SEC_PLAYER)
|
||||
{
|
||||
// botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Set({});
|
||||
SET_AI_VALUE(std::list<FleeInfo>, "recently flee info", {});
|
||||
AI_VALUE(std::list<FleeInfo>&, "recently flee info").clear();
|
||||
return Teleport(master, bot);
|
||||
}
|
||||
|
||||
@@ -215,10 +215,12 @@ bool SummonAction::Teleport(Player* summoner, Player* player)
|
||||
bool revive =
|
||||
sPlayerbotAIConfig->reviveBotWhenSummoned == 2 ||
|
||||
(sPlayerbotAIConfig->reviveBotWhenSummoned == 1 && !master->IsInCombat() && master->IsAlive());
|
||||
|
||||
if (bot->isDead() && revive)
|
||||
{
|
||||
bot->ResurrectPlayer(1.0f, false);
|
||||
botAI->TellMasterNoFacing("I live, again!");
|
||||
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Set({});
|
||||
}
|
||||
|
||||
player->GetMotionMaster()->Clear();
|
||||
|
||||
Reference in New Issue
Block a user