mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Scripts/Ulduar): Flame Leviathan evade mode if Pursue returns no … (#25000)
This commit is contained in:
@@ -1380,7 +1380,7 @@ public:
|
|||||||
|
|
||||||
bool operator()(WorldObject* target) const
|
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();
|
Creature* creatureTarget = target->ToCreature();
|
||||||
if (!creatureTarget)
|
if (!creatureTarget)
|
||||||
return true;
|
return true;
|
||||||
@@ -1415,12 +1415,7 @@ class spell_pursue : public SpellScript
|
|||||||
void FilterTargets(std::list<WorldObject*>& targets)
|
void FilterTargets(std::list<WorldObject*>& targets)
|
||||||
{
|
{
|
||||||
targets.remove_if(FlameLeviathanPursuedTargetSelector());
|
targets.remove_if(FlameLeviathanPursuedTargetSelector());
|
||||||
if (targets.empty())
|
if (!targets.empty())
|
||||||
{
|
|
||||||
if (Creature* caster = GetCaster()->ToCreature())
|
|
||||||
caster->AI()->EnterEvadeMode();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
//! In the end, only one target should be selected
|
//! In the end, only one target should be selected
|
||||||
WorldObject* _target = Acore::Containers::SelectRandomContainerElement(targets);
|
WorldObject* _target = Acore::Containers::SelectRandomContainerElement(targets);
|
||||||
|
|||||||
Reference in New Issue
Block a user