diff --git a/src/game/Object/Object.cpp b/src/game/Object/Object.cpp index ad876b463..f08a6de4c 100644 --- a/src/game/Object/Object.cpp +++ b/src/game/Object/Object.cpp @@ -1737,7 +1737,10 @@ void WorldObject::SetMap(Map* map) // On multithread replace this with a pointer to map's Eluna pointer stored in a map elunaEvents = new ElunaEventProcessor(&Eluna::GEluna, this); #endif +} +void WorldObject::ResetMap() +{ #ifdef ENABLE_ELUNA delete elunaEvents; elunaEvents = NULL; diff --git a/src/game/Object/Object.h b/src/game/Object/Object.h index 8d5f04302..0f32065cc 100644 --- a/src/game/Object/Object.h +++ b/src/game/Object/Object.h @@ -646,7 +646,7 @@ class WorldObject : public Object void SetMap(Map* map); Map* GetMap() const { MANGOS_ASSERT(m_currMap); return m_currMap; } // used to check all object's GetMap() calls when object is not in world! - void ResetMap() { m_currMap = NULL; } + void ResetMap(); // obtain terrain data for map where this object belong... TerrainInfo const* GetTerrain() const; @@ -654,7 +654,7 @@ class WorldObject : public Object void AddToClientUpdateList() override; void RemoveFromClientUpdateList() override; void BuildUpdateData(UpdateDataMapType&) override; - + Creature* SummonCreature(uint32 id, float x, float y, float z, float ang, TempSummonType spwtype, uint32 despwtime, bool asActiveObject = false, bool setRun = false); GameObject* SummonGameObject(uint32 id, float x, float y, float z, float angle, uint32 despwtime);