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:
parent
fc90cb3f2e
commit
790f444ffa
1 changed files with 11 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue