mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 22:17:45 +00:00
Persistent emotes now show properly to other players on spawn
This commit is contained in:
parent
df090c0517
commit
e7e8977d5b
4 changed files with 39 additions and 5 deletions
|
@ -1425,12 +1425,19 @@ Core::Data::Emote::Emote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData
|
||||||
auto row = exdData->m_EmoteDat.get_row( row_id );
|
auto row = exdData->m_EmoteDat.get_row( row_id );
|
||||||
name = exdData->getField< std::string >( row, 0 );
|
name = exdData->getField< std::string >( row, 0 );
|
||||||
emoteCategory = exdData->getField< uint8_t >( row, 11 );
|
emoteCategory = exdData->getField< uint8_t >( row, 11 );
|
||||||
|
emoteMode = exdData->getField< uint8_t >( row, 12 );
|
||||||
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 );
|
||||||
logMessageUntargeted = exdData->getField< uint16_t >( row, 21 );
|
logMessageUntargeted = exdData->getField< uint16_t >( row, 21 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Core::Data::EmoteMode::EmoteMode( uint32_t row_id, Core::Data::ExdDataGenerated* exdData )
|
||||||
|
{
|
||||||
|
auto row = exdData->m_EmoteDat.get_row( row_id );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Core::Data::EmoteCategory::EmoteCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData )
|
Core::Data::EmoteCategory::EmoteCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData )
|
||||||
{
|
{
|
||||||
auto row = exdData->m_EmoteCategoryDat.get_row( row_id );
|
auto row = exdData->m_EmoteCategoryDat.get_row( row_id );
|
||||||
|
@ -4553,6 +4560,7 @@ bool Core::Data::ExdDataGenerated::init( const std::string& path )
|
||||||
m_DpsChallengeTransientDat = setupDatAccess( "DpsChallengeTransient", xiv::exd::Language::none );
|
m_DpsChallengeTransientDat = setupDatAccess( "DpsChallengeTransient", xiv::exd::Language::none );
|
||||||
m_EmoteDat = setupDatAccess( "Emote", xiv::exd::Language::en );
|
m_EmoteDat = setupDatAccess( "Emote", xiv::exd::Language::en );
|
||||||
m_EmoteCategoryDat = setupDatAccess( "EmoteCategory", xiv::exd::Language::en );
|
m_EmoteCategoryDat = setupDatAccess( "EmoteCategory", xiv::exd::Language::en );
|
||||||
|
m_EmoteModeDat = setupDatAccess( "EmoteMode", xiv::exd::Language::none );
|
||||||
m_ENpcBaseDat = setupDatAccess( "ENpcBase", xiv::exd::Language::none );
|
m_ENpcBaseDat = setupDatAccess( "ENpcBase", xiv::exd::Language::none );
|
||||||
m_ENpcResidentDat = setupDatAccess( "ENpcResident", xiv::exd::Language::en );
|
m_ENpcResidentDat = setupDatAccess( "ENpcResident", xiv::exd::Language::en );
|
||||||
m_EObjDat = setupDatAccess( "EObj", xiv::exd::Language::none );
|
m_EObjDat = setupDatAccess( "EObj", xiv::exd::Language::none );
|
||||||
|
|
|
@ -1603,6 +1603,7 @@ struct Emote
|
||||||
uint16_t icon;
|
uint16_t icon;
|
||||||
uint16_t logMessageTargeted;
|
uint16_t logMessageTargeted;
|
||||||
uint16_t logMessageUntargeted;
|
uint16_t logMessageUntargeted;
|
||||||
|
uint8_t emoteMode;
|
||||||
|
|
||||||
Emote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData );
|
Emote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData );
|
||||||
};
|
};
|
||||||
|
@ -1614,6 +1615,19 @@ struct EmoteCategory
|
||||||
EmoteCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData );
|
EmoteCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct EmoteMode
|
||||||
|
{
|
||||||
|
std::string name;
|
||||||
|
uint8_t emoteCategory;
|
||||||
|
int32_t textCommand;
|
||||||
|
uint16_t icon;
|
||||||
|
uint16_t logMessageTargeted;
|
||||||
|
uint16_t logMessageUntargeted;
|
||||||
|
|
||||||
|
EmoteMode( uint32_t row_id, Core::Data::ExdDataGenerated* exdData );
|
||||||
|
};
|
||||||
|
|
||||||
struct ENpcBase
|
struct ENpcBase
|
||||||
{
|
{
|
||||||
std::vector< uint32_t > eNpcData;
|
std::vector< uint32_t > eNpcData;
|
||||||
|
@ -4133,6 +4147,7 @@ struct ZoneSharedGroup
|
||||||
xiv::exd::Exd m_DpsChallengeTransientDat;
|
xiv::exd::Exd m_DpsChallengeTransientDat;
|
||||||
xiv::exd::Exd m_EmoteDat;
|
xiv::exd::Exd m_EmoteDat;
|
||||||
xiv::exd::Exd m_EmoteCategoryDat;
|
xiv::exd::Exd m_EmoteCategoryDat;
|
||||||
|
xiv::exd::Exd m_EmoteModeDat;
|
||||||
xiv::exd::Exd m_ENpcBaseDat;
|
xiv::exd::Exd m_ENpcBaseDat;
|
||||||
xiv::exd::Exd m_ENpcResidentDat;
|
xiv::exd::Exd m_ENpcResidentDat;
|
||||||
xiv::exd::Exd m_EObjDat;
|
xiv::exd::Exd m_EObjDat;
|
||||||
|
@ -4861,6 +4876,7 @@ struct ZoneSharedGroup
|
||||||
std::set< uint32_t > m_DpsChallengeOfficerIdList;
|
std::set< uint32_t > m_DpsChallengeOfficerIdList;
|
||||||
std::set< uint32_t > m_DpsChallengeTransientIdList;
|
std::set< uint32_t > m_DpsChallengeTransientIdList;
|
||||||
std::set< uint32_t > m_EmoteIdList;
|
std::set< uint32_t > m_EmoteIdList;
|
||||||
|
std::set< uint32_t > m_EmoteModeIdList;
|
||||||
std::set< uint32_t > m_EmoteCategoryIdList;
|
std::set< uint32_t > m_EmoteCategoryIdList;
|
||||||
std::set< uint32_t > m_ENpcBaseIdList;
|
std::set< uint32_t > m_ENpcBaseIdList;
|
||||||
std::set< uint32_t > m_ENpcResidentIdList;
|
std::set< uint32_t > m_ENpcResidentIdList;
|
||||||
|
@ -5823,6 +5839,12 @@ const std::set< uint32_t >& getEmoteIdList()
|
||||||
loadIdList( m_EmoteDat, m_EmoteIdList );
|
loadIdList( m_EmoteDat, m_EmoteIdList );
|
||||||
return m_EmoteIdList;
|
return m_EmoteIdList;
|
||||||
}
|
}
|
||||||
|
const std::set< uint32_t >& getEmoteModeIdList()
|
||||||
|
{
|
||||||
|
if( m_EmoteModeIdList.size() == 0 )
|
||||||
|
loadIdList( m_EmoteModeDat, m_EmoteModeIdList );
|
||||||
|
return m_EmoteModeIdList;
|
||||||
|
}
|
||||||
const std::set< uint32_t >& getEmoteCategoryIdList()
|
const std::set< uint32_t >& getEmoteCategoryIdList()
|
||||||
{
|
{
|
||||||
if( m_EmoteCategoryIdList.size() == 0 )
|
if( m_EmoteCategoryIdList.size() == 0 )
|
||||||
|
|
|
@ -46,7 +46,9 @@ public:
|
||||||
Crafting = 0x05,
|
Crafting = 0x05,
|
||||||
Gathering = 0x06,
|
Gathering = 0x06,
|
||||||
Melding = 0x07,
|
Melding = 0x07,
|
||||||
SMachine = 0x08
|
SMachine = 0x08,
|
||||||
|
Carry = 0x09,
|
||||||
|
EmoteMode = 0x0B
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! ModelType as found in eventsystemdefine.exd */
|
/*! ModelType as found in eventsystemdefine.exd */
|
||||||
|
|
|
@ -150,15 +150,17 @@ void Core::Network::GameConnection::clientTriggerHandler( const Packets::FFXIVAR
|
||||||
if( !emoteData )
|
if( !emoteData )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// TODO: This is wrong!! EmoteCategory does not define whether an emote is persistent or not.
|
bool isPersistent = emoteData->emoteMode != 0;
|
||||||
// What defines an emote as persistent is EmoteData != 0
|
|
||||||
bool isPersistent = emoteData->emoteCategory == static_cast< uint8_t >( EmoteCategory::Persistent );
|
|
||||||
|
|
||||||
if( isPersistent )
|
if( isPersistent )
|
||||||
{
|
{
|
||||||
player.setStance( Entity::Chara::Stance::Passive );
|
player.setStance( Entity::Chara::Stance::Passive );
|
||||||
player.setAutoattack( false );
|
player.setAutoattack( false );
|
||||||
player.setPersistentEmote( emoteId );
|
player.setPersistentEmote( emoteData->emoteMode );
|
||||||
|
player.setStatus( Entity::Chara::ActorStatus::EmoteMode );
|
||||||
|
player.sendToInRangeSet(
|
||||||
|
boost::make_shared< ActorControlPacket142 >( player.getId(), ActorControlType::SetStatus,
|
||||||
|
static_cast< uint8_t >( Entity::Chara::ActorStatus::EmoteMode ) ), true );
|
||||||
}
|
}
|
||||||
|
|
||||||
player.emote( emoteId, targetId, isSilent );
|
player.emote( emoteId, targetId, isSilent );
|
||||||
|
|
Loading…
Add table
Reference in a new issue