Core/Creatures: Fixed some creatures having 0 max health (and being unkillable)
Port From (https://github.com/TrinityCore/TrinityCore/commit/7f98b71698eca5b136676991026de1d0d212f9fb)
This commit is contained in:
@@ -2738,7 +2738,7 @@ namespace Game.Entities
|
||||
CreatureLevelScaling scaling = cInfo.GetLevelScaling(GetMap().GetDifficultyID());
|
||||
float baseHealth = Global.DB2Mgr.EvaluateExpectedStat(ExpectedStatType.CreatureHealth, level, cInfo.GetHealthScalingExpansion(), scaling.ContentTuningID, (Class)cInfo.UnitClass);
|
||||
|
||||
return (ulong)(baseHealth * cInfo.ModHealth * cInfo.ModHealthExtra);
|
||||
return (ulong)Math.Max(baseHealth * cInfo.ModHealth * cInfo.ModHealthExtra, 1.0f);
|
||||
}
|
||||
|
||||
public override float GetHealthMultiplierForTarget(WorldObject target)
|
||||
|
||||
Reference in New Issue
Block a user