[DiscordArchive] How about having the server make a player run a command that is Eluna-scripted?
[DiscordArchive] How about having the server make a player run a command that is Eluna-scripted?
Archived author: metallinos • Posted: 2025-08-19T20:10:11.431000+00:00
Original source
How about having the server make a player run a command that is Eluna-scripted?
tring& prefix, const std:
tring& message)
tring fullmsg = prefix + "\t" + message;Archived author: devout_filidh • Posted: 2025-08-19T21:42:21.304000+00:00
Original source
I solved it with the help of AI:
//sends data from c++ to addon
void SendAddonMessage(Player* sender, Player* receiver, const std:
tring& prefix, const std:
tring& message)
{
if (!sender || !receiver || prefix.empty())
return;
std:
tring fullmsg = prefix + "\t" + message;
WorldPacket packet(SMSG_MESSAGECHAT, 100);
packet << uint8(CHAT_MSG_WHISPER); // ChatType
packet << int32(LANG_ADDON); // Language
packet << sender->GetGUID(); // Sender GUID
packet << uint32(0); // Constant time
packet << receiver->GetGUID(); // Receiver GUID
packet << uint32(fullmsg.length() + 1); // Text length including null
packet << fullmsg; // Text bytes
packet << uint8(0); // Chat Tag
receiver->GetSession()->SendPacket(&packet);
}
Archived author: devout_filidh • Posted: 2025-08-19T21:44:06.167000+00:00
Original source
my mistake was using ADDON_MSG (or whatever it's called) instead of CHAT_MSG_WHISPER on line 1