mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
feat(Core/Hooks): added collection of hooks to extends AC (#3047)
This collection of hooks comes from the Maelstrom project. It allows to release modules such as : - 3v3-soloqueue - 1v1 arena - pvestats and many others
This commit is contained in:
@@ -59,10 +59,13 @@ Group::Group() : m_leaderGuid(0), m_leaderName(""), m_groupType(GROUPTYPE_NORMAL
|
||||
{
|
||||
for (uint8 i = 0; i < TARGETICONCOUNT; ++i)
|
||||
m_targetIcons[i] = 0;
|
||||
sScriptMgr->OnConstructGroup(this);
|
||||
}
|
||||
|
||||
Group::~Group()
|
||||
{
|
||||
sScriptMgr->OnDestructGroup(this);
|
||||
|
||||
if (m_bgGroup)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
@@ -142,6 +145,8 @@ bool Group::Create(Player* leader)
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
ASSERT(AddMember(leader)); // If the leader can't be added to a new group because it appears full, something is clearly wrong.
|
||||
|
||||
sScriptMgr->OnCreate(this, leader);
|
||||
}
|
||||
else if (!AddMember(leader))
|
||||
return false;
|
||||
@@ -1840,6 +1845,9 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
|
||||
if (!member)
|
||||
return ERR_BATTLEGROUND_JOIN_FAILED;
|
||||
|
||||
if (!sScriptMgr->CanGroupJoinBattlegroundQueue(this, member, bgTemplate, MinPlayerCount, isRated, arenaSlot))
|
||||
return ERR_BATTLEGROUND_JOIN_FAILED;
|
||||
|
||||
// don't allow cross-faction groups to join queue
|
||||
if (member->GetTeamId() != teamId)
|
||||
return ERR_BATTLEGROUND_JOIN_TIMED_OUT;
|
||||
|
||||
Reference in New Issue
Block a user