aboutsummaryrefslogtreecommitdiff
path: root/src/game/GameObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/GameObject.cpp')
-rw-r--r--src/game/GameObject.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index d1bb0362872..f71c08b3403 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -94,6 +94,9 @@ void GameObject::RemoveFromWorld()
///- Remove the gameobject from the accessor
if(IsInWorld())
{
+ if(Map *map = FindMap())
+ if(map->IsDungeon() && ((InstanceMap*)map)->GetInstanceData())
+ ((InstanceMap*)map)->GetInstanceData()->OnObjectRemove(this);
ObjectAccessor::Instance().RemoveObject(this);
WorldObject::RemoveFromWorld();
}