fix: dismount cleared all indefinite auras instead of just mount aura

The dismount path wiped every aura with maxDurationMs < 0, which
includes racial passives, tracking, and zone buffs — not just the mount
spell. Now only clears the specific mountAuraSpellId_ so the buff bar
stays accurate without waiting for a server aura resync.
This commit is contained in:
Kelsi 2026-03-29 17:56:59 -07:00
parent 8993b8329e
commit 0aff4b155c

View file

@ -512,9 +512,19 @@ void EntityController::detectPlayerMountChange(uint32_t newMountDisplayId,
LOG_INFO("Mount detected: displayId=", newMountDisplayId, " auraSpellId=", owner_.mountAuraSpellId_);
}
if (old != 0 && newMountDisplayId == 0) {
// Only clear the specific mount aura, not all indefinite auras.
// Previously this cleared every aura with maxDurationMs < 0, which
// would strip racial passives, tracking, and zone buffs on dismount.
uint32_t mountSpell = owner_.mountAuraSpellId_;
owner_.mountAuraSpellId_ = 0;
if (owner_.spellHandler_) for (auto& a : owner_.spellHandler_->playerAuras_)
if (!a.isEmpty() && a.maxDurationMs < 0) a = AuraSlot{};
if (mountSpell != 0 && owner_.spellHandler_) {
for (auto& a : owner_.spellHandler_->playerAuras_) {
if (!a.isEmpty() && a.spellId == mountSpell) {
a = AuraSlot{};
break;
}
}
}
}
}