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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include "DatabaseEnv.h"
|
||||
|
||||
#include "CellImpl.h"
|
||||
#include "Chat.h"
|
||||
#include "ChannelMgr.h"
|
||||
@@ -28,6 +27,7 @@
|
||||
#include "Util.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "AccountMgr.h"
|
||||
|
||||
#ifdef ELUNA
|
||||
#include "LuaEngine.h"
|
||||
#endif
|
||||
@@ -106,6 +106,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recvData)
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}
|
||||
|
||||
if (langDesc->skill_id != 0 && !sender->HasSkill(langDesc->skill_id))
|
||||
{
|
||||
// also check SPELL_AURA_COMPREHEND_LANGUAGE (client offers option to speak in that language)
|
||||
@@ -333,6 +334,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recvData)
|
||||
}
|
||||
}
|
||||
|
||||
sScriptMgr->OnBeforeSendChatMessage(_player, type, lang, msg);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "AccountMgr.h"
|
||||
#include "Spell.h"
|
||||
#include "WhoListCache.h"
|
||||
|
||||
#ifdef ELUNA
|
||||
#include "LuaEngine.h"
|
||||
#endif
|
||||
@@ -213,7 +214,6 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WorldSession::HandleWhoOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_WHO Message");
|
||||
|
||||
@@ -32,10 +32,12 @@ void WorldSession::SendNameQueryOpcode(uint64 guid)
|
||||
return;
|
||||
}
|
||||
|
||||
Player* player = ObjectAccessor::FindPlayerInOrOutOfWorld(guid);
|
||||
|
||||
data << uint8(0); // name known
|
||||
data << playerData->name; // played name
|
||||
data << uint8(0); // realm name - only set for cross realm interaction (such as Battlegrounds)
|
||||
data << uint8(playerData->race);
|
||||
data << uint8(player ? player->getRace() : playerData->race);
|
||||
data << uint8(playerData->gender);
|
||||
data << uint8(playerData->playerClass);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user