mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Spells: rework part 4: iterate over effects first
Ref #18395
Implement far spell queue processing
Closes #7395
(cherry picked from commit 080d2c6cd4)
This commit is contained in:
@@ -3534,8 +3534,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;
|
||||
}
|
||||
}
|
||||
|
||||
for (_transportsUpdateIter = _transports.begin(); _transportsUpdateIter != _transports.end();)
|
||||
{
|
||||
Transport* transport = *_transportsUpdateIter;
|
||||
|
||||
Reference in New Issue
Block a user