Skip to content

Commit

Permalink
feat(Core/CFBG): Added support module mod-cfbg (#2064)
Browse files Browse the repository at this point in the history
  • Loading branch information
Winfidonarleyan authored Aug 6, 2019
1 parent 34184d4 commit d40e894
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 53 deletions.
103 changes: 61 additions & 42 deletions src/server/game/Battlegrounds/BattlegroundQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@
#include "Player.h"
#include "ChannelMgr.h"
#include "Channel.h"
#include "ScriptMgr.h"
#include <unordered_map>

struct BGSpamProtectionS
{
uint32 last_queue = 0; // CHAT DISABLED BY DEFAULT
};

std::unordered_map<uint32, BGSpamProtectionS>BGSpamProtection;
std::unordered_map<uint32, BGSpamProtectionS> BGSpamProtection;

/*********************************************************/
/*** BATTLEGROUND QUEUE SYSTEM ***/
Expand Down Expand Up @@ -152,6 +153,8 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player * leader, Group * grp, PvPDif
if (ginfo->teamId == TEAM_HORDE)
index++;

sScriptMgr->OnAddGroup(this, ginfo, index, leader, grp, bracketEntry, isPremade);

// pussywizard: store indices at which GroupQueueInfo is in m_QueuedGroups
ginfo->_bracketId = bracketId;
ginfo->_groupType = index;
Expand Down Expand Up @@ -185,40 +188,12 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player * leader, Group * grp, PvPDif
//add GroupInfo to m_QueuedGroups
m_QueuedGroups[bracketId][index].push_back(ginfo);

//announce current queue status
Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(ginfo->BgTypeId);
if (!bg)
return ginfo;

if (!isRated && !isPremade && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE))
if (Battleground * bgt = sBattlegroundMgr->GetBattlegroundTemplate(ginfo->BgTypeId))
{
char const* bgName = bgt->GetName();
uint32 MinPlayers = bgt->GetMinPlayersPerTeam();
uint32 MaxPlayers = MinPlayers * 2;
uint32 q_min_level = std::min(bracketEntry->minLevel, (uint32)80);
uint32 q_max_level = std::min(bracketEntry->maxLevel, (uint32)80);
uint32 qHorde = GetPlayersCountInGroupsQueue(bracketId, BG_QUEUE_NORMAL_HORDE);
uint32 qAlliance = GetPlayersCountInGroupsQueue(bracketId, BG_QUEUE_NORMAL_ALLIANCE);

// Show queue status to player only (when joining battleground queue or Arena and arena world announcer is disabled)
if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY) || (bgt->isArena() && !sWorld->getBoolConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE)))
{
ChatHandler(leader->GetSession()).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level,
qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0, qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0);
}
else if (!bgt->isArena()) // Show queue status to server (when joining battleground queue)
{
if (BGSpamProtection[leader->GetGUID()].last_queue == 0)
{
BGSpamProtection[leader->GetGUID()].last_queue = sWorld->GetGameTime();
sWorld->SendWorldText(LANG_BG_QUEUE_ANNOUNCE_WORLD, bgName, q_min_level, q_max_level,
qAlliance + qHorde, MaxPlayers);
}
else if (sWorld->GetGameTime() - BGSpamProtection[leader->GetGUID()].last_queue >= 30)
{
BGSpamProtection[leader->GetGUID()].last_queue = 0;
sWorld->SendWorldText(LANG_BG_QUEUE_ANNOUNCE_WORLD, bgName, q_min_level, q_max_level,
qAlliance + qHorde, MaxPlayers);
}
}
}
SendMessageQueue(leader, bg, bracketEntry);

return ginfo;
}
Expand Down Expand Up @@ -400,7 +375,8 @@ bool BattlegroundQueue::GetPlayerGroupInfoData(uint64 guid, GroupQueueInfo * gin
// this function is filling pools given free slots on both sides, result is ballanced
void BattlegroundQueue::FillPlayersToBG(Battleground* bg, const int32 aliFree, const int32 hordeFree, BattlegroundBracketId bracket_id)
{
UNUSED(bg);
if (!sScriptMgr->CanFillPlayersToBG(this, bg, aliFree, hordeFree, bracket_id))
return;

// clear selection pools
m_SelectionPools[TEAM_ALLIANCE].Init();
Expand Down Expand Up @@ -456,9 +432,10 @@ void BattlegroundQueue::FillPlayersToBG(Battleground* bg, const int32 aliFree, c
}
}

void BattlegroundQueue::FillPlayersToBGWithSpecific(Battleground* bg, const int32 aliFree, const int32 hordeFree, BattlegroundBracketId thisBracketId, BattlegroundQueue * specificQueue, BattlegroundBracketId specificBracketId)
void BattlegroundQueue::FillPlayersToBGWithSpecific(Battleground* bg, const int32 aliFree, const int32 hordeFree, BattlegroundBracketId thisBracketId, BattlegroundQueue* specificQueue, BattlegroundBracketId specificBracketId)
{
UNUSED(bg);
if (!sScriptMgr->CanFillPlayersToBGWithSpecific(this, bg, aliFree, hordeFree, thisBracketId, specificQueue, specificBracketId))
return;

// clear selection pools
m_SelectionPools[TEAM_ALLIANCE].Init();
Expand Down Expand Up @@ -579,6 +556,12 @@ bool BattlegroundQueue::CheckPremadeMatch(BattlegroundBracketId bracket_id, uint
// this method tries to create battleground or arena with MinPlayersPerTeam against MinPlayersPerTeam
bool BattlegroundQueue::CheckNormalMatch(Battleground * bgTemplate, BattlegroundBracketId bracket_id, uint32 minPlayers, uint32 maxPlayers)
{
uint32 Coef = 1;

sScriptMgr->OnCheckNormalMatch(this, Coef, bgTemplate, bracket_id, minPlayers, maxPlayers);

minPlayers = minPlayers * Coef;

// if current queue is BATTLEGROUND_QUEUE_RB, then we are trying to create bg using players from 2 queues
if (bgTemplate->GetBgTypeID() == BATTLEGROUND_RB)
{
Expand All @@ -593,18 +576,17 @@ bool BattlegroundQueue::CheckNormalMatch(Battleground * bgTemplate, Battleground
return false;

// specific queue
BattlegroundQueue & specificQueue = sBattlegroundMgr->GetBattlegroundQueue(BattlegroundMgr::BGQueueTypeId(sBattlegroundMgr->RandomSystem.GetCurrentRandomBg(), 0));
BattlegroundQueue& specificQueue = sBattlegroundMgr->GetBattlegroundQueue(BattlegroundMgr::BGQueueTypeId(sBattlegroundMgr->RandomSystem.GetCurrentRandomBg(), 0));

FillPlayersToBGWithSpecific(specificTemplate, specificTemplate->GetMaxPlayersPerTeam(), specificTemplate->GetMaxPlayersPerTeam(), bracket_id, &specificQueue, BattlegroundBracketId(specificBracket->bracketId));

//allow 1v0 if debug bg
if (sBattlegroundMgr->isTesting() && bgTemplate->isBattleground() && (m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount() || m_SelectionPools[TEAM_HORDE].GetPlayerCount()))
return true;

return m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount() >= std::min<uint32>(specificTemplate->GetMinPlayersPerTeam(), 15) && m_SelectionPools[TEAM_HORDE].GetPlayerCount() >= std::min<uint32>(specificTemplate->GetMinPlayersPerTeam(), 15);
}
// if this is not random bg queue - use players only from this queue
else
return m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount() >= std::min<uint32>(specificTemplate->GetMinPlayersPerTeam() * Coef, 15) && m_SelectionPools[TEAM_HORDE].GetPlayerCount() >= std::min<uint32>(specificTemplate->GetMinPlayersPerTeam() * Coef, 15);
}
else // if this is not random bg queue - use players only from this queue
{
FillPlayersToBG(bgTemplate, maxPlayers, maxPlayers, bracket_id);

Expand Down Expand Up @@ -980,6 +962,43 @@ bool BattlegroundQueue::IsAllQueuesEmpty(BattlegroundBracketId bracket_id)
return false;
}

void BattlegroundQueue::SendMessageQueue(Player* leader, Battleground* bg, PvPDifficultyEntry const* bracketEntry)
{
if (!sScriptMgr->CanSendMessageQueue(this, leader, bg, bracketEntry))
return;

BattlegroundBracketId bracketId = bracketEntry->GetBracketId();
char const* bgName = bg->GetName();
uint32 MinPlayers = bg->GetMinPlayersPerTeam();
uint32 MaxPlayers = MinPlayers * 2;
uint32 q_min_level = std::min(bracketEntry->minLevel, (uint32)80);
uint32 q_max_level = std::min(bracketEntry->maxLevel, (uint32)80);
uint32 qHorde = GetPlayersCountInGroupsQueue(bracketId, BG_QUEUE_NORMAL_HORDE);
uint32 qAlliance = GetPlayersCountInGroupsQueue(bracketId, BG_QUEUE_NORMAL_ALLIANCE);

// Show queue status to player only (when joining battleground queue or Arena and arena world announcer is disabled)
if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY) || (bg->isArena() && !sWorld->getBoolConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE)))
{
ChatHandler(leader->GetSession()).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level,
qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0, qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0);
}
else if (!bg->isArena()) // Show queue status to server (when joining battleground queue)
{
if (BGSpamProtection[leader->GetGUID()].last_queue == 0)
{
BGSpamProtection[leader->GetGUID()].last_queue = sWorld->GetGameTime();
sWorld->SendWorldText(LANG_BG_QUEUE_ANNOUNCE_WORLD, bgName, q_min_level, q_max_level,
qAlliance + qHorde, MaxPlayers);
}
else if (sWorld->GetGameTime() - BGSpamProtection[leader->GetGUID()].last_queue >= 30)
{
BGSpamProtection[leader->GetGUID()].last_queue = 0;
sWorld->SendWorldText(LANG_BG_QUEUE_ANNOUNCE_WORLD, bgName, q_min_level, q_max_level,
qAlliance + qHorde, MaxPlayers);
}
}
}

/*********************************************************/
/*** BATTLEGROUND QUEUE EVENTS ***/
/*********************************************************/
Expand Down
3 changes: 2 additions & 1 deletion src/server/game/Battlegrounds/BattlegroundQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ enum BattlegroundQueueGroupTypes
BG_QUEUE_NORMAL_ALLIANCE,
BG_QUEUE_NORMAL_HORDE,

BG_QUEUE_MAX
BG_QUEUE_MAX = 10
};

class Battleground;
Expand All @@ -72,6 +72,7 @@ class BattlegroundQueue
uint32 GetAverageQueueWaitTime(GroupQueueInfo* ginfo) const;
uint32 GetPlayersCountInGroupsQueue(BattlegroundBracketId bracketId, BattlegroundQueueGroupTypes bgqueue);
bool IsAllQueuesEmpty(BattlegroundBracketId bracket_id);
void SendMessageQueue(Player* leader, Battleground* bg, PvPDifficultyEntry const* bracketEntry);

void SetBgTypeIdAndArenaType(BattlegroundTypeId b, uint8 a) { m_bgTypeId = b; m_arenaType = ArenaType(a); } // pussywizard
void AddEvent(BasicEvent* Event, uint64 e_time);
Expand Down
9 changes: 8 additions & 1 deletion src/server/game/Handlers/BattleGroundHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "ArenaTeamMgr.h"
#include "WorldPacket.h"
#include "WorldSession.h"

#include "ArenaTeam.h"
#include "BattlegroundMgr.h"
#include "Battleground.h"
Expand Down Expand Up @@ -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)
{
Expand Down
4 changes: 3 additions & 1 deletion src/server/game/Handlers/ChatHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "WorldPacket.h"
#include "WorldSession.h"
#include "DatabaseEnv.h"

#include "CellImpl.h"
#include "Chat.h"
#include "ChannelMgr.h"
Expand All @@ -28,6 +27,7 @@
#include "Util.h"
#include "ScriptMgr.h"
#include "AccountMgr.h"

#ifdef ELUNA
#include "LuaEngine.h"
#endif
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -333,6 +334,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recvData)
}
}

sScriptMgr->OnBeforeSendChatMessage(_player, type, lang, msg);

switch (type)
{
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Handlers/MiscHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "AccountMgr.h"
#include "Spell.h"
#include "WhoListCache.h"

#ifdef ELUNA
#include "LuaEngine.h"
#endif
Expand Down Expand Up @@ -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");
Expand Down
4 changes: 3 additions & 1 deletion src/server/game/Handlers/QueryHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
62 changes: 60 additions & 2 deletions src/server/game/Scripting/ScriptMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,6 @@ bool ScriptMgr::OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target, u
}

// Player

void ScriptMgr::OnPlayerCompleteQuest(Player* player, Quest const* quest)
{
FOREACH_SCRIPT(PlayerScript)->OnPlayerCompleteQuest(player, quest);
Expand Down Expand Up @@ -1511,6 +1510,11 @@ void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::stri
FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg);
}

void ScriptMgr::OnBeforeSendChatMessage(Player* player, uint32& type, uint32& lang, std::string& msg)
{
FOREACH_SCRIPT(PlayerScript)->OnBeforeSendChatMessage(player, type, lang, msg);
}

void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Player* receiver)
{
FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg, receiver);
Expand Down Expand Up @@ -1729,6 +1733,17 @@ void ScriptMgr::OnFirstLogin(Player* player)
FOREACH_SCRIPT(PlayerScript)->OnFirstLogin(player);
}

bool ScriptMgr::CanJoinInBattlegroundQueue(Player* player, uint64 BattlemasterGuid, BattlegroundTypeId BGTypeID, uint8 joinAsGroup, GroupJoinBattlegroundResult& err)
{
bool ret = true;

FOR_SCRIPTS_RET(PlayerScript, itr, end, ret) // return true by default if not scripts
if (!itr->second->CanJoinInBattlegroundQueue(player, BattlemasterGuid, BGTypeID, joinAsGroup, err))
ret = false; // we change ret value only when scripts return false

return ret;
}

// Account
void ScriptMgr::OnAccountLogin(uint32 accountId)
{
Expand Down Expand Up @@ -2003,7 +2018,6 @@ void ScriptMgr::OnAfterStoreOrEquipNewItem(Player* player, uint32 vendorslot, ui
FOREACH_SCRIPT(PlayerScript)->OnAfterStoreOrEquipNewItem(player, vendorslot, item, count, bag, slot, pProto, pVendor, crItem, bStore);
}


void ScriptMgr::OnAfterUpdateMaxPower(Player* player, Powers& power, float& value)
{
FOREACH_SCRIPT(PlayerScript)->OnAfterUpdateMaxPower(player, power, value);
Expand Down Expand Up @@ -2065,6 +2079,50 @@ void ScriptMgr::OnBattlegroundRemovePlayerAtLeave(Battleground* bg, Player* play
FOREACH_SCRIPT(BGScript)->OnBattlegroundRemovePlayerAtLeave(bg, player);
}

void ScriptMgr::OnAddGroup(BattlegroundQueue* queue, GroupQueueInfo* ginfo, uint32& index, Player* leader, Group* grp, PvPDifficultyEntry const* bracketEntry, bool isPremade)
{
FOREACH_SCRIPT(BGScript)->OnAddGroup(queue, ginfo, index, leader, grp, bracketEntry, isPremade);
}

bool ScriptMgr::CanFillPlayersToBG(BattlegroundQueue* queue, Battleground* bg, const int32 aliFree, const int32 hordeFree, BattlegroundBracketId bracket_id)
{
bool ret = true;

FOR_SCRIPTS_RET(BGScript, itr, end, ret) // return true by default if not scripts
if (!itr->second->CanFillPlayersToBG(queue, bg, aliFree, hordeFree, bracket_id))
ret = false; // we change ret value only when scripts return false

return ret;
}

bool ScriptMgr::CanFillPlayersToBGWithSpecific(BattlegroundQueue* queue, Battleground* bg, const int32 aliFree, const int32 hordeFree,
BattlegroundBracketId thisBracketId, BattlegroundQueue* specificQueue, BattlegroundBracketId specificBracketId)
{
bool ret = true;

FOR_SCRIPTS_RET(BGScript, itr, end, ret) // return true by default if not scripts
if (!itr->second->CanFillPlayersToBGWithSpecific(queue, bg, aliFree, hordeFree, thisBracketId, specificQueue, specificBracketId))
ret = false; // we change ret value only when scripts return false

return ret;
}

void ScriptMgr::OnCheckNormalMatch(BattlegroundQueue* queue, uint32& Coef, Battleground* bgTemplate, BattlegroundBracketId bracket_id, uint32& minPlayers, uint32& maxPlayers)
{
FOREACH_SCRIPT(BGScript)->OnCheckNormalMatch(queue, Coef, bgTemplate, bracket_id, minPlayers, maxPlayers);
}

bool ScriptMgr::CanSendMessageQueue(BattlegroundQueue* queue, Player* leader, Battleground* bg, PvPDifficultyEntry const* bracketEntry)
{
bool ret = true;

FOR_SCRIPTS_RET(BGScript, itr, end, ret) // return true by default if not scripts
if (!itr->second->CanSendMessageQueue(queue, leader, bg, bracketEntry))
ret = false; // we change ret value only when scripts return false

return ret;
}

// SpellSC
void ScriptMgr::OnCalcMaxDuration(Aura const* aura, int32& maxDuration)
{
Expand Down
Loading

4 comments on commit d40e894

@soniczhang11
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/home/mangos/azerothcore/modules/mod-cfbg/src/CFBG_SC.cpp:92:10: error: ‘bool CFBG_BG::CanFillPlayersToBG(BattlegroundQueue*, Battleground*, int32, int32, BattlegroundBracketId)’ marked ‘override’, but does not override
bool CanFillPlayersToBG(BattlegroundQueue* queue, Battleground* bg, const int32 aliFree, const int32 hordeFree, BattlegroundBracketId bracket_id) override
^~~~~~~~~~~~~~~~~~
/home/mangos/azerothcore/modules/mod-cfbg/src/CFBG_SC.cpp:103:10: error: ‘bool CFBG_BG::CanFillPlayersToBGWithSpecific(BattlegroundQueue*, Battleground*, int32, int32, BattlegroundBracketId, BattlegroundQueue*, BattlegroundBracketId)’ marked ‘override’, but does not override
bool CanFillPlayersToBGWithSpecific(BattlegroundQueue* queue, Battleground* bg, const int32 aliFree, const int32 hordeFree,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mangos/azerothcore/modules/mod-cfbg/src/CFBG_SC.cpp:115:10: error: ‘void CFBG_BG::OnCheckNormalMatch(BattlegroundQueue*, uint32&, Battleground*, BattlegroundBracketId, uint32&, uint32&)’ marked ‘override’, but does not override
void OnCheckNormalMatch(BattlegroundQueue* /queue/, uint32& Coef, Battleground* /bgTemplate/, BattlegroundBracketId /bracket_id/, uint32& /minPlayers/, uint32& /maxPlayers/) override
^~~~~~~~~~~~~~~~~~
/home/mangos/azerothcore/modules/mod-cfbg/src/CFBG_SC.cpp:123:10: error: ‘bool CFBG_BG::CanSendMessageQueue(BattlegroundQueue*, Player*, Battleground*, const PvPDifficultyEntry*)’ marked ‘override’, but does not override
bool CanSendMessageQueue(BattlegroundQueue* queue, Player* leader, Battleground* bg, PvPDifficultyEntry const* bracketEntry) override
^~~~~~~~~~~~~~~~~~~
/home/mangos/azerothcore/modules/mod-cfbg/src/CFBG_SC.cpp:146:10: error: ‘bool CFBG_Player::CanJoinInBattlegroundQueue(Player*, uint64, BattlegroundTypeId, uint8, GroupJoinBattlegroundResult&)’ marked ‘override’, but does not override
bool CanJoinInBattlegroundQueue(Player* player, uint64 BattlemasterGuid, BattlegroundTypeId BGTypeID, uint8 joinAsGroup, GroupJoinBattlegroundResult& err) override
^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mangos/azerothcore/modules/mod-cfbg/src/CFBG_SC.cpp:177:10: error: ‘void CFBG_Player::OnBeforeSendChatMessage(Player*, uint32&, uint32&, std::string&)’ marked ‘override’, but does not override
void OnBeforeSendChatMessage(Player* player, uint32& type, uint32& lang, std::string& msg) override

Got this with mod-cfbg.

@andoys
Copy link

@andoys andoys commented on d40e894 Aug 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soniczhang11
Did you download the latest CFBG module?
https://github.com/Winfidonarleyan/mod-cfbg

@soniczhang11
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soniczhang11
Did you download the latest CFBG module?
https://github.com/Winfidonarleyan/mod-cfbg

With the latest module it works! thanks a lot. The module by AC should be updated.

@FrancescoBorzi
Copy link
Contributor

@FrancescoBorzi FrancescoBorzi commented on d40e894 Aug 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is updated: https://github.com/azerothcore/mod-cfbg

This branch is even with Winfidonarleyan:master.

Please sign in to comment.