mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 21:57:01 +01:00
*Update active object code.
--HG-- branch : trunk
This commit is contained in:
@@ -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