Core/Commands: Fixed .gobject add command

This commit is contained in:
Shauren
2015-05-16 12:12:47 +02:00
parent 554e657ab6
commit b4d044aa13

View File

@@ -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;