Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
davidonete committed Dec 20, 2023
1 parent dc2220d commit 751fa02
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions playerbot/strategy/actions/MovementActions.cpp
Original file line number Diff line number Diff line change
@@ -1622,7 +1622,7 @@ bool MovementAction::Flee(Unit *target)
return false;
}

HostileReference *ref = sServerFacade.GetThreatManager(target).getCurrentVictim();
HostileReference* ref = sServerFacade.GetThreatManager(target).getCurrentVictim();
const bool isTarget = ref && ref->getTarget() == bot;

time_t lastFlee = AI_VALUE(LastMovement&, "last movement").lastFlee;
@@ -1631,7 +1631,9 @@ bool MovementAction::Flee(Unit *target)

// let hunter kite mob
if (isTarget && bot->getClass() == CLASS_HUNTER)
{
fleeDelay = 1;
}

if (lastFlee && sServerFacade.isMoving(bot))
{
@@ -1647,9 +1649,6 @@ bool MovementAction::Flee(Unit *target)
const bool isRanged = ai->IsRanged(bot);
const bool needHealer = !isHealer && AI_VALUE2(uint8, "health", "self target") < 50;

HostileReference *ref = sServerFacade.GetThreatManager(target).getCurrentVictim();
const bool isTarget = ref && ref->getTarget() == bot;

Unit* fleeTarget = nullptr;
Group* group = bot->GetGroup();
if (group)

0 comments on commit 751fa02

Please sign in to comment.