feat: fire UNIT_MODEL_CHANGED on mount display changes

Fire UNIT_MODEL_CHANGED for the player when mount display ID changes
(mounting or dismounting). Mount addons and portrait addons now get
notified when the player's visual model switches between ground and
mounted form.
This commit is contained in:
Kelsi 2026-03-21 09:53:32 -07:00
parent c97898712b
commit 9b2f100387

View file

@ -11964,6 +11964,8 @@ void GameHandler::applyUpdateObjectBlock(const UpdateBlock& block, bool& newItem
uint32_t old = currentMountDisplayId_;
currentMountDisplayId_ = val;
if (val != old && mountCallback_) mountCallback_(val);
if (val != old && addonEventCallback_)
addonEventCallback_("UNIT_MODEL_CHANGED", {"player"});
if (old == 0 && val != 0) {
// Just mounted — find the mount aura (indefinite duration, self-cast)
mountAuraSpellId_ = 0;