mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-04 17:57:47 +00:00
41 lines
857 B
C++
41 lines
857 B
C++
#ifndef _CHATPACKET_H
|
|
#define _CHATPACKET_H
|
|
|
|
#include <common/Network/GamePacketNew.h>
|
|
#include <common/Network/PacketDef/Zone/ServerZoneDef.h>
|
|
#include "Forwards.h"
|
|
|
|
|
|
namespace Core {
|
|
namespace Network {
|
|
namespace Packets {
|
|
namespace Server {
|
|
|
|
/**
|
|
* @brief The Chat packet.
|
|
*/
|
|
class ChatPacket :
|
|
public ZoneChannelPacket< FFXIVIpcChat >
|
|
{
|
|
public:
|
|
ChatPacket( Entity::Player& player, Common::ChatType chatType, const std::string& msg ) :
|
|
ZoneChannelPacket< FFXIVIpcChat >( player.getId(), player.getId() )
|
|
{
|
|
initialize( player, chatType, msg );
|
|
};
|
|
|
|
private:
|
|
void initialize( Entity::Player& player, Common::ChatType chatType, const std::string& msg )
|
|
{
|
|
m_data.chatType = chatType;
|
|
strcpy( m_data.name, player.getName().c_str() );
|
|
strcpy( m_data.msg, msg.c_str() );
|
|
};
|
|
};
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif /*_CHATPACKET_H*/
|