Core/AreaTriggers: Implement missing functionality

* Scale curves are now taken into account when searching for units inside
* Implemented SpellModOp::Radius for areatrigger radius
* Implemented OverrideMoveCurve updatefields - overrides areatrigger position
* Implemented FacingCurve and AREATRIGGER_FLAG_HAS_ABSOLUTE_ORIENTATION
* Implemented ***Target fields for all shape types
* Fixed facing calculation for areatriggers with spline movement
Port From (https://github.com/TrinityCore/TrinityCore/commit/c676d1477239aec4d0b235a410e5627a7070a86e)
This commit is contained in:
hondacrx
2024-01-30 21:14:55 -05:00
parent 804bc30581
commit 5e46dd951b
6 changed files with 344 additions and 101 deletions
@@ -196,6 +196,12 @@ namespace Game.DataStorage
createProperties.PolygonVertices = verticesByCreateProperties[createProperties.Id];
createProperties.PolygonVerticesTarget = verticesTargetByCreateProperties[createProperties.Id];
if (!createProperties.PolygonVerticesTarget.Empty() && createProperties.PolygonVertices.Count != createProperties.PolygonVerticesTarget.Count)
{
Log.outError(LogFilter.Sql, $"Table `areatrigger_create_properties_polygon_vertex` has invalid target vertices, either all or none vertices must have a corresponding target vertex (AreaTriggerCreatePropertiesId: {createProperties.Id}).");
createProperties.PolygonVerticesTarget.Clear();
}
createProperties.SplinePoints = splinesByCreateProperties[createProperties.Id];
_areaTriggerCreateProperties[createProperties.Id] = createProperties;