2017-08-08 13:53:47 +02:00
|
|
|
#ifndef _CHATPACKET_H
|
|
|
|
#define _CHATPACKET_H
|
|
|
|
|
2017-08-19 00:18:40 +02:00
|
|
|
#include <src/servers/Server_Common/Network/GamePacketNew.h>
|
2017-08-21 00:02:41 +02:00
|
|
|
#include <src/servers/Server_Common/Network/PacketDef/Zone/ServerZoneDef.h>
|
2017-08-18 17:16:15 +02:00
|
|
|
#include "src/servers/Server_Zone/Forwards.h"
|
2017-08-08 13:53:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
namespace Network {
|
|
|
|
namespace Packets {
|
|
|
|
namespace Server {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief The Chat packet.
|
|
|
|
*/
|
|
|
|
class ChatPacket :
|
2017-11-21 18:43:09 +01:00
|
|
|
public ZoneChannelPacket< FFXIVIpcChat >
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
|
|
|
public:
|
2017-12-08 11:46:47 +01:00
|
|
|
ChatPacket( Entity::Player& player, Common::ChatType chatType, const std::string& msg ) :
|
|
|
|
ZoneChannelPacket< FFXIVIpcChat >( player.getId(), player.getId() )
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
|
|
|
initialize( player, chatType, msg );
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
2017-12-08 11:46:47 +01:00
|
|
|
void initialize( Entity::Player& player, Common::ChatType chatType, const std::string& msg )
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
|
|
|
m_data.chatType = chatType;
|
2017-12-08 11:46:47 +01:00
|
|
|
strcpy( m_data.name, player.getName().c_str() );
|
2017-08-08 13:53:47 +02:00
|
|
|
strcpy( m_data.msg, msg.c_str() );
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-08 11:46:47 +01:00
|
|
|
#endif /*_CHATPACKET_H*/
|