fix(Core/Creature): Prevent combat movement disabled creatures from r… (#18428)

* fix(Core/Creature): Prevent combat movement disabled creatures from repositioning if target moves within model boundary

* fixbuild

* Apply suggestions from code review
This commit is contained in:
Andrew
2024-02-27 10:11:39 -03:00
committed by GitHub
parent b2e2cbfc13
commit 6df652a8dd
32 changed files with 71 additions and 74 deletions

View File

@@ -606,14 +606,14 @@ struct boss_jormungarAI : public ScriptedAI
if( bIsStationary )
{
me->SetNativeDisplayId(_MODEL_MOBILE);
SetCombatMovement(true);
me->SetCombatMovement(true);
if( Unit* victim = me->GetVictim() )
me->GetMotionMaster()->MoveChase(victim);
}
else
{
me->SetNativeDisplayId(_MODEL_STATIONARY);
SetCombatMovement(false);
me->SetCombatMovement(false);
}
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0);
me->CastSpell(me, SPELL_EMERGE_0, false);
@@ -692,7 +692,7 @@ public:
_MODEL_STATIONARY = MODEL_ACIDMAW_STATIONARY;
_MODEL_MOBILE = MODEL_ACIDMAW_MOBILE;
_TYPE_OTHER = TYPE_DREADSCALE;
SetCombatMovement(false);
me->SetCombatMovement(false);
}
};