mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +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
|
|
@ -125,6 +125,8 @@ void LoadHelper(CellGuidSet const& guid_set, CellPair &cell, GridRefManager<T> &
|
|||
|
||||
addUnitState(obj,cell);
|
||||
obj->AddToWorld();
|
||||
map->AddToActive(obj);
|
||||
|
||||
++count;
|
||||
|
||||
}
|
||||
|
|
@ -150,6 +152,8 @@ void LoadHelper(CellCorpseSet const& cell_corpses, CellPair &cell, CorpseMapType
|
|||
|
||||
addUnitState(obj,cell);
|
||||
obj->AddToWorld();
|
||||
map->AddToActive(obj);
|
||||
|
||||
++count;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue