2017-08-08 13:53:47 +02:00
|
|
|
#ifndef _MOVEACTORPACKET_H
|
|
|
|
#define _MOVEACTORPACKET_H
|
|
|
|
|
2018-03-06 22:22:19 +01:00
|
|
|
#include <Network/GamePacketNew.h>
|
|
|
|
#include <Network/PacketDef/Zone/ServerZoneDef.h>
|
|
|
|
#include <Util/UtilMath.h>
|
2017-12-08 23:27:59 +01:00
|
|
|
#include "Actor/Player.h"
|
|
|
|
#include "Forwards.h"
|
2017-08-08 13:53:47 +02:00
|
|
|
|
|
|
|
|
2018-11-29 16:55:48 +01:00
|
|
|
namespace Sapphire::Network::Packets::Server
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
/**
|
|
|
|
* @brief The Client UI Initialization packet. This must be sent to the client
|
|
|
|
* once upon connection to configure the UI.
|
|
|
|
*/
|
|
|
|
class MoveActorPacket :
|
|
|
|
public ZoneChannelPacket< FFXIVIpcActorMove >
|
2018-08-29 21:40:59 +02:00
|
|
|
{
|
2018-10-28 21:53:21 +01:00
|
|
|
public:
|
|
|
|
MoveActorPacket( Entity::Chara& actor, uint8_t unk1, uint8_t unk2, uint8_t unk3, uint16_t unk4 ) :
|
|
|
|
ZoneChannelPacket< FFXIVIpcActorMove >( actor.getId(), actor.getId() )
|
|
|
|
{
|
|
|
|
initialize( actor, unk1, unk2, unk3, unk4 );
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
void initialize( Entity::Chara& actor, uint8_t unk1, uint8_t unk2, uint8_t unk3, uint16_t unk4 )
|
|
|
|
{
|
|
|
|
|
2018-12-02 02:01:41 +01:00
|
|
|
m_data.rotation = Util::floatToUInt8Rot( actor.getRot() );
|
2018-10-28 21:53:21 +01:00
|
|
|
m_data.unknown_1 = unk1;
|
|
|
|
m_data.unknown_2 = unk2;
|
|
|
|
m_data.unknown_3 = unk3;
|
|
|
|
m_data.unknown_4 = unk4;
|
2018-12-02 02:01:41 +01:00
|
|
|
m_data.posX = Util::floatToUInt16( actor.getPos().x );
|
|
|
|
m_data.posY = Util::floatToUInt16( actor.getPos().y );
|
|
|
|
m_data.posZ = Util::floatToUInt16( actor.getPos().z );
|
2018-10-28 21:53:21 +01:00
|
|
|
|
|
|
|
};
|
2018-08-29 21:40:59 +02:00
|
|
|
};
|
2017-08-08 13:53:47 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-12-08 11:46:47 +01:00
|
|
|
#endif /*_MOVEACTORPACKET_H*/
|