Jump to content

Help: Whisper All Command


Recommended Posts

Posted

I need help writing a Command to Whisper Everyone on the server with a message.

This is what I have so far its not working it does compile fine

bool ChatHandler::HandleWhisperAllCommand(const char* args)

{

std::string str = args;

WorldPacket data(SMSG_MESSAGECHAT, (str.size()+1));

BuildPlayerChats(&data, CHAT_MSG_WHISPER, str, LANG_UNIVERSAL);

sWorld.SendGlobalMessage(&data);

return true;

}

I created BuildPlayerChats which is an identical Function to BuildPlayerChat Found in Player.cpp

I Can't call player::BuildPlayerChat because its not static and has modifiers.

I've Succesfully did this with Arcemu.

Posted

Please someone help me out on this one.

It couldnt be that complicated Its Just sending a message To Everyone on the server...

Same as Achievements, Announcements, Notifications ect...

I'm just having a really hard time with this one for some reason.

Posted
I think it's at your
sWorld.SendGlobalMessage(&data);

No, BuildPlayerChats() isn't a member of ChatHandler. It's a member of player. It should be m_session->GetPlayer()->BuildPlayerChats(blah blah blah);

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use