fix(Core/Unit): properly reset displayIds when having a shapeshift au… (#14134)
Co-authored-by: Ariel Silva <ariel-@users.noreply.github.com>
This commit is contained in:
@@ -16905,17 +16905,26 @@ void Unit::RestoreDisplayId()
|
|||||||
// first forced transform auras, then shapeshifts, then normal transform
|
// first forced transform auras, then shapeshifts, then normal transform
|
||||||
// transform aura was found
|
// transform aura was found
|
||||||
if (handledAuraForced)
|
if (handledAuraForced)
|
||||||
|
{
|
||||||
handledAuraForced->HandleEffect(this, AURA_EFFECT_HANDLE_SEND_FOR_CLIENT, true);
|
handledAuraForced->HandleEffect(this, AURA_EFFECT_HANDLE_SEND_FOR_CLIENT, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
else if (!shapeshiftAura.empty()) // we've found shapeshift
|
else if (!shapeshiftAura.empty()) // we've found shapeshift
|
||||||
{
|
{
|
||||||
// only one such aura possible at a time
|
// only one such aura possible at a time
|
||||||
if (uint32 modelId = GetModelForForm(GetShapeshiftForm(), shapeshiftAura.front()->GetId()))
|
if (uint32 modelId = GetModelForForm(GetShapeshiftForm(), shapeshiftAura.front()->GetId()))
|
||||||
|
{
|
||||||
SetDisplayId(modelId);
|
SetDisplayId(modelId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (handledAura)
|
else if (handledAura)
|
||||||
|
{
|
||||||
handledAura->HandleEffect(this, AURA_EFFECT_HANDLE_SEND_FOR_CLIENT, true);
|
handledAura->HandleEffect(this, AURA_EFFECT_HANDLE_SEND_FOR_CLIENT, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// no auras found - set modelid to default
|
// no auras found - set modelid to default
|
||||||
else
|
|
||||||
SetDisplayId(GetNativeDisplayId());
|
SetDisplayId(GetNativeDisplayId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user