mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
feat(Core/Packets): Port packet handling from TrinityCore (#5617)
* feat(Core/Packets): Port packet handling from TrinityCore * 1 * 2 * 3 * 1 * 2 * #3670 * 3 * 1 * codestyle * fix msvc warnings
This commit is contained in:
@@ -818,32 +818,6 @@ void Channel::Say(ObjectGuid guid, std::string const& what, uint32 lang)
|
||||
SendToAll(&data, pinfo.IsModerator() ? ObjectGuid::Empty : guid);
|
||||
}
|
||||
|
||||
void Channel::EveryoneSayToSelf(const char* what)
|
||||
{
|
||||
if (!what)
|
||||
return;
|
||||
|
||||
uint32 messageLength = strlen(what) + 1;
|
||||
|
||||
WorldPacket data(SMSG_MESSAGECHAT, 1 + 4 + 8 + 4 + _name.size() + 1 + 8 + 4 + messageLength + 1);
|
||||
data << (uint8)CHAT_MSG_CHANNEL;
|
||||
data << (uint32)LANG_UNIVERSAL;
|
||||
data << uint64(0); // put player guid here
|
||||
data << uint32(0);
|
||||
data << _name;
|
||||
data << uint64(0); // put player guid here
|
||||
data << messageLength;
|
||||
data << what;
|
||||
data << uint8(0);
|
||||
|
||||
for (PlayerContainer::const_iterator i = playersStore.begin(); i != playersStore.end(); ++i)
|
||||
{
|
||||
data.put(5, i->first);
|
||||
data.put(17 + _name.size() + 1, i->first);
|
||||
i->second.plrPtr->GetSession()->SendPacket(&data);
|
||||
}
|
||||
}
|
||||
|
||||
void Channel::Invite(Player const* player, std::string const& newname)
|
||||
{
|
||||
ObjectGuid guid = player->GetGUID();
|
||||
|
||||
@@ -209,7 +209,6 @@ public:
|
||||
void List(Player const* player);
|
||||
void Announce(Player const* player);
|
||||
void Say(ObjectGuid guid, std::string const& what, uint32 lang);
|
||||
void EveryoneSayToSelf(const char* what);
|
||||
void Invite(Player const* player, std::string const& newp);
|
||||
void Voice(ObjectGuid guid1, ObjectGuid guid2);
|
||||
void DeVoice(ObjectGuid guid1, ObjectGuid guid2);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define AZEROTHCORE_CHAT_H
|
||||
|
||||
#include "SharedDefines.h"
|
||||
#include "Errors.h"
|
||||
#include "WorldSession.h"
|
||||
#include <vector>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user