*Update active object code.
--HG-- branch : trunk
This commit is contained in:
1 parent
c16848a23c
commit
ee6418d92a
8 files changed
+56
-37
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user