Core/Database: Delete gameobject_addon data when deleting a GameObject from the database

Port From (https://github.com/TrinityCore/TrinityCore/commit/b02143118f830691412bbc7649c1d0c9ec32f3a9)
This commit is contained in:
hondacrx
2021-12-01 11:38:49 -05:00
parent 11372c15e9
commit 8701a862cc
2 changed files with 6 additions and 0 deletions
@@ -1161,6 +1161,10 @@ namespace Game.Entities
stmt.AddValue(1, (uint)CreatureLinkedRespawnType.CreatureToGO);
trans.Append(stmt);
stmt = DB.World.GetPreparedStatement(WorldStatements.DEL_GAMEOBJECT_ADDON);
stmt.AddValue(0, m_spawnId);
trans.Append(stmt);
DB.World.CommitTransaction(trans);
}