Core/AreaTriggers: Added ActionSet flags for serverside areatriggers

Port From (https://github.com/TrinityCore/TrinityCore/commit/1426f58ff007eac2d9719b41f9189d82b733789e)
This commit is contained in:
Hondacrx
2024-09-01 17:25:52 -04:00
parent 3945a662eb
commit 382b983820
9 changed files with 101 additions and 22 deletions
@@ -104,8 +104,8 @@ namespace Game.DataStorage
Log.outInfo(LogFilter.ServerLoading, "Loaded 0 AreaTrigger splines. DB table `areatrigger_create_properties_spline_point` is empty.");
}
// 0 1 2
SQLResult templates = DB.World.Query("SELECT Id, IsCustom, Flags FROM `areatrigger_template`");
// 0 1 2 3 4
SQLResult templates = DB.World.Query("SELECT Id, IsCustom, Flags, ActionSetId, ActionSetFlags FROM `areatrigger_template`");
if (!templates.IsEmpty())
{
do
@@ -113,6 +113,8 @@ namespace Game.DataStorage
AreaTriggerTemplate areaTriggerTemplate = new();
areaTriggerTemplate.Id = new(templates.Read<uint>(0), templates.Read<bool>(1));
areaTriggerTemplate.Flags = (AreaTriggerFlag)templates.Read<uint>(2);
areaTriggerTemplate.ActionSetId = templates.Read<uint>(3);
areaTriggerTemplate.ActionSetFlags = (AreaTriggerActionSetFlag)templates.Read<uint>(4);
areaTriggerTemplate.Actions = actionsByAreaTrigger[areaTriggerTemplate.Id];
_areaTriggerTemplateStore[areaTriggerTemplate.Id] = areaTriggerTemplate;