Core/AreaTriggers: Move ScriptName from areatrigger_template to areatrigger_create_properties and areatrigger tables
Port From (https://github.com/TrinityCore/TrinityCore/commit/77ddb4da816b4dfc7ff03b79b88b5ca80918bc2d)
This commit is contained in:
@@ -225,6 +225,8 @@ namespace Game.Entities
|
||||
|
||||
public override bool LoadFromDB(ulong spawnId, Map map, bool addToMap, bool allowDuplicate)
|
||||
{
|
||||
_spawnId = spawnId;
|
||||
|
||||
AreaTriggerSpawn position = Global.AreaTriggerDataStorage.GetAreaTriggerSpawn(spawnId);
|
||||
if (position == null)
|
||||
return false;
|
||||
@@ -499,7 +501,13 @@ namespace Game.Entities
|
||||
|
||||
public uint GetScriptId()
|
||||
{
|
||||
return GetTemplate() != null ? GetTemplate().ScriptId : 0;
|
||||
if (_spawnId != 0)
|
||||
return Global.AreaTriggerDataStorage.GetAreaTriggerSpawn(_spawnId).ScriptId;
|
||||
|
||||
if (GetCreateProperties() != null)
|
||||
return GetCreateProperties().ScriptId;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Unit GetCaster()
|
||||
@@ -1051,6 +1059,8 @@ namespace Game.Entities
|
||||
|
||||
AreaTriggerFieldData m_areaTriggerData;
|
||||
|
||||
ulong _spawnId;
|
||||
|
||||
ObjectGuid _targetGuid;
|
||||
|
||||
AuraEffect _aurEff;
|
||||
|
||||
@@ -252,7 +252,6 @@ namespace Game.Entities
|
||||
{
|
||||
public AreaTriggerId Id;
|
||||
public AreaTriggerFlags Flags;
|
||||
public uint ScriptId;
|
||||
|
||||
public List<AreaTriggerAction> Actions = new();
|
||||
|
||||
@@ -316,6 +315,8 @@ namespace Game.Entities
|
||||
public List<Vector2> PolygonVerticesTarget = new();
|
||||
public List<Vector3> SplinePoints = new();
|
||||
public Optional<AreaTriggerOrbitInfo> OrbitInfo;
|
||||
|
||||
public uint ScriptId;
|
||||
}
|
||||
|
||||
public class AreaTriggerSpawn
|
||||
@@ -328,6 +329,8 @@ namespace Game.Entities
|
||||
public byte PhaseUseFlags;
|
||||
|
||||
public AreaTriggerShapeInfo Shape = new();
|
||||
|
||||
public uint ScriptId;
|
||||
}
|
||||
|
||||
public struct AreaTriggerAction
|
||||
|
||||
Reference in New Issue
Block a user