mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-07 05:33:51 +00:00
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:
parent
8993b8329e
commit
0aff4b155c
1 changed files with 12 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue