Skip to content

Commit

Permalink
StaticFlags: Implement NO_MELEE_APPROACH (#539)
Browse files Browse the repository at this point in the history
* StaticFlags: Implement NO_MELEE_APPROACH

* StaticFlags: Fix meaning of No Melee (Approach)

* StaticFlags: Only use SetMeleeEnabled once
  • Loading branch information
insunaa authored Oct 7, 2024
1 parent 081d066 commit 6bfa5f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/game/AI/BaseAI/CreatureAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ CreatureAI::CreatureAI(Creature* creature, uint32 combatActions) :
m_deathPrevented(false), m_followAngle(0.f), m_followDist(0.f)
{
m_dismountOnAggro = !(m_creature->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_MOUNTED_COMBAT);
SetMeleeEnabled(!m_creature->GetSettings().HasFlag(CreatureStaticFlags::NO_MELEE_FLEE));
SetMeleeEnabled(!(m_creature->GetSettings().HasFlag(CreatureStaticFlags::NO_MELEE_FLEE)
|| m_creature->GetSettings().HasFlag(CreatureStaticFlags4::NO_MELEE_APPROACH)));
if (m_creature->GetSettings().HasFlag(CreatureStaticFlags::SESSILE))
SetAIImmobilizedState(true);

Expand Down

0 comments on commit 6bfa5f5

Please sign in to comment.