From 8c9bdf58caaaa822c971c9ab667dc5d801e0e36a Mon Sep 17 00:00:00 2001 From: Jeido Date: Wed, 9 Feb 2022 00:01:17 +0100 Subject: [PATCH 1/4] more 6.08 opcodes --- src/common/Network/PacketDef/Ipcs.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/common/Network/PacketDef/Ipcs.h b/src/common/Network/PacketDef/Ipcs.h index 4c9720b6..ec55e9a4 100644 --- a/src/common/Network/PacketDef/Ipcs.h +++ b/src/common/Network/PacketDef/Ipcs.h @@ -43,8 +43,8 @@ namespace Sapphire::Network::Packets */ enum ServerZoneIpcType : uint16_t { - Ping = 0x02A8, // updated 5.58 hotfix - Init = 0x0182, // updated 5.58 hotfix + Ping = 0x00FA, // updated 6.08 + Init = 0x0182, // updated 6.08 ActorFreeSpawn = 0x0082, // updated 6.08 InitZone = 0x01EB, // updated 6.08 @@ -176,8 +176,8 @@ namespace Sapphire::Network::Packets SetLevelSync = 0x1186, // not updated for 4.4, not sure what it is anymore - ItemInfo = 0x01CC, // updated 5.58 hotfix - ContainerInfo = 0x025C, // updated 5.58 hotfix + ItemInfo = 0x02A9, // updated 6.08 + ContainerInfo = 0x037A, // updated 6.08 InventoryTransactionFinish = 0x0176, // updated 5.58 hotfix InventoryTransaction = 0x027F, // updated 5.58 hotfix CurrencyCrystalInfo = 0x0345, // updated 5.58 hotfix @@ -329,8 +329,8 @@ namespace Sapphire::Network::Packets CFCancelHandler = 0x02B2, // updated 5.58 hotfix CFRegisterDuty = 0x01BD, // updated 5.58 hotfix CFRegisterRoulette = 0x037A, // updated 5.58 hotfix - PlayTimeHandler = 0x02B7, // updated 5.58 hotfix - LogoutHandler = 0x00A0, // updated 5.58 hotfix + PlayTimeHandler = 0x0279, // updated 6.08 + LogoutHandler = 0x0125, // updated 6.08 CancelLogout = 0x01AC, // updated 5.58 hotfix CFDutyInfoHandler = 0xF078, // updated 4.2 @@ -380,8 +380,8 @@ namespace Sapphire::Network::Packets PlaceFieldMarkerPreset = 0x026D, // updated 5.58 hotfix PlaceFieldMarker = 0x0371, // updated 5.58 hotfix SkillHandler = 0x008E, // updated 6.08 - GMCommand1 = 0x0272, // updated 5.58 hotfix - GMCommand2 = 0x00E9, // updated 5.58 hotfix + GMCommand1 = 0x0290, // updated 6.08 + GMCommand2 = 0x0203, // updated 6.08 AoESkillHandler = 0x0152, // updated 5.58 hotfix UpdatePositionHandler = 0x0147, // updated 6.08 From 9ace700726714f2e232bb3226492e699d791af03 Mon Sep 17 00:00:00 2001 From: Jeido Date: Wed, 9 Feb 2022 00:02:58 +0100 Subject: [PATCH 2/4] Player arrays from perch's PlayerSetup --- src/world/Actor/Player.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/world/Actor/Player.h b/src/world/Actor/Player.h index d8991cdd..ca0914d2 100644 --- a/src/world/Actor/Player.h +++ b/src/world/Actor/Player.h @@ -1130,21 +1130,21 @@ namespace Sapphire::Entity uint16_t m_activeTitle; uint8_t m_titleList[48]; - uint8_t m_howTo[34]; - uint8_t m_minions[55]; + uint8_t m_howTo[35]; + uint8_t m_minions[56]; uint8_t m_mountGuide[29]; uint8_t m_homePoint; uint8_t m_startTown; uint16_t m_townWarpFstFlags; uint8_t m_questCompleteFlags[487]; - uint8_t m_discovery[445]; + uint8_t m_discovery[464]; uint32_t m_playTime; uint16_t m_classArray[ Common::CLASSJOB_SLOTS ]; uint32_t m_expArray[ Common::CLASSJOB_SLOTS ]; uint8_t m_aetheryte[21]; uint8_t m_unlocks[64]; - uint8_t m_orchestrion[40]; + uint8_t m_orchestrion[40]; //[64] in PlayerSetup, but setting it to that value crashes world on login uint8_t m_openingSequence; From e0a41d56df057b2f6a9d52027ed31cdc69fa126e Mon Sep 17 00:00:00 2001 From: Jeido Date: Wed, 9 Feb 2022 00:03:15 +0100 Subject: [PATCH 3/4] yolo stats --- src/world/Math/CalcStats.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/world/Math/CalcStats.cpp b/src/world/Math/CalcStats.cpp index 5d00683e..de585c7b 100644 --- a/src/world/Math/CalcStats.cpp +++ b/src/world/Math/CalcStats.cpp @@ -19,7 +19,7 @@ using namespace Sapphire::Math; using namespace Sapphire::Entity; -const int levelTable[81][6] = +const int levelTable[91][6] = { // MAIN,SUB,DIV,HP,ELMT,THREAT { 1, 1, 1, 1, 1, 1 }, @@ -106,6 +106,19 @@ const int levelTable[81][6] = { 330, 376, 3034, 3600, 295, 466 }, { 335, 378, 3164, 3600, 295, 466 }, { 340, 380, 3300, 3600, 569, 569 }, + + // todo: add proper endwalker values - hp/elmt/threat + // copypasta from shb right now + { 296, 365, 2263, 3600, 295, 466 }, + { 300, 366, 2360, 3600, 295, 466 }, + { 305, 367, 2461, 3600, 295, 466 }, + { 310, 368, 2566, 3600, 295, 466 }, + { 315, 370, 2676, 3600, 295, 466 }, + { 320, 372, 2790, 3600, 295, 466 }, + { 325, 374, 2910, 3600, 295, 466 }, + { 330, 376, 3034, 3600, 295, 466 }, + { 335, 378, 3164, 3600, 295, 466 }, + { 340, 380, 3300, 3600, 569, 569 }, }; std::random_device CalcStats::dev; From 91d897e0696a6f67ee85afe2a6e91b5568e6d34c Mon Sep 17 00:00:00 2001 From: Jeido Date: Wed, 9 Feb 2022 00:03:47 +0100 Subject: [PATCH 4/4] MaxLevel, MaxClassJob, TownCount, MaxComboLength --- src/common/Common.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/common/Common.h b/src/common/Common.h index 7c99e125..71578a10 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -22,20 +22,21 @@ namespace Sapphire::Common const int32_t INVALID_GAME_OBJECT_ID = 0xE0000000; const uint64_t INVALID_GAME_OBJECT_ID64 = 0xE0000000; - const uint16_t MAX_PLAYER_LEVEL = 80; + const uint16_t MAX_PLAYER_LEVEL = 90; const uint8_t CURRENT_EXPANSION_ID = 4; - const uint8_t CLASSJOB_TOTAL = 38; + const uint8_t CLASSJOB_TOTAL = 40; const uint8_t CLASSJOB_SLOTS = 30; - const uint8_t TOWN_COUNT = 6; + const uint8_t TOWN_COUNT = 7; /*! * @brief The maximum length (in ms) of a combo before it is canceled/voided. * * The client has a combo timer of about 12 seconds, with a 0.5 second grace on top for latency considerations. + * Changed to 15 seconds in Shadowbringers, then 30 seconds in Endwalker. */ - const uint16_t MAX_COMBO_LENGTH = 12500; + const uint16_t MAX_COMBO_LENGTH = 30000; struct FFXIVARR_POSITION3_U16 {