From 790f444ffac09bfb9193fbd18aa7c2d730a02600 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 11 Dec 2022 20:13:12 -0300 Subject: [PATCH] =?UTF-8?q?fix(Core/Unit):=20properly=20reset=20displayIds?= =?UTF-8?q?=20when=20having=20a=20shapeshift=20au=E2=80=A6=20(#14134)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ariel Silva --- src/server/game/Entities/Unit/Unit.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 95f67a636..15af7bb09 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -16905,18 +16905,27 @@ void Unit::RestoreDisplayId() // first forced transform auras, then shapeshifts, then normal transform // transform aura was found if (handledAuraForced) + { handledAuraForced->HandleEffect(this, AURA_EFFECT_HANDLE_SEND_FOR_CLIENT, true); + return; + } else if (!shapeshiftAura.empty()) // we've found shapeshift { // only one such aura possible at a time if (uint32 modelId = GetModelForForm(GetShapeshiftForm(), shapeshiftAura.front()->GetId())) + { SetDisplayId(modelId); + return; + } } else if (handledAura) + { handledAura->HandleEffect(this, AURA_EFFECT_HANDLE_SEND_FOR_CLIENT, true); + return; + } + // no auras found - set modelid to default - else - SetDisplayId(GetNativeDisplayId()); + SetDisplayId(GetNativeDisplayId()); } void Unit::AddComboPoints(Unit* target, int8 count)