mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
[svn] * Allow WorldObjects to keep the grid active, and prevent it from being unloaded. This can be done through calling WorldObject::setActive(bool) from the scripting library. Note that entire instances are still unloaded if no player is present on that map to save resources. This behavior can be changed if the need arises.
--HG-- branch : trunk
This commit is contained in:
@@ -82,14 +82,14 @@ void GameObject::AddToWorld()
|
||||
{
|
||||
///- Register the gameobject for guid lookup
|
||||
if(!IsInWorld()) ObjectAccessor::Instance().AddObject(this);
|
||||
Object::AddToWorld();
|
||||
WorldObject::AddToWorld();
|
||||
}
|
||||
|
||||
void GameObject::RemoveFromWorld()
|
||||
{
|
||||
///- Remove the gameobject from the accessor
|
||||
if(IsInWorld()) ObjectAccessor::Instance().RemoveObject(this);
|
||||
Object::RemoveFromWorld();
|
||||
WorldObject::RemoveFromWorld();
|
||||
}
|
||||
|
||||
bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, uint32 go_state, uint32 ArtKit)
|
||||
|
||||
Reference in New Issue
Block a user