aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-05-16 12:12:47 +0200
committerShauren <shauren.trinity@gmail.com>2015-09-25 19:58:13 +0200
commit9207304d3225c04bf15e04cf0cbbd5cf90a535ed (patch)
tree60f9d1a348003cd3bb149b0b156365a4e11c0f35 /src
parent2c16edbdf32c21cd79fd1ccfc52ecf215683b6ac (diff)
Core/Commands: Fixed .gobject add command
(cherry picked from commit b4d044aa13b06ae50b4e468d6647bd7a9eb1cc3e)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Commands/cs_gobject.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp
index 591f797bfee..990b925697e 100644
--- a/src/server/scripts/Commands/cs_gobject.cpp
+++ b/src/server/scripts/Commands/cs_gobject.cpp
@@ -166,6 +166,8 @@ public:
// fill the gameobject data and save to the db
object->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), player->GetPhaseMaskForSpawn());
+ 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;