[7335] Implement active objects support.

Active objects triggrering grid loading and updating around self like players.
It can be used for event long run movements or escoring quest travels.
Also can be used for proper implementation far vision spells.
Currently only creatures can be activated by function call (from script) cr->SetActiveObjectState(true);
Please avoid lot amount active objects in same time use. Existance active objects support isn't meaning
that each rabbit must be active creature.

Also added independent grid unloading locks for explicit unloading lock,
lock for used by instance copied grids, lock counter for actiove object spawn grids locks.
Last case required for prevent double spawn active creature walk far away from spawn point.
This commit is contained in:
VladimirMangos 2009-02-25 13:27:13 +03:00
parent dd06340d6c
commit 872d791ca6
15 changed files with 282 additions and 51 deletions

View file

@ -575,6 +575,8 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
GameObject* LookupFishingHoleAround(float range);
GridReference<GameObject> &GetGridRef() { return m_gridRef; }
bool isActiveObject() const { return false; }
protected:
uint32 m_charges; // Spell charges for GAMEOBJECT_TYPE_SPELLCASTER (22)
uint32 m_spellId;