mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/Commands: Fixed .gobject add command
This commit is contained in:
@@ -168,6 +168,8 @@ public:
|
||||
|
||||
// fill the gameobject data and save to the db
|
||||
object->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), player->GetPhaseMask());
|
||||
guidLow = object->GetSpawnId();
|
||||
|
||||
// delete the old object and do a clean load from DB with a fresh new GameObject instance.
|
||||
// this is required to avoid weird behavior and memory leaks
|
||||
delete object;
|
||||
|
||||
Reference in New Issue
Block a user