1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-04 17:57:47 +00:00

Fixed battleTalk

This commit is contained in:
Mordred 2025-01-07 14:22:42 +01:00
parent beeae1b5c8
commit 0f982a46d1
7 changed files with 25 additions and 12 deletions

View file

@ -105,10 +105,10 @@
},
{
"data": {
"battleTalkId": 2939,
"battleTalkId": 2601,
"handlerActorName": "Ifrit",
"kind": 1,
"nameId": 2961,
"kind": 2,
"nameId": 1185,
"params": [
0
],
@ -219,10 +219,10 @@
"timepoints": [
{
"data": {
"battleTalkId": 2939,
"battleTalkId": 2602,
"handlerActorName": "Ifrit",
"kind": 1,
"nameId": 2961,
"kind": 2,
"nameId": 1185,
"params": [
0
],

View file

@ -1273,6 +1273,7 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
struct FFXIVIpcBattleTalkN
{
uint32_t handlerId;
uint32_t padding;
uint64_t talkerId;
uint8_t kind;
uint8_t __padding1;

View file

@ -508,12 +508,23 @@ namespace Sapphire::Encounter
// todo: use Actrl EventBattleDialog = 0x39C maybe?,
auto& playerMgr = Common::Service< Sapphire::World::Manager::PlayerMgr >::ref();
// todo: this does not always need to be a director, and can also be an eventhandler
// needs further investigation
Event::DirectorPtr pDirector = pTeri->getAsInstanceContent();
if( pDirector == nullptr )
pDirector = pTeri->getAsQuestBattle();
if( pDirector )
handlerId = pDirector->getDirectorId();
for( auto& player : pTeri->getPlayers() )
{
auto& pPlayer = player.second;
if( pPlayer )
playerMgr.sendBattleTalk( *pPlayer.get(), pBtData->m_battleTalkId, handlerId,
pBtData->m_kind, pBtData->m_nameId, talkerId,
pBtData->m_kind, pBtData->m_nameId, talkerId, m_duration,
params[ 0 ], params[ 1 ], params[ 2 ], params[ 3 ],
params[ 4 ], params[ 5 ], params[ 6 ], params[ 7 ] );
}

View file

@ -464,11 +464,11 @@ void PlayerMgr::sendLogMessage( Entity::Player& player, uint32_t messageId, uint
}
void PlayerMgr::sendBattleTalk( Sapphire::Entity::Player& player, uint32_t battleTalkId, uint32_t handlerId,
uint32_t kind, uint32_t nameId, uint32_t talkerId,
uint32_t kind, uint32_t nameId, uint32_t talkerId, uint32_t time,
uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4,
uint32_t param5, uint32_t param6, uint32_t param7, uint32_t param8 )
{
Network::Util::Packet::sendBattleTalk( player, battleTalkId, handlerId, kind, nameId, talkerId,
Network::Util::Packet::sendBattleTalk( player, battleTalkId, handlerId, kind, nameId, talkerId, time,
param1, param2, param3, param4, param5, param6, param7, param8 );
}

View file

@ -76,7 +76,7 @@ namespace Sapphire::World::Manager
uint32_t param4 = 0, uint32_t param5 = 0, uint32_t param6 = 0 );
static void sendBattleTalk( Sapphire::Entity::Player& player, uint32_t battleTalkId, uint32_t handlerId, uint32_t kind,
uint32_t nameId, uint32_t talkerId,
uint32_t nameId, uint32_t talkerId, uint32_t time,
uint32_t param1 = 0, uint32_t param2 = 0, uint32_t param3 = 0, uint32_t param4 = 0,
uint32_t param5 = 0, uint32_t param6 = 0, uint32_t param7 = 0, uint32_t param8 = 0 );

View file

@ -168,7 +168,7 @@ void Util::Packet::sendActorControlTarget( const std::set< uint64_t >& character
}
void Sapphire::Network::Util::Packet::sendBattleTalk( Sapphire::Entity::Player& player, uint32_t battleTalkId, uint32_t handlerId,
uint32_t kind, uint32_t nameId, uint32_t talkerId,
uint32_t kind, uint32_t nameId, uint32_t talkerId, uint32_t time,
uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4,
uint32_t param5, uint32_t param6, uint32_t param7, uint32_t param8 )
{
@ -179,6 +179,7 @@ void Sapphire::Network::Util::Packet::sendBattleTalk( Sapphire::Entity::Player&
data.nameId = nameId;
data.kind = kind;
data.talkerId = talkerId;
data.time = time;
data.args[ 0 ] = param1;
data.args[ 1 ] = param2;

View file

@ -70,7 +70,7 @@ namespace Sapphire::Network::Util::Packet
uint32_t param2 = 0, uint32_t param3 = 0, uint32_t param4 = 0, uint32_t param5 = 0, uint32_t param6 = 0 );
void sendBattleTalk( Sapphire::Entity::Player& player, uint32_t battleTalkId, uint32_t handlerId,
uint32_t kind, uint32_t nameId, uint32_t talkerId,
uint32_t kind, uint32_t nameId, uint32_t talkerId, uint32_t time,
uint32_t param1 = 0, uint32_t param2= 0, uint32_t param3 = 0, uint32_t param4 = 0,
uint32_t param5 = 0, uint32_t param6= 0, uint32_t param7 = 0, uint32_t param8 = 0 );
}