Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StaticFlags: Implement NO_MELEE_APPROACH #539

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

insunaa
Copy link
Contributor

@insunaa insunaa commented Aug 9, 2024

🍰 Pullrequest

This PR implements CreatureStaticFlags4::NO_MELEE_APPROACH

@insunaa
Copy link
Contributor Author

insunaa commented Aug 9, 2024

This could also mean the exact opposite: Melee combat is disabled, but the Creature tries to run into melee range, similar to NO_MELEE_FLEE except it approaches instead of flees. I'm not sure

@Shauren
Copy link
Contributor

Shauren commented Aug 9, 2024

The proper name of this flag is No Melee (Approach) - autoattacks are disabled but creatures chase as-if it wasnt

No Melee (Flee) - autoattacks are disabled and creature runs away (the critter behavior) there are no non-critter and non-pet creatures before cataclysm that use this flag (fleeing part of this flag is disabled/overriden if the creature is a pet (including pet of another creature, not just player)

Cataclysm has one https://www.wowhead.com/npc=40168/corrupted-dryad

@insunaa
Copy link
Contributor Author

insunaa commented Aug 9, 2024

Thanks a lot, I'll update the code!

@@ -35,6 +35,7 @@ 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));
SetMeleeEnabled(!m_creature->GetSettings().HasFlag(CreatureStaticFlags4::NO_MELEE_APPROACH));
Copy link
Contributor

Choose a reason for hiding this comment

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

Set it just once lol

@killerwife killerwife merged commit 6bfa5f5 into cmangos:master Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants