Core/Scripts: Fix a logic fail that overriden the script of an entity that changed entry

Port From (https://github.com/TrinityCore/TrinityCore/commit/649009552065940ab0f03d905b945f1a16d603bb)
This commit is contained in:
hondacrx
2020-05-06 15:19:17 -04:00
parent 96294d3af5
commit 859109f472
3 changed files with 10 additions and 6 deletions
-4
View File
@@ -3325,8 +3325,6 @@ namespace Game
data.phaseGroup = result.Read<uint>(25);
data.terrainSwapMap = result.Read<int>(26);
data.ScriptId = GetScriptId(result.Read<string>(27));
if (data.ScriptId == 0)
data.ScriptId = cInfo.ScriptID;
var mapEntry = CliDB.MapStorage.LookupByKey(data.mapid);
if (mapEntry == null)
@@ -4121,8 +4119,6 @@ namespace Game
}
data.ScriptId = GetScriptId(result.Read<string>(21));
if (data.ScriptId == 0)
data.ScriptId = gInfo.ScriptId;
if (Math.Abs(data.orientation) > 2 * MathFunctions.PI)
{