Core/AreaTrigger: Fallback to CreateProperties script, if ScriptName of static areatrigger is not provided
Port From (https://github.com/TrinityCore/TrinityCore/commit/7e061adffa20323a26c0a489ba70dd098689f6d7)
This commit is contained in:
@@ -797,7 +797,12 @@ namespace Game.Entities
|
|||||||
public uint GetScriptId()
|
public uint GetScriptId()
|
||||||
{
|
{
|
||||||
if (_spawnId != 0)
|
if (_spawnId != 0)
|
||||||
return Global.AreaTriggerDataStorage.GetAreaTriggerSpawn(_spawnId).ScriptId;
|
{
|
||||||
|
AreaTriggerSpawn spawn = Global.AreaTriggerDataStorage.GetAreaTriggerSpawn(_spawnId);
|
||||||
|
if (spawn != null && spawn.ScriptId != 0)
|
||||||
|
return spawn.ScriptId;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
AreaTriggerCreateProperties createProperties = GetCreateProperties();
|
AreaTriggerCreateProperties createProperties = GetCreateProperties();
|
||||||
if (createProperties != null)
|
if (createProperties != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user