feat(Core/CFBG): Added support module mod-cfbg (#2064)

https://github.com/Winfidonarleyan/mod-cfbg - Original module
https://github.com/azerothcore/mod-cfbg - the fork in AC
This commit is contained in:
Kargatum
2019-08-06 09:21:11 +07:00
committed by GitHub
parent 34184d4afe
commit d40e894618
8 changed files with 164 additions and 52 deletions

View File

@@ -10,7 +10,6 @@
#include "ArenaTeamMgr.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "ArenaTeam.h"
#include "BattlegroundMgr.h"
#include "Battleground.h"
@@ -134,6 +133,14 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recvData)
// queue result (default ok)
GroupJoinBattlegroundResult err = GroupJoinBattlegroundResult(bgt->GetBgTypeID());
if (!sScriptMgr->CanJoinInBattlegroundQueue(_player, guid, bgTypeId, joinAsGroup, err) && err <= 0)
{
WorldPacket data;
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
SendPacket(&data);
return;
}
// check if player can queue:
if (!joinAsGroup)
{