mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
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:
@@ -235,7 +235,7 @@ struct npc_amanitar_mushrooms : public ScriptedAI
|
||||
{
|
||||
npc_amanitar_mushrooms(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
|
||||
//TODO: this prolly needs to be done in database
|
||||
pCreature->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
@@ -295,7 +295,7 @@ struct boss_jedoga_shadowseeker : public BossAI
|
||||
{
|
||||
if (!ritualTriggered && me->HealthBelowPctDamaged(55, damage) && events.IsInPhase(PHASE_NORMAL))
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
me->AttackStop();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
@@ -368,7 +368,7 @@ struct boss_jedoga_shadowseeker : public BossAI
|
||||
me->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL);
|
||||
me->RemoveAurasDueToSpell(SPELL_LIGHTNING_BOLTS);
|
||||
me->RemoveAurasDueToSpell(SPELL_HOVER_FALL);
|
||||
SetCombatMovement(true);
|
||||
me->SetCombatMovement(true);
|
||||
|
||||
me->SetDisableGravity(false);
|
||||
me->SetHover(false);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1525,7 +1525,7 @@ public:
|
||||
{
|
||||
boss_yoggsaron_crusher_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
me->CastSpell(me, SPELL_CRUSH, true);
|
||||
me->CastSpell(me, SPELL_FOCUSED_ANGER, true);
|
||||
me->CastSpell(me, SPELL_DIMINISH_POWER, false);
|
||||
@@ -1587,7 +1587,7 @@ public:
|
||||
{
|
||||
boss_yoggsaron_corruptor_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
}
|
||||
|
||||
void DoAction(int32 param) override
|
||||
@@ -1644,7 +1644,7 @@ public:
|
||||
{
|
||||
boss_yoggsaron_constrictor_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
_checkTimer = 1;
|
||||
_playerGUID.Clear();
|
||||
}
|
||||
|
||||
@@ -1049,7 +1049,7 @@ public:
|
||||
{
|
||||
npc_warmage_coldarraAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
}
|
||||
|
||||
uint32 m_uiTimer; //Timer until recast
|
||||
|
||||
@@ -147,7 +147,7 @@ struct npc_warmage_violetstand : public ScriptedAI
|
||||
{
|
||||
npc_warmage_violetstand(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
}
|
||||
|
||||
ObjectGuid targetGUID;
|
||||
|
||||
@@ -1532,7 +1532,7 @@ public:
|
||||
{
|
||||
npc_guardian_pavilionAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
@@ -1596,7 +1596,7 @@ public:
|
||||
{
|
||||
npc_tournament_training_dummyAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
|
||||
}
|
||||
|
||||
@@ -1816,7 +1816,7 @@ public:
|
||||
PhaseCount = 0;
|
||||
Summons.DespawnAll();
|
||||
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
|
||||
Reference in New Issue
Block a user