1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-29 07:37:45 +00:00

Merge pull request #347 from NotAdam/develop

fix emotes that unholster weapons and sit animations work now
This commit is contained in:
Mordred 2018-07-12 13:22:31 +02:00 committed by GitHub
commit dedc81bc9d
5 changed files with 11 additions and 3 deletions

View file

@ -1427,6 +1427,7 @@ Core::Data::Emote::Emote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData
emoteCategory = exdData->getField< uint8_t >( row, 11 ); emoteCategory = exdData->getField< uint8_t >( row, 11 );
emoteMode = exdData->getField< uint8_t >( row, 12 ); emoteMode = exdData->getField< uint8_t >( row, 12 );
hasCancelEmote = exdData->getField< bool >( row, 15 ); hasCancelEmote = exdData->getField< bool >( row, 15 );
drawsWeapon = exdData->getField< bool >( row, 16 );
textCommand = exdData->getField< int32_t >( row, 18 ); textCommand = exdData->getField< int32_t >( row, 18 );
icon = exdData->getField< uint16_t >( row, 19 ); icon = exdData->getField< uint16_t >( row, 19 );
logMessageTargeted = exdData->getField< uint16_t >( row, 20 ); logMessageTargeted = exdData->getField< uint16_t >( row, 20 );

View file

@ -1605,6 +1605,7 @@ struct Emote
uint16_t logMessageUntargeted; uint16_t logMessageUntargeted;
uint8_t emoteMode; uint8_t emoteMode;
bool hasCancelEmote; bool hasCancelEmote;
bool drawsWeapon;
Emote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); Emote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData );
}; };

View file

@ -17,7 +17,7 @@ namespace Core {
enum ActorControlType : uint16_t enum ActorControlType : uint16_t
{ {
ToggleWeapon = 0x01, ToggleWeapon = 0x00,
SetStatus = 0x02, SetStatus = 0x02,
CastStart = 0x03, CastStart = 0x03,
ToggleAggro = 0x04, ToggleAggro = 0x04,

View file

@ -257,7 +257,7 @@ void Core::Entity::Chara::setStance( Stance stance )
{ {
m_currentStance = stance; m_currentStance = stance;
FFXIVPacketBasePtr packet = boost::make_shared< ActorControlPacket142 >( m_id, ToggleAggro, stance, 1 ); FFXIVPacketBasePtr packet = boost::make_shared< ActorControlPacket142 >( m_id, ToggleWeapon, stance, 0 );
sendToInRangeSet( packet ); sendToInRangeSet( packet );
} }

View file

@ -150,6 +150,8 @@ void Core::Network::GameConnection::clientTriggerHandler( const Packets::FFXIVAR
if( !emoteData ) if( !emoteData )
return; return;
player.emote( emoteId, targetId, isSilent );
bool isPersistent = emoteData->emoteMode != 0; bool isPersistent = emoteData->emoteMode != 0;
if( isPersistent ) if( isPersistent )
@ -164,7 +166,11 @@ void Core::Network::GameConnection::clientTriggerHandler( const Packets::FFXIVAR
static_cast< uint8_t >( Entity::Chara::ActorStatus::EmoteMode ), emoteData->hasCancelEmote ? 1 : 0 ), true ); static_cast< uint8_t >( Entity::Chara::ActorStatus::EmoteMode ), emoteData->hasCancelEmote ? 1 : 0 ), true );
} }
player.emote( emoteId, targetId, isSilent ); if( emoteData->drawsWeapon )
{
player.setStance( Entity::Chara::Stance::Active );
}
break; break;
} }
case ClientTriggerType::EmoteCancel: // emote case ClientTriggerType::EmoteCancel: // emote