aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Groups/Group.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Groups/Group.h')
-rw-r--r--src/server/game/Groups/Group.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h
index ee28dcb7f9a..917da8dc599 100644
--- a/src/server/game/Groups/Group.h
+++ b/src/server/game/Groups/Group.h
@@ -26,6 +26,7 @@
#include "RaceMask.h"
#include "SharedDefines.h"
#include "Timer.h"
+#include "UniqueTrackablePtr.h"
#include <map>
class Battlefield;
@@ -409,6 +410,8 @@ class TC_GAME_API Group
void StartCountdown(CountdownTimerType timerType, Seconds duration, Optional<time_t> startTime = { });
CountdownInfo const* GetCountdownInfo(CountdownTimerType timerType) const;
+ Trinity::unique_weak_ptr<Group> GetWeakPtr() const { return m_scriptRef; }
+
protected:
bool _setMembersGroup(ObjectGuid guid, uint8 group);
void _homebindIfInstance(Player* player);
@@ -455,5 +458,8 @@ class TC_GAME_API Group
uint32 m_activeMarkers;
std::array<std::unique_ptr<CountdownInfo>, 3> _countdowns;
+
+ struct NoopGroupDeleter { void operator()(Group*) const { /*noop - not managed*/ } };
+ Trinity::unique_trackable_ptr<Group> m_scriptRef;
};
#endif