Show
Ignore:
Timestamp:
11/19/08 13:38:01 (17 years ago)
Author:
yumileroy
Message:

[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.

Original author: w12x
Date: 2008-10-27 08:41:55-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Object.h

    r119 r120  
    2828#include "GameSystem/GridReference.h" 
    2929#include "ObjectDefines.h" 
     30#include "GridDefines.h" 
    3031 
    3132#include <set> 
     
    324325{ 
    325326    public: 
    326         virtual ~WorldObject ( ) {} 
     327        virtual ~WorldObject ( ); 
     328 
     329        virtual void AddToWorld(); 
     330 
     331        virtual void RemoveFromWorld(); 
    327332 
    328333        virtual void Update ( uint32 /*time_diff*/ ) { } 
     
    449454        Creature* SummonCreature(uint32 id, float x, float y, float z, float ang,TempSummonType spwtype,uint32 despwtime); 
    450455        GameObject* SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime); 
     456        bool isActive() const { return m_isActive; } 
     457        virtual void setActive(bool isActive); 
    451458    protected: 
    452459        explicit WorldObject(); 
    453460        std::string m_name; 
     461        bool m_isActive; 
    454462 
    455463    private: