Misc fixes

This commit is contained in:
hondacrx
2020-09-03 11:25:42 -04:00
parent 5932dccdc8
commit 2820d45a0d
9 changed files with 37 additions and 20 deletions
@@ -2478,6 +2478,7 @@ namespace Game.Entities
CreatureTemplate cInfo = GetCreatureTemplate();
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);
}
+8
View File
@@ -43,6 +43,14 @@ namespace Game.Entities
posZ = vector.Z;
}
public Position(Position position)
{
posX = position.posX;
posY = position.posY;
posZ = position.posZ;
Orientation = position.Orientation;
}
public float GetPositionX()
{
return posX;
+1 -1
View File
@@ -488,8 +488,8 @@ namespace Game.Entities
if (val == 0)
val = 1;
ulong health = GetHealth();
SetUpdateFieldValue(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.MaxHealth), val);
ulong health = GetHealth();
// group update
if (IsTypeId(TypeId.Player))