View Full Version : [SOLVED] CFBG Rev 27 - BuildPlayerChat Error

12-26-2013, 08:54 AM
I'm using Carl's CFBG Rev 27, i already posted this on the main Thread but somebody told me to post it here so here i am...

Since commit: https://github.com/TrinityCore/TrinityCore/commit/107af528536980380c887379b56f6351a9781a2f

When trying to compile i get this error: http://puu.sh/5X7Ni

Script source: http://emudevs.com/showthread.php/1121-Crossfaction-Battlegrounds

This: BuildPlayerChat
has changed to: ChatHandler::BuildChatPacket

But i still have an error, possibly because of the next part of the code after BuildPlayerChat ((&data, msgtype, message, LANG_UNIVERSAL);) or ((&data, msgtype, message, pPlayer->GetTeam() == ALLIANCE ? LANG_ORCISH : LANG_COMMON);)

Thanks for the support ^^

12-26-2013, 09:23 AM
Try changing these:

+ WorldPacket data(SMSG_MESSAGECHAT, 200);
+ BuildPlayerChat(&data, msgtype, message, LANG_UNIVERSAL);
+ pPlayer->GetSession()->SendPacket(&data);


+ WorldPacket data;
+ BuildPlayerChat(data, (ChatMsg)msgtype, LANG_UNIVERSAL, this, pPlayer, message);
+ pPlayer->GetSession()->SendPacket(&data);

Ps. Post the new error, you already solved the old error .__.

12-26-2013, 10:37 AM
This is the new error after changing BuildPlayerChat:

This: BuildPlayerChat
for this: ChatHandler::BuildChatPacket


Thanks Rochet2


(data, (ChatMsg)msgtype, LANG_UNIVERSAL, this, pPlayer, message); seems to work for Line 73 (At least it compiles) only error left is Line 75.

Error on line 75 I THINK (Think is the word) is fixed with this: ChatHandler::BuildChatPacket(data, (ChatMsg)msgtype, pPlayer->GetTeam() == ALLIANCE ? LANG_ORCISH : LANG_COMMON, this, pPlayer, message);

Working perfectly, Thanks ^^