Skip to content

Core/AreaTriggers: Handle exit areatrigger on player map change #31077

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mdX7
Copy link
Member

@mdX7 mdX7 commented Jun 15, 2025

Tests performed:

(Does it build, tested in-game, etc.)
tested ingame using Telash Greywing Frostbomb (spell 387149) in Azure Vault and then teleporting to barrens

@@ -1418,6 +1418,9 @@ bool Player::TeleportTo(TeleportLocation const& teleportLocation, TeleportToOpti
// remove all areatriggers entities
RemoveAllAreaTriggers();

// exit all areatriggers the unit is in
ExitAllAreaTriggers();
Copy link
Contributor

Choose a reason for hiding this comment

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

including those that are attached to the player teleporting? what if there's no map change aura interrupt flag for an aura auratrigger

Copy link
Member Author

Choose a reason for hiding this comment

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

thats pretty much the reason of this pr. Currently you can enter an areatrigger (e.g. Telash Frostbomb) and teleport to barrens and still keep the debuff. This PR prevents that

Copy link
Contributor

@Nyr97 Nyr97 Jun 15, 2025

Choose a reason for hiding this comment

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

my worry is that there might be aura areatriggers that aren't supposed to be removed from the unit (in this case a player) regardless of map change, unless there's proof that they're always removed and re-cast when they get into the new map if they happen to be the caster


void Unit::ExitAllAreaTriggers()
{
for (AreaTrigger* at : m_insideAreaTriggers)
Copy link
Member

@Shauren Shauren Jun 19, 2025

Choose a reason for hiding this comment

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

Will crash, HandleUnitExit calls ExitAreaTrigger which invalidates iterators (including .end())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants