mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 12:47:07 +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:
@@ -1411,7 +1411,7 @@ public:
|
||||
{
|
||||
alliance_riflemanAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
}
|
||||
|
||||
uint32 ExplodeTimer;
|
||||
|
||||
@@ -84,7 +84,7 @@ struct boss_ayamiss : public BossAI
|
||||
void Reset() override
|
||||
{
|
||||
BossAI::Reset();
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
ScheduleHealthCheckEvent(70, [&] {
|
||||
@@ -127,7 +127,7 @@ struct boss_ayamiss : public BossAI
|
||||
}
|
||||
else if (type == WAYPOINT_MOTION_TYPE && id == POINT_GROUND)
|
||||
{
|
||||
SetCombatMovement(true);
|
||||
me->SetCombatMovement(true);
|
||||
me->SetDisableGravity(false);
|
||||
|
||||
me->m_Events.AddEventAtOffset([this]()
|
||||
|
||||
@@ -188,7 +188,7 @@ struct npc_buru_egg : public ScriptedAI
|
||||
npc_buru_egg(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_instance = me->GetInstanceScript();
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ struct boss_eye_of_cthun : public BossAI
|
||||
{
|
||||
boss_eye_of_cthun(Creature* creature) : BossAI(creature, DATA_CTHUN)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
me->m_SightDistance = 90.f;
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ struct boss_cthun : public BossAI
|
||||
{
|
||||
boss_cthun(Creature* creature) : BossAI(creature, DATA_CTHUN)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -597,7 +597,7 @@ struct npc_eye_tentacle : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
@@ -651,7 +651,7 @@ struct npc_claw_tentacle : public ScriptedAI
|
||||
{
|
||||
npc_claw_tentacle(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
|
||||
if (Creature* portal = me->SummonCreature(NPC_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
{
|
||||
@@ -720,7 +720,7 @@ struct npc_giant_claw_tentacle : public ScriptedAI
|
||||
{
|
||||
npc_giant_claw_tentacle(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
|
||||
if (Creature* portal = me->SummonCreature(NPC_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
{
|
||||
@@ -870,7 +870,7 @@ struct npc_giant_eye_tentacle : public ScriptedAI
|
||||
{
|
||||
npc_giant_eye_tentacle(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
|
||||
if (Creature* portal = me->SummonCreature(NPC_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
{
|
||||
|
||||
@@ -106,7 +106,7 @@ struct boss_ouro : public BossAI
|
||||
{
|
||||
boss_ouro(Creature* creature) : BossAI(creature, DATA_OURO)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
}
|
||||
|
||||
|
||||
@@ -366,7 +366,7 @@ struct npc_toxic_slime : public ScriptedAI
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
DoCastSelf(SPELL_TOXIN);
|
||||
|
||||
InstanceScript* instance = me->GetInstanceScript();
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
{
|
||||
npc_tiger_matriarch_creditAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
events.ScheduleEvent(EVENT_CHECK_SUMMON_AURA, 2s);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user