Core/Spells: rework part 4: iterate over effects first
Implement far spell queue processing # Conflicts: # src/server/game/Spells/Spell.cpp
This commit is contained in:
1 parent
3fbbea61bd
commit
4bb8c93df8
12 files changed
+765
-834
No files matched your search
@@ -3448,8 +3448,22 @@ bool Map::IsSpawnGroupActive(uint32 groupId) const
|
||||
return (_toggledSpawnGroupIds.find(groupId) != _toggledSpawnGroupIds.end()) != !(data->flags & SPAWNGROUP_FLAG_MANUAL_SPAWN);
|
||||
}
|
||||
|
||||
void Map::AddFarSpellCallback(FarSpellCallback&& callback)
|
||||
{
|
||||
_farSpellCallbacks.Enqueue(new FarSpellCallback(std::move(callback)));
|
||||
}
|
||||
|
||||
void Map::DelayedUpdate(uint32 t_diff)
|
||||
{
|
||||
{
|
||||
FarSpellCallback* callback;
|
||||
while (_farSpellCallbacks.Dequeue(callback))
|
||||
{
|
||||
(*callback)(this);
|
||||
delete callback;
|
||||
}
|
||||
}
|
||||
|
||||
RemoveAllObjectsInRemoveList();
|
||||
|
||||
// Don't unload grids if it's battleground, since we may have manually added GOs, creatures, those doesn't load from DB at grid re-load !
|
||||
|
||||
Reference in new issue
Block a user