Skip to content

Commit

Permalink
Fix send addon message on tc cata
Browse files Browse the repository at this point in the history
  • Loading branch information
Rochet2 committed Jan 4, 2024
1 parent 71b1feb commit ed947df
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions TrinityCore/PlayerMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -3304,16 +3304,21 @@ namespace LuaPlayer
uint8 channel = Eluna::CHECKVAL<uint8>(L, 4);
Player* receiver = Eluna::CHECKOBJ<Player>(L, 5);

std::string fullmsg = prefix + "\t" + message;

WorldPacket data(SMSG_MESSAGECHAT, 100);
data << uint8(channel);
data << int32(LANG_ADDON);
data << player->GET_GUID();
data << uint32(0);
data << receiver->GET_GUID();
#ifdef CATA
data << prefix;
data << uint32(message.length() + 1);
data << message;
#else
std::string fullmsg = prefix + "\t" + message;
data << uint32(fullmsg.length() + 1);
data << fullmsg;
#endif
data << uint8(0);

receiver->GetSession()->SendPacket(&data);
Expand Down

0 comments on commit ed947df

Please sign in to comment.