Core/AreaTrigger: Fixed a bug where polygon shaped areatriggers decreased in height for selection depending on at lifetime

Port From (https://github.com/TrinityCore/TrinityCore/commit/2406400811c3a7658897dbf3bec1c0eeee5e598e)
This commit is contained in:
hondacrx
2024-02-01 10:16:28 -05:00
parent 98fe3a286c
commit ae360d67a1
@@ -191,8 +191,14 @@ namespace Game.DataStorage
createProperties.ScriptId = Global.ObjectMgr.GetScriptId(areatriggerCreateProperties.Read<string>(20));
if (shape == AreaTriggerTypes.Polygon)
{
if (createProperties.Shape.PolygonDatas.Height <= 0.0f)
{
createProperties.Shape.PolygonDatas.Height = 1.0f;
if (createProperties.Shape.PolygonDatas.HeightTarget <= 0.0f)
createProperties.Shape.PolygonDatas.HeightTarget = 1.0f;
}
}
createProperties.PolygonVertices = verticesByCreateProperties[createProperties.Id];
createProperties.PolygonVerticesTarget = verticesTargetByCreateProperties[createProperties.Id];