mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[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:
parent
dd06340d6c
commit
872d791ca6
15 changed files with 282 additions and 51 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue