Skip to content

fix(Core/Player): dismount flying mounts entering strict no-fly zones#26430

Closed
Chinoske wants to merge 1 commit into
azerothcore:masterfrom
Chinoske:fix/dalaran-no-fly-zone-dismount-26346
Closed

fix(Core/Player): dismount flying mounts entering strict no-fly zones#26430
Chinoske wants to merge 1 commit into
azerothcore:masterfrom
Chinoske:fix/dalaran-no-fly-zone-dismount-26346

Conversation

@Chinoske

@Chinoske Chinoske commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Root cause

Closes #26346

Player::UpdateAreaDependentAuras() checks area-limited auras via SpellInfo::CheckLocation(..., strict=false). strict=false deliberately skips the AREA_FLAG_NO_FLY_ZONE check, so other area-limited auras aren't dropped over a technicality — but it also means a flying mount already active (cast before entering a no-fly zone, or still active on reconnect/relogin) is never re-validated against that flag. IsFlyable() alone doesn't catch it either, since Dalaran is flyable terrain that's additionally flagged as a no-fly zone.

Symptom reported in #26346: a player flying a mount over Dalaran who closes the client and reconnects (especially a fast reconnect, which reuses the live in-memory Player object and skips a full DB reload) ends up stuck flying with no mount, since nothing ever re-validates the mount against the zone.

Fix

Added a dedicated strict re-check for SPELL_AURA_MOUNTED right after the existing lenient loop in UpdateAreaDependentAuras():

  • Remove the mount aura and clear CanFly() if strict CheckLocation fails.
  • Cast the same VEHICLE_SPELL_PARACHUTE safe-descent spell AzerothCore already uses when a flying vehicle passenger is force-ejected mid-air (Vehicle::RemovePassenger), so the forced dismount doesn't cause fall damage.

Since UpdateAreaDependentAuras() runs on every area change (not just login), this fixes the bug at its actual source instead of patching individual login code paths: a flying mount now gets stripped the instant it's active in a strict no-fly zone's airspace, regardless of how the player got there (normal flight, GM .cast, or any login/reconnect path). The invalid "flying mounted in a no-fly zone" state can no longer persist even momentarily, so there's nothing left to break on a subsequent disconnect/reconnect.

How Has This Been Tested?

Local RelWithDebInfo build, live server testing:

  1. .cast 32239 (Ebon Gryphon) while standing in Dalaran (Krasus' Landing) — mount is immediately removed, CanFly cleared, safe parachute descent (no fall damage).
  2. Full original repro: mount + fly over Dalaran, close client mid-flight, reconnect (both fast reconnect and normal reload) — player no longer ends up stuck flying without a mount.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (N/A - no doc change needed)

Player::UpdateAreaDependentAuras() intentionally checks area-limited
auras with CheckLocation(strict=false), which skips the
AREA_FLAG_NO_FLY_ZONE check so unrelated area-limited auras aren't
dropped over a technicality. That means a flying mount already active
(e.g. cast before entering, or restored on reconnect) is never
re-validated against a zone's no-fly flag, since IsFlyable() alone
doesn't catch it (Dalaran is flyable terrain but explicitly flagged
no-fly).

Add a dedicated strict re-check for SPELL_AURA_MOUNTED right after the
existing lenient loop: remove the mount and clear CanFly() if it fails
strict CheckLocation, and cast the same Parachute safe-descent spell
already used when a flying vehicle passenger is force-ejected
(Vehicle::RemovePassenger), so the forced dismount doesn't cause fall
damage. Runs on the continuous per-area-update path, so it applies
regardless of how the player got into the no-fly zone while mounted
(normal flight, GM cast, or any login/reconnect path).

Fixes azerothcore#26346
@github-actions github-actions Bot added CORE Related to the core file-cpp Used to trigger the matrix build labels Jul 3, 2026
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 802c3960-26de-46dc-a689-293f3d28e8d0

📥 Commits

Reviewing files that changed from the base of the PR and between b0eaad2 and ff6482c.

📒 Files selected for processing (1)
  • src/server/game/Entities/Player/PlayerUpdates.cpp

📝 Walkthrough

Walkthrough

Added a revalidation step for mount auras in Player::UpdateAreaDependentAuras. The mount spell's location is checked against the current map/zone/area, and if invalid, the mount aura is removed; if the player was flying, flight is disabled and a parachute spell is cast to force descent.

Changes

Mount Aura Area Revalidation

Layer / File(s) Summary
Mount aura location check and parachute fallback
src/server/game/Entities/Player/PlayerUpdates.cpp
Adds a check of the mount spell's location validity within area-dependent aura updates; removes invalid mount auras and, if flying, disables flight and casts the parachute vehicle spell.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Suggested labels: To Be Merged

Suggested reviewers: sudlud

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main fix for flying mounts in strict no-fly zones.
Description check ✅ Passed The description covers the root cause, fix, linked issue, testing, and checklist, though the template headings are not fully mirrored.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

CORE Related to the core file-cpp Used to trigger the matrix build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Core] - You're able to Fly in Dalaran without any restrictions

1 participant