diff options
author | ariel- <ariel-@users.noreply.github.com> | 2018-02-01 13:10:51 -0300 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-08-28 15:59:11 +0200 |
commit | 65dca120d34febdaa84a63e17f638ab0fa59b3df (patch) | |
tree | 6e9cdb496c1c5208ac438c3ce8ad4da5726ab2e4 /src/server/game/Maps/Map.h | |
parent | f3548d45d0a74203ef6f5c7282c31ba794ddf7a1 (diff) |
Core/Spells: rework part 4: iterate over effects first
Ref #18395
Implement far spell queue processing
Closes #7395
(cherry picked from commit 080d2c6cd439acb2059adc4e24a279de98aa0db6)
Diffstat (limited to 'src/server/game/Maps/Map.h')
-rw-r--r-- | src/server/game/Maps/Map.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 3362670dbb3..44c46c9219c 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -27,6 +27,7 @@ #include "GridRefManager.h" #include "MapDefines.h" #include "MapRefManager.h" +#include "MPSCQueue.h" #include "ObjectGuid.h" #include "Optional.h" #include "SharedDefines.h" @@ -775,6 +776,9 @@ class TC_GAME_API Map : public GridRefManager<NGridType> // This will not affect any already-present creatures in the group void SetSpawnGroupInactive(uint32 groupId) { SetSpawnGroupActive(groupId, false); } + typedef std::function<void(Map*)> FarSpellCallback; + void AddFarSpellCallback(FarSpellCallback&& callback); + private: // Type specific code for add/remove to/from grid template<class T> @@ -839,6 +843,8 @@ class TC_GAME_API Map : public GridRefManager<NGridType> std::unordered_set<Corpse*> _corpseBones; std::unordered_set<Object*> _updateObjects; + + MPSCQueue<FarSpellCallback> _farSpellCallbacks; }; enum InstanceResetMethod |