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
@@ -2080,7 +2080,11 @@ namespace Game.Entities
{
GameObjectData gameObjectData = GetGoData();
if (gameObjectData != null)
return gameObjectData.ScriptId;
{
uint scriptId = gameObjectData.ScriptId;
if (scriptId != 0)
return scriptId;
}
return GetGoInfo().ScriptId;
}