*Fix a crash.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-26 17:01:02 -06:00
parent ee6418d92a
commit 23ef8a6dd6
3 changed files with 33 additions and 13 deletions

View File

@@ -1075,15 +1075,7 @@ 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);
}*/
GetMap()->AddObjectToSwitchList(this, on);
}
void WorldObject::setActive( bool on )