aboutsummaryrefslogtreecommitdiff
path: root/src/game/Object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r--src/game/Object.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index f35b392991e..1e0834ecf1f 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -1070,11 +1070,30 @@ WorldObject::WorldObject()
m_isActive = false;
}
+void WorldObject::SetWorldObject(bool on)
+{
+ if(!IsInWorld())
+ return;
+
+ if(GetTypeId() == TYPEID_UNIT)
+ {
+ if(!((Creature*)this)->isPet())
+ GetMap()->SwitchGridContainers((Creature*)this, on);
+ }
+ /*else if(GetTypeId() == TYPEID_DYNAMICOBJECT)
+ {
+ GetMap()->SwitchGridContainers((DynamicObject*)this, on);
+ }*/
+}
+
void WorldObject::setActive( bool on )
{
if(m_isActive==on)
return;
+ if(GetTypeId() == TYPEID_PLAYER)
+ return;
+
bool world = IsInWorld();
Map* map;