mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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:
parent
c97898712b
commit
9b2f100387
1 changed files with 2 additions and 0 deletions
|
|
@ -11964,6 +11964,8 @@ void GameHandler::applyUpdateObjectBlock(const UpdateBlock& block, bool& newItem
|
||||||
uint32_t old = currentMountDisplayId_;
|
uint32_t old = currentMountDisplayId_;
|
||||||
currentMountDisplayId_ = val;
|
currentMountDisplayId_ = val;
|
||||||
if (val != old && mountCallback_) mountCallback_(val);
|
if (val != old && mountCallback_) mountCallback_(val);
|
||||||
|
if (val != old && addonEventCallback_)
|
||||||
|
addonEventCallback_("UNIT_MODEL_CHANGED", {"player"});
|
||||||
if (old == 0 && val != 0) {
|
if (old == 0 && val != 0) {
|
||||||
// Just mounted — find the mount aura (indefinite duration, self-cast)
|
// Just mounted — find the mount aura (indefinite duration, self-cast)
|
||||||
mountAuraSpellId_ = 0;
|
mountAuraSpellId_ = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue