mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-07 03:07:45 +00:00
[wip] Implement persistent emote cancelling
This commit is contained in:
parent
ac4c8ec8a6
commit
4abe2532c3
2 changed files with 17 additions and 11 deletions
|
@ -148,6 +148,8 @@ namespace Sapphire::Network::ActorControl
|
||||||
|
|
||||||
Emote = 0x122,
|
Emote = 0x122,
|
||||||
EmoteInterrupt = 0x123,
|
EmoteInterrupt = 0x123,
|
||||||
|
EmoteModeInterrupt = 0x124,
|
||||||
|
EmoteModeInterruptNonImmediate = 0x125,
|
||||||
|
|
||||||
SetPose = 0x127,
|
SetPose = 0x127,
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "Network/PacketWrappers/InspectPacket.h"
|
#include "Network/PacketWrappers/InspectPacket.h"
|
||||||
#include "Network/PacketWrappers/ActorControlPacket.h"
|
#include "Network/PacketWrappers/ActorControlPacket.h"
|
||||||
#include "Network/PacketWrappers/ActorControlTargetPacket.h"
|
#include "Network/PacketWrappers/ActorControlTargetPacket.h"
|
||||||
|
#include "Network/PacketWrappers/MoveActorPacket.h"
|
||||||
|
|
||||||
#include "Action/Action.h"
|
#include "Action/Action.h"
|
||||||
|
|
||||||
|
@ -553,15 +554,21 @@ void Sapphire::Network::GameConnection::commandHandler( const Packets::FFXIVARR_
|
||||||
player.sendToInRangeSet( makeActorControl( player.getId(), ActorControlType::EmoteInterrupt ) );
|
player.sendToInRangeSet( makeActorControl( player.getId(), ActorControlType::EmoteInterrupt ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* case PacketCommand::PersistentEmoteCancel: // cancel persistent emote
|
case PacketCommand::EMOTE_MODE_CANCEL:
|
||||||
{
|
{
|
||||||
player.setPersistentEmote( 0 );
|
if( player.getPersistentEmote() > 0 )
|
||||||
player.emoteInterrupt();
|
{
|
||||||
player.setStatus( ActorStatus::Idle );
|
auto movePacket = std::make_shared< MoveActorPacket >( player, player.getRot(), 2, 0, 0, 0x5A / 4 );
|
||||||
auto pSetStatusPacket = makeActorControl( player.getId(), SetStatus, static_cast< uint8_t >( ActorStatus::Idle ) );
|
player.sendToInRangeSet( movePacket );
|
||||||
player.sendToInRangeSet( pSetStatusPacket );
|
|
||||||
|
player.setPersistentEmote( 0 );
|
||||||
|
player.sendToInRangeSet( makeActorControl( player.getId(), ActorControlType::EmoteModeInterrupt ) );
|
||||||
|
player.setStatus( ActorStatus::Idle );
|
||||||
|
|
||||||
|
player.sendToInRangeSet( makeActorControl( player.getId(), SetStatus, static_cast< uint8_t >( ActorStatus::Idle ) ) );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}*/
|
}
|
||||||
case PacketCommand::POSE_EMOTE_CONFIG: // change pose
|
case PacketCommand::POSE_EMOTE_CONFIG: // change pose
|
||||||
case PacketCommand::POSE_EMOTE_WORK: // reapply pose
|
case PacketCommand::POSE_EMOTE_WORK: // reapply pose
|
||||||
{
|
{
|
||||||
|
@ -572,9 +579,6 @@ void Sapphire::Network::GameConnection::commandHandler( const Packets::FFXIVARR_
|
||||||
}
|
}
|
||||||
case PacketCommand::POSE_EMOTE_CANCEL: // cancel pose
|
case PacketCommand::POSE_EMOTE_CANCEL: // cancel pose
|
||||||
{
|
{
|
||||||
player.setPose( static_cast< uint8_t >( param12 ) );
|
|
||||||
auto pSetStatusPacket = makeActorControl( player.getId(), SetPose, param11, param12 );
|
|
||||||
player.sendToInRangeSet( pSetStatusPacket, true );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PacketCommand::REVIVE: // return dead / accept raise
|
case PacketCommand::REVIVE: // return dead / accept raise
|
||||||
|
|
Loading…
Add table
Reference in a new issue