*Update active object code.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-26 16:29:55 -06:00
parent c16848a23c
commit ee6418d92a
8 changed files with 56 additions and 37 deletions

View File

@@ -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;