mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
fix(Core/Auras): SPELL_AURA_MOD_SCALE should scale additively instead… (#14425)
...multiplicatively Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -16864,6 +16864,14 @@ bool Unit::IsPolymorphed() const
|
||||
return spellInfo->GetSpellSpecific() == SPELL_SPECIFIC_MAGE_POLYMORPH;
|
||||
}
|
||||
|
||||
void Unit::RecalculateObjectScale()
|
||||
{
|
||||
int32 scaleAuras = GetTotalAuraModifier(SPELL_AURA_MOD_SCALE) + GetTotalAuraModifier(SPELL_AURA_MOD_SCALE_2);
|
||||
float scale = GetNativeObjectScale() + CalculatePct(1.0f, scaleAuras);
|
||||
float scaleMin = GetTypeId() == TYPEID_PLAYER ? 0.1f : 0.01f;
|
||||
SetObjectScale(std::max(scale, scaleMin));
|
||||
}
|
||||
|
||||
void Unit::SetDisplayId(uint32 modelId)
|
||||
{
|
||||
SetUInt32Value(UNIT_FIELD_DISPLAYID, modelId);
|
||||
|
||||
Reference in New Issue
Block a user