Core/Creatures: Fix level scaling for summons without SummonPropertiesFlags::UseCreatureLevel
Port From (https://github.com/TrinityCore/TrinityCore/commit/5f6bc9ff5feb090a2ca8a7c0aea79ee14099b454)
This commit is contained in:
@@ -223,7 +223,12 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!m_Properties.HasFlag(SummonPropertiesFlags.UseCreatureLevel))
|
if (!m_Properties.HasFlag(SummonPropertiesFlags.UseCreatureLevel))
|
||||||
SetLevel(unitSummoner.GetLevel());
|
{
|
||||||
|
int minLevel = m_unitData.ScalingLevelMin + m_unitData.ScalingLevelDelta;
|
||||||
|
int maxLevel = m_unitData.ScalingLevelMax + m_unitData.ScalingLevelDelta;
|
||||||
|
uint level = (uint)Math.Clamp(unitSummoner.GetLevel(), minLevel, maxLevel);
|
||||||
|
SetLevel(level);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint faction = m_Properties.Faction;
|
uint faction = m_Properties.Faction;
|
||||||
|
|||||||
Reference in New Issue
Block a user