2017-08-08 13:53:47 +02:00
|
|
|
#ifndef _MODELEQUIPPACKET_H
|
|
|
|
#define _MODELEQUIPPACKET_H
|
|
|
|
|
2018-03-06 22:22:19 +01:00
|
|
|
#include <Network/GamePacketNew.h>
|
2017-12-08 23:27:59 +01:00
|
|
|
#include "Actor/Player.h"
|
|
|
|
#include "Forwards.h"
|
2017-08-08 13:53:47 +02:00
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
namespace Network {
|
|
|
|
namespace Packets {
|
|
|
|
namespace Server {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief The update model packet.
|
|
|
|
*/
|
|
|
|
class ModelEquipPacket :
|
2018-08-29 21:40:59 +02:00
|
|
|
public ZoneChannelPacket< FFXIVIpcModelEquip >
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
|
|
|
public:
|
2018-08-29 21:40:59 +02:00
|
|
|
ModelEquipPacket( Entity::Player& player ) :
|
|
|
|
ZoneChannelPacket< FFXIVIpcModelEquip >( player.getId(), player.getId() )
|
|
|
|
{
|
|
|
|
initialize( player );
|
|
|
|
};
|
2017-08-08 13:53:47 +02:00
|
|
|
|
|
|
|
private:
|
2018-08-29 21:40:59 +02:00
|
|
|
void initialize( Entity::Player& player )
|
|
|
|
{
|
|
|
|
m_data.mainWeapon = player.getModelMainWeapon();
|
|
|
|
m_data.offWeapon = player.getModelSubWeapon();
|
|
|
|
m_data.models[ 0 ] = player.getModelForSlot( Common::GearSetSlot::Head );
|
|
|
|
m_data.models[ 1 ] = player.getModelForSlot( Common::GearSetSlot::Body );
|
|
|
|
m_data.models[ 2 ] = player.getModelForSlot( Common::GearSetSlot::Hands );
|
|
|
|
m_data.models[ 3 ] = player.getModelForSlot( Common::GearSetSlot::Legs );
|
|
|
|
m_data.models[ 4 ] = player.getModelForSlot( Common::GearSetSlot::Feet );
|
|
|
|
};
|
2017-08-08 13:53:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-08 11:46:47 +01:00
|
|
|
#endif /*_MODELEQUIPPACKET_H*/
|