Skip to content

Commit

Permalink
Revert "AI: Change CreatureStaticFlags::SESSILE impl to mean combat m…
Browse files Browse the repository at this point in the history
…ovement"

This reverts commit 07f448d.
  • Loading branch information
killerwife committed Jan 1, 2025
1 parent 07f448d commit 480f9b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game/AI/BaseAI/CreatureAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CreatureAI::CreatureAI(Creature* creature, uint32 combatActions) :
SetMeleeEnabled(!(m_creature->GetSettings().HasFlag(CreatureStaticFlags::NO_MELEE_FLEE)
|| m_creature->GetSettings().HasFlag(CreatureStaticFlags4::NO_MELEE_APPROACH) || m_creature->GetCreatureInfo()->ExtraFlags & CREATURE_EXTRA_FLAG_NO_MELEE));
if (m_creature->GetSettings().HasFlag(CreatureStaticFlags::SESSILE))
SetCombatMovement(false);
SetAIImmobilizedState(true);

if (m_creature->IsNoAggroOnSight())
SetReactState(REACT_DEFENSIVE);
Expand All @@ -57,7 +57,7 @@ void CreatureAI::EnterCombat(Unit* enemy)
{
UnitAI::EnterCombat(enemy);
// TODO: Monitor this condition to see if it conflicts with any pets
if (m_creature->GetSettings().HasFlag(CreatureStaticFlags::NO_MELEE_FLEE) && !m_creature->GetSettings().HasFlag(CreatureStaticFlags::SESSILE) && !m_creature->IsRooted() && !m_creature->IsInPanic() && enemy && enemy->IsPlayerControlled())
if (m_creature->GetSettings().HasFlag(CreatureStaticFlags::NO_MELEE_FLEE) && !m_creature->IsRooted() && !m_creature->IsInPanic() && enemy && enemy->IsPlayerControlled())
{
DoFlee(30000);
SetAIOrder(ORDER_CRITTER_FLEE); // mark as critter flee for custom handling
Expand Down

0 comments on commit 480f9b4

Please sign in to comment.