1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-29 23:57:46 +00:00

Mostly fixed for 4.4

This commit is contained in:
Mordred 2018-09-18 22:45:48 +02:00
parent 83c5cd0b44
commit 0aa94d6efc
9 changed files with 10528 additions and 8524 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -197,7 +197,7 @@ enum ServerZoneIpcType :
// Unknown IPC types that still need to be sent
// TODO: figure all these out properly
IPCTYPE_UNK_320 = 0x0248, // updated 4.4
IPCTYPE_UNK_320 = 0x0249, // updated 4.4
IPCTYPE_UNK_322 = 0x024B, // updated 4.4
};
@ -249,40 +249,40 @@ enum ClientZoneIpcType :
ReqJoinNoviceNetwork = 0x0129, // updated 4.2
ReqCountdownInitiate = 0x0138, // updated 4.3
ReqCountdownCancel = 0x0139, // updated 4.3
ClearWaymarks = 0x013A, // updated 4.3
ReqCountdownInitiate = 0x012F, // updated 4.4
ReqCountdownCancel = 0x0130, // updated 4.4
ClearWaymarks = 0x0131, // updated 4.4
ZoneLineHandler = 0x013C, // updated 4.3
ClientTrigger = 0x013D, // updated 4.3
DiscoveryHandler = 0x013E, // updated 4.3
ZoneLineHandler = 0x0133, // updated 4.4
ClientTrigger = 0x0134, // updated 4.4 was 13D in 4.3
DiscoveryHandler = 0x0135, // updated 4.4
AddWaymark = 0x013F, // updated 4.3
SkillHandler = 0x0140, // updated 4.3
GMCommand1 = 0x0141, // updated 4.3
GMCommand2 = 0x0142, // updated 4.3
SkillHandler = 0x0137, // updated 4.4
GMCommand1 = 0x0138, // updated 4.4
GMCommand2 = 0x0139, // updated 4.4
UpdatePositionHandler = 0x0144, // updated 4.3
UpdatePositionHandler = 0x013B, // updated 4.4 was 144
UpdatePositionInstance = 0x0183, // updated 4.3
InventoryModifyHandler = 0x014B, // updated 4.3
InventoryModifyHandler = 0x0142, // updated 4.4
TalkEventHandler = 0x0154, // updated 4.3
EmoteEventHandler = 0x0155, // updated 4.3
WithinRangeEventHandler = 0x0156, // updated 4.3
OutOfRangeEventHandler = 0x0157, // updated 4.3
EnterTeriEventHandler = 0x0158, // updated 4.3
TalkEventHandler = 0x014B, // updated 4.4
EmoteEventHandler = 0x014C, // updated 4.4
WithinRangeEventHandler = 0x014D, // updated 4.4
OutOfRangeEventHandler = 0x014E, // updated 4.4
EnterTeriEventHandler = 0x014F, // updated 4.4
ReturnEventHandler = 0x015D, // updated 4.3
TradeReturnEventHandler = 0x015E, // updated 4.3
ReturnEventHandler = 0x0154, // updated 4.4
TradeReturnEventHandler = 0x0155, // updated 4.4
LinkshellEventHandler = 0x0150, // updated 4.1 ??
LinkshellEventHandler1 = 0x0151, // updated 4.1 ??
PerformNoteHandler = 0x029B, // updated 4.3
ReqEquipDisplayFlagsChange = 0x0178, // updated 4.3
ReqEquipDisplayFlagsChange = 0x016F, // updated 4.4
};

View file

@ -59,8 +59,7 @@ struct FFXIVIpcServerList :
} server[6];
};
struct FFXIVIpcCharList :
FFXIVIpcBasePacket< LobbyCharList >
struct FFXIVIpcCharList : FFXIVIpcBasePacket< LobbyCharList >
{
uint64_t seq;
uint8_t counter; // current packet count * 4, count * 4 +1 on last packet.
@ -82,6 +81,8 @@ struct FFXIVIpcCharList :
uint16_t unknown8;
uint32_t entitledExpansion;
uint32_t padding2;
uint32_t padding3;
uint32_t padding4;
struct CharaDetails
{
@ -92,16 +93,16 @@ struct FFXIVIpcCharList :
uint32_t padding2;
uint16_t serverId;
uint16_t serverId1;
uint8_t unknown[9];
char nameChara[32];
char nameServer[32];
char nameServer1[32];
char charDetailJson[1028];
char charDetailJson[1051];
} charaDetails[2];
};
struct FFXIVIpcEnterWorld :
FFXIVIpcBasePacket< LobbyEnterWorld >
struct FFXIVIpcEnterWorld : FFXIVIpcBasePacket< LobbyEnterWorld >
{
uint64_t seq;
uint32_t charId;
@ -115,8 +116,7 @@ struct FFXIVIpcEnterWorld :
uint64_t padding4;
};
struct FFXIVIpcCharCreate :
FFXIVIpcBasePacket< LobbyCharCreate >
struct FFXIVIpcCharCreate : FFXIVIpcBasePacket< LobbyCharCreate >
{
uint64_t seq;
uint8_t unknown;
@ -126,17 +126,23 @@ struct FFXIVIpcCharCreate :
uint32_t unknown_3;
uint32_t unknown_4;
uint32_t unknown_5;
uint64_t unknown_6;
uint64_t unknown_61;
uint64_t unknown_62;
uint64_t unknown_63;
uint64_t content_id;
uint16_t unknown_7;
uint16_t unknown_8;
uint32_t unknown_9;
uint16_t unknown_10;
uint8_t unknown_11[11];
char name[32];
char world[32];
char world2[32];
uint8_t unknown_12[0x953];
};
struct FFXIVIpcLobbyError :
FFXIVIpcBasePacket< LobbyError >
struct FFXIVIpcLobbyError : FFXIVIpcBasePacket< LobbyError >
{
uint64_t seq;
uint32_t error_id;

View file

@ -716,6 +716,9 @@ struct FFXIVIpcInitZone :
uint16_t festivalId;
uint16_t additionalFestivalId;
uint32_t unknown8;
uint32_t unknown9;
uint32_t unknown10;
uint32_t unknown11;
Common::FFXIVARR_POSITION3 pos;
};

View file

@ -100,11 +100,11 @@ std::string PlayerMinimal::getLookString()
std::string PlayerMinimal::getModelString()
{
std::string modelString = "\""
+ std::to_string( m_modelEquip[ 0 ] ) + "\",\""
+ std::to_string( m_modelEquip[ 1 ] ) + "\",\""
+ std::to_string( m_modelEquip[ 2 ] ) + "\",\""
+ std::to_string( m_modelEquip[ 3 ] ) + "\",\""
+ std::to_string( m_modelEquip[ 4 ] ) + "\",\""
+ std::to_string( m_modelEquip[ 6 ] ) + "\",\""
+ std::to_string( m_modelEquip[ 7 ] ) + "\",\"5\",\"6\",\"7\",\"8\",\"9\"";
+ std::to_string( m_modelEquip[ 4 ] ) + "\",\"5\",\"6\",\"7\",\"8\",\"9\"";
return modelString;
}

View file

@ -163,11 +163,14 @@ void Core::Network::GameConnection::getCharList( FFXIVARR_PACKET_RAW& packet, ui
details.uniqueId = get< 1 >( charEntry );
details.contentId = get< 2 >( charEntry );
details.serverId = g_serverLobby.getConfig()->getValue< uint16_t >( "Lobby.WorldID", 1 );
details.serverId1 = g_serverLobby.getConfig()->getValue< uint16_t >( "Lobby.WorldID", 1 );
details.index = charIndex;
strcpy( details.charDetailJson, get< 3 >( charEntry ).c_str() );
strcpy( details.nameChara, get< 0 >( charEntry ).c_str() );
strcpy( details.nameServer,
g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() );
strcpy( details.nameServer1,
g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() );
charListPacket->data().charaDetails[ j ] = details;
@ -342,6 +345,8 @@ bool Core::Network::GameConnection::createOrModifyChar( FFXIVARR_PACKET_RAW& pac
strcpy( charCreatePacket->data().name, name.c_str() );
strcpy( charCreatePacket->data().world,
g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() );
strcpy( charCreatePacket->data().world2,
g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() );
charCreatePacket->data().type = 2;
charCreatePacket->data().seq = sequence;
charCreatePacket->data().unknown = 1;

View file

@ -96,7 +96,7 @@ uint32_t Core::Event::mapEventActorToRealActor( uint32_t eventActorId )
auto pExdData = g_fw.get< Data::ExdDataGenerated >();
auto levelInfo = pExdData->get< Core::Data::Level >( eventActorId );
if( levelInfo )
return levelInfo->objectKey;
return levelInfo->object;
return 0;
}

View file

@ -77,7 +77,7 @@ void Core::Network::GameConnection::cfRegisterDuty( const Packets::FFXIVARR_PACK
if( !cfCondition )
return;
auto instance = pTeriMgr->createInstanceContent( cfCondition->instanceContent );
auto instance = pTeriMgr->createInstanceContent( cfCondition->content );
if( !instance )
return;