diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 2098fdaaad3..236788de292 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -3077,8 +3077,6 @@ float Creature::GetHealthMultiplierForTarget(WorldObject const* target) const return 1.0f; uint8 levelForTarget = GetLevelForTarget(target); - if (GetLevel() < levelForTarget) - return 1.0f; return double(GetMaxHealthByLevel(levelForTarget)) / double(GetCreateHealth()); } @@ -3122,12 +3120,6 @@ uint8 Creature::GetLevelForTarget(WorldObject const* target) const { if (Unit const* unitTarget = target->ToUnit()) { - if (isWorldBoss()) - { - uint8 level = unitTarget->GetLevel() + sWorld->getIntConfig(CONFIG_WORLD_BOSS_LEVEL_DIFF); - return RoundToInterval<uint8>(level, 1u, 255u); - } - // If this creature should scale level, adapt level depending of target level // between UNIT_FIELD_SCALING_LEVEL_MIN and UNIT_FIELD_SCALING_LEVEL_MAX if (HasScalableLevels()) @@ -3136,9 +3128,7 @@ uint8 Creature::GetLevelForTarget(WorldObject const* target) const int32 scalingLevelMax = m_unitData->ScalingLevelMax; int32 scalingLevelDelta = m_unitData->ScalingLevelDelta; uint8 scalingFactionGroup = m_unitData->ScalingFactionGroup; - int32 targetLevel = unitTarget->m_unitData->EffectiveLevel; - if (!targetLevel) - targetLevel = unitTarget->GetLevel(); + int32 targetLevel = unitTarget->GetEffectiveLevel(); int32 targetLevelDelta = 0; |