diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 83f21ac4c..0db064434 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -406,7 +406,7 @@ bool GameObject::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, u } } - LastUsedScriptID = GetGOInfo()->ScriptId; + LastUsedScriptID = GetScriptId(); AIM_Initialize(); if (uint32 linkedEntry = GetGOInfo()->GetLinkedGameObjectEntry()) @@ -1140,6 +1140,7 @@ bool GameObject::LoadGameObjectFromDB(ObjectGuid::LowType spawnId, Map* map, boo GOState go_state = data->go_state; uint32 artKit = data->artKit; + m_goData = data; m_spawnId = spawnId; if (!Create(map->GenerateLowGuid(), entry, map, phaseMask, x, y, z, ang, data->rotation, animprogress, go_state, artKit)) @@ -1175,8 +1176,6 @@ bool GameObject::LoadGameObjectFromDB(ObjectGuid::LowType spawnId, Map* map, boo m_respawnTime = 0; } - m_goData = data; - if (addToMap && !GetMap()->AddToMap(this)) return false;