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

This commit is contained in:
ModoX
2023-10-13 01:48:27 +02:00
parent 32af4bf8fa
commit 2406400811

View File

@@ -233,8 +233,14 @@ void AreaTriggerDataStore::LoadAreaTriggerTemplates()
createProperties.ScriptId = sObjectMgr->GetScriptId(fields[20].GetString());
if (shape == AREATRIGGER_TYPE_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 = std::move(verticesByCreateProperties[createProperties.Id]);
createProperties.PolygonVerticesTarget = std::move(verticesTargetByCreateProperties[createProperties.Id]);