fix(Scripts/Ulduar): Flame Leviathan evade mode if Pursue returns no … (#25000)
This commit is contained in:
parent
cd2fcac454
commit
7e45da1fec
1 changed files with 2 additions and 7 deletions
|
|
@ -1380,7 +1380,7 @@ public:
|
|||
|
||||
bool operator()(WorldObject* target) const
|
||||
{
|
||||
//! No players, only vehicles (todo: check if blizzlike)
|
||||
//! No players, only vehicles. Pursue is never cast on players.
|
||||
Creature* creatureTarget = target->ToCreature();
|
||||
if (!creatureTarget)
|
||||
return true;
|
||||
|
|
@ -1415,12 +1415,7 @@ class spell_pursue : public SpellScript
|
|||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(FlameLeviathanPursuedTargetSelector());
|
||||
if (targets.empty())
|
||||
{
|
||||
if (Creature* caster = GetCaster()->ToCreature())
|
||||
caster->AI()->EnterEvadeMode();
|
||||
}
|
||||
else
|
||||
if (!targets.empty())
|
||||
{
|
||||
//! In the end, only one target should be selected
|
||||
WorldObject* _target = Acore::Containers::SelectRandomContainerElement(targets);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue