aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.h
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-02-01 13:10:51 -0300
committerAriel Silva <ariel-@users.noreply.github.com>2018-03-09 14:41:28 -0300
commit080d2c6cd439acb2059adc4e24a279de98aa0db6 (patch)
tree53cd60562b73a7157fe0d0e6f4263df2831a656f /src/server/game/Maps/Map.h
parente8d5aa56cc48572d81e1898b7b4ff10cfa6d1957 (diff)
Core/Spells: rework part 4: iterate over effects first
Ref #18395 Implement far spell queue processing Closes #7395
Diffstat (limited to 'src/server/game/Maps/Map.h')
-rw-r--r--src/server/game/Maps/Map.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index 94feabcc7af..adccf8c00c5 100644
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -26,6 +26,7 @@
#include "GridDefines.h"
#include "GridRefManager.h"
#include "MapRefManager.h"
+#include "MPSCQueue.h"
#include "ObjectGuid.h"
#include "Optional.h"
#include "SharedDefines.h"
@@ -853,6 +854,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>
@@ -916,6 +920,8 @@ class TC_GAME_API Map : public GridRefManager<NGridType>
std::unordered_set<Corpse*> _corpseBones;
std::unordered_set<Object*> _updateObjects;
+
+ MPSCQueue<FarSpellCallback> _farSpellCallbacks;
};
enum InstanceResetMethod