Skip to content

Commit

Permalink
AI: Change CreatureStaticFlags::SESSILE impl to mean combat movement
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Jan 1, 2025
1 parent 7e70ff6 commit 07f448d
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))
SetAIImmobilizedState(true);
SetCombatMovement(false);

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->IsRooted() && !m_creature->IsInPanic() && enemy && enemy->IsPlayerControlled())
if (m_creature->GetSettings().HasFlag(CreatureStaticFlags::NO_MELEE_FLEE) && !m_creature->GetSettings().HasFlag(CreatureStaticFlags::SESSILE) && !m_creature->IsRooted() && !m_creature->IsInPanic() && enemy && enemy->IsPlayerControlled())
{
DoFlee(30000);
SetAIOrder(ORDER_CRITTER_FLEE); // mark as critter flee for custom handling
Expand Down

9 comments on commit 07f448d

@insunaa
Copy link
Contributor

@insunaa insunaa commented on 07f448d Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure that it's just combat movement? I spot-checked a few NPCs that have SESSILE flag and many of them are just unmoving NPCs like 14422 or 14449, just invisible trigger NPCs that should never get into combat to begin with.

@killerwife
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. What you are describing is mobs that should have OOC movement set in DB to none. Also, invisible triggers do enter combat in general, they just do not respond to it.

@insunaa
Copy link
Contributor

@insunaa insunaa commented on 07f448d Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

14337 is a summoned NPC Field Repair Bot, it can't enter combat either and has the SESSILE flag. But if it can't enter combat anyway and SESSILE means no combat movement, that flag would be redundant, right? So I don't understand why SESSILE is supposed to be only combat movement and not all movement in general

@killerwife
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wandering Eye of Kilrogg, confirmed to have ooc movement and sessile flag.

@killerwife
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to actually prove something that conflicts with the implementation, not something that works with no problems.

@insunaa
Copy link
Contributor

@insunaa insunaa commented on 07f448d Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? As far as I can tell Wandering Eye of Kilrogg does not have Sessile, it has
1100806

=>

NO_MELEE_FLEE               = 0x00100000, - Does not melee, if capable of moving, flees in combat immediately.
NO_DEFENSE                  = 0x00004000, - NYI
NO_SPELL_DEFENSE            = 0x00008000, - NYI
NO_AUTOMATIC_REGEN          = 0x00000400, - NYI
DESPAWN_INSTANTLY           = 0x00000800, - NYI
NO_XP                       = 0x00000002,
NO_LOOT                     = 0x00000004,

wandering eye of kilrogg    = 0x0010CC06

@killerwife
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never said anything about our db. Our db is not the source for research. You have to actually check sniffs, leaked dbs and others.

@insunaa
Copy link
Contributor

@insunaa insunaa commented on 07f448d Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is what I checked. creaturedifficulty

@killerwife
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fubar

Please sign in to comment.