Skip to content

Commit

Permalink
AI: Fix use of CREATURE_EXTRA_FLAG_NO_MELEE
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Dec 27, 2024
1 parent 892e7df commit 31e0a44
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/game/AI/BaseAI/CreatureAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ CreatureAI::CreatureAI(Creature* creature, uint32 combatActions) :
{
m_dismountOnAggro = !(m_creature->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_MOUNTED_COMBAT);
SetMeleeEnabled(!(m_creature->GetSettings().HasFlag(CreatureStaticFlags::NO_MELEE_FLEE)
|| m_creature->GetSettings().HasFlag(CreatureStaticFlags4::NO_MELEE_APPROACH)));
|| m_creature->GetSettings().HasFlag(CreatureStaticFlags4::NO_MELEE_APPROACH) || m_creature->GetCreatureInfo()->ExtraFlags & CREATURE_EXTRA_FLAG_NO_MELEE));
if (m_creature->GetSettings().HasFlag(CreatureStaticFlags::SESSILE))
SetAIImmobilizedState(true);

SetMeleeEnabled(!(m_creature->GetCreatureInfo()->ExtraFlags & CREATURE_EXTRA_FLAG_NO_MELEE));
if (m_creature->IsNoAggroOnSight())
SetReactState(REACT_DEFENSIVE);
if (m_creature->GetSettings().HasFlag(CreatureStaticFlags2::SPAWN_DEFENSIVE))
Expand Down

0 comments on commit 31e0a44

Please sign in to comment.