mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-14 16:03:45 +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:
@@ -45,7 +45,7 @@ struct boss_quartermaster_zigris : public BossAI
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
_hasDrunkPotion = false;
|
||||
}
|
||||
|
||||
@@ -120,11 +120,11 @@ struct boss_quartermaster_zigris : public BossAI
|
||||
{
|
||||
DoCastVictim(SPELL_SHOOT);
|
||||
me->GetMotionMaster()->Clear();
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
}
|
||||
else if (!me->IsWithinLOSInMap(me->GetVictim()))
|
||||
{
|
||||
SetCombatMovement(true);
|
||||
me->SetCombatMovement(true);
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ public:
|
||||
Talk(SAY_GAMESBEGIN_2);
|
||||
|
||||
DoCast(me, SPELL_NEFARIANS_BARRIER);
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
me->SetImmuneToPC(false);
|
||||
AttackStart(SelectTarget(SelectTargetMethod::Random, 0, 200.f, true));
|
||||
events.ScheduleEvent(EVENT_SHADOWBLINK, 500ms);
|
||||
|
||||
@@ -159,7 +159,7 @@ struct boss_dorothee : public ScriptedAI
|
||||
{
|
||||
boss_dorothee(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
//this is kinda a big no-no. but it will prevent her from moving to chase targets. she should just cast her spells. in this case, since there is not really something to LOS her with or get out of range this would work. but a more elegant solution would be better
|
||||
|
||||
instance = creature->GetInstanceScript();
|
||||
|
||||
@@ -123,7 +123,7 @@ struct boss_jeklik : public BossAI
|
||||
|
||||
me->SetDisableGravity(false);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
BossAI::SetCombatMovement(false);
|
||||
BossAI::me->SetCombatMovement(false);
|
||||
batRidersCount = 0;
|
||||
|
||||
DoCastSelf(SPELL_GREEN_CHANNELING, true);
|
||||
@@ -148,7 +148,7 @@ struct boss_jeklik : public BossAI
|
||||
BossAI::PathEndReached(pathId);
|
||||
|
||||
me->SetDisableGravity(false);
|
||||
SetCombatMovement(true);
|
||||
me->SetCombatMovement(true);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
//
|
||||
|
||||
@@ -2168,7 +2168,7 @@ public:
|
||||
{
|
||||
boss_blight_wormAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
{
|
||||
npc_andorhal_towerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
me->SetCombatMovement(false);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
|
||||
Reference in New Issue
Block a user