mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[11168] Use MapPersistentState for access to Pool System dynamic data.
* Direct store pool system dynamic data in sPoolMgr replaced by shared pool system data object (for all non instanceable maps) into WorldPersistentState, and own copies of pool system data object in DungeonPersistentState/BattlegroundPersistentState. This let have pools with object at many non-instanceable maps, and single map pools with unique state for each instance. * Avoid direct global grid data modify from pool system, and use for this also recently added local for MapPersistentState grid spawn data. * Implemented proper API for update pool system data in MapPersistentStates from GameEvent system. * Initialize pool system state at MapPersistendState creating. For shared pool system state for non-instanceable maps initilized at first map state creating. Now pool system propertly work in instance also!
This commit is contained in:
parent
9e14a0529d
commit
8feaf211f1
14 changed files with 299 additions and 185 deletions
|
|
@ -8828,7 +8828,7 @@ bool FindCreatureData::operator()( CreatureDataPair const& dataPair )
|
|||
|
||||
// skip not spawned (in any state),
|
||||
uint16 pool_id = sPoolMgr.IsPartOfAPool<Creature>(dataPair.first);
|
||||
if (pool_id && !sPoolMgr.IsSpawnedObject<Creature>(dataPair.first))
|
||||
if (pool_id && !i_player->GetMap()->GetPersistentState()->IsSpawnedPoolObject<Creature>(dataPair.first))
|
||||
return false;
|
||||
|
||||
if (!i_spawnedData || new_dist < i_spawnedDist)
|
||||
|
|
@ -8878,7 +8878,7 @@ bool FindGOData::operator()( GameObjectDataPair const& dataPair )
|
|||
|
||||
// skip not spawned (in any state)
|
||||
uint16 pool_id = sPoolMgr.IsPartOfAPool<GameObject>(dataPair.first);
|
||||
if (pool_id && !sPoolMgr.IsSpawnedObject<GameObject>(dataPair.first))
|
||||
if (pool_id && !i_player->GetMap()->GetPersistentState()->IsSpawnedPoolObject<GameObject>(dataPair.first))
|
||||
return false;
|
||||
|
||||
if (!i_spawnedData || new_dist < i_spawnedDist)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue