From f5149c9625efc20a650801a1ac3cc7e9e82d9b53 Mon Sep 17 00:00:00 2001 From: collett Date: Wed, 12 Jun 2024 19:39:09 +0900 Subject: [PATCH] fix CF register --- src/common/Network/PacketDef/Ipcs.h | 4 ++-- src/common/Network/PacketDef/Zone/ServerZoneDef.h | 11 ++++------- src/world/Network/Handlers/CFHandlers.cpp | 8 ++++---- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/common/Network/PacketDef/Ipcs.h b/src/common/Network/PacketDef/Ipcs.h index 1dc42c7a..c3631266 100644 --- a/src/common/Network/PacketDef/Ipcs.h +++ b/src/common/Network/PacketDef/Ipcs.h @@ -341,10 +341,10 @@ enum ClientZoneIpcType : FinishLoadingHandler = 0x12A, // updated 6.58 hotfix 2 - CFCommenceHandler = 0x0381, // updated 5.58h + CFCommenceHandler = 0x0242, // updated 6.58 hotfix 2 CFCancelHandler = 0x02B2, // updated 5.58h - CFRegisterDuty = 0x01BD, // updated 5.58h + CFRegisterDuty = 0x0312, // updated 6.58 hotfix 2 CFRegisterRoulette = 0x037A, // updated 5.58h PlayTimeHandler = 0x02B7, // updated 5.58h LogoutHandler = 0x384, // updated 6.58 hotfix 2 diff --git a/src/common/Network/PacketDef/Zone/ServerZoneDef.h b/src/common/Network/PacketDef/Zone/ServerZoneDef.h index 2f61e451..039c1c16 100644 --- a/src/common/Network/PacketDef/Zone/ServerZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ServerZoneDef.h @@ -1607,15 +1607,12 @@ namespace Sapphire::Network::Packets::Server */ struct FFXIVIpcCFNotify : FFXIVIpcBasePacket< CFNotify > { - uint32_t state1; // 3 = cancelled, 4 = duty ready - uint32_t state2; // if state1 == 3, state2 is cancelled reason + uint32_t state1; + uint32_t unknown[5]; - uint32_t param1; // usually classJobId - uint32_t param2; // usually flag - uint32_t param3; // usually languages, sometimes join in progress timestamp - - uint16_t param4; // usually roulette id + uint32_t unknown_one; uint16_t contents[5]; + uint16_t padding; }; /** diff --git a/src/world/Network/Handlers/CFHandlers.cpp b/src/world/Network/Handlers/CFHandlers.cpp index 9778d37c..ca281f92 100644 --- a/src/world/Network/Handlers/CFHandlers.cpp +++ b/src/world/Network/Handlers/CFHandlers.cpp @@ -46,7 +46,7 @@ void Sapphire::Network::GameConnection::cfRegisterDuty( const Packets::FFXIVARR_ Packets::FFXIVARR_PACKET_RAW copy = inPacket; std::vector< uint16_t > selectedContent; - for( uint32_t offset = 0x1E; offset <= 0x26; offset += 0x2 ) + for( uint32_t offset = 0x2A; offset <= 0x32; offset += 0x2 ) { auto id = *reinterpret_cast< uint16_t* >( ©.data[ offset ] ); if( id == 0 ) @@ -64,9 +64,9 @@ void Sapphire::Network::GameConnection::cfRegisterDuty( const Packets::FFXIVARR_ player.sendDebug( "Duty register request for contentFinderConditionId#{0}", contentFinderConditionId ); player.m_cfNotifiedContent = contentFinderConditionId; auto notify = makeZonePacket< FFXIVIpcCFNotify >( player.getId() ); - notify->data().state1 = 8195; - notify->data().param3 = 1; - notify->data().param4 = contentFinderConditionId; + notify->data().state1 = 3; + notify->data().unknown_one = 1; + notify->data().contents[ 0 ] = contentFinderConditionId; player.queuePacket( notify ); }