From 3945a8c0c0e38202395aa45c40a270a27e7b0c38 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 12 Oct 2024 12:02:40 -0700 Subject: [PATCH] Add titanium support --- common/patches/titanium.cpp | 21 ++++++++++++++++----- common/patches/titanium_structs.h | 9 ++++++++- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index e9cec60a6..7d9a5bf55 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -1600,14 +1600,25 @@ namespace Titanium // OUT(unknown19584[4]); // OUT(unknown19588); + const uint8 unknown12864_bytes[] = { + 0x78, 0x03, 0x00, 0x00, 0x1A, 0x04, 0x00, 0x00, 0x1A, 0x04, 0x00, 0x00 + }; - const uint8 bytes[] = { - 0x78, 0x03, 0x00, 0x00, 0x1A, 0x04, 0x00, 0x00, 0x1A, 0x04, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, - 0x19, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, - 0x0F, 0x00, 0x00, 0x00, 0x1F, 0x85, 0xEB, 0x3E, 0x33, 0x33, 0x33, 0x3F, 0x09, 0x00, 0x00, 0x00, + memcpy(eq->unknown12864, unknown12864_bytes, sizeof(unknown12864_bytes)); + + eq->cold_resist = emu->cold_resist; + eq->fire_resist = emu->fire_resist; + eq->magic_resist = emu->magic_resist; + eq->disease_resist = emu->disease_resist; + eq->poison_resist = emu->poison_resist; + eq->physical_resist = 15; + + const uint8 unknown12900_bytes[] = { + 0x1F, 0x85, 0xEB, 0x3E, 0x33, 0x33, 0x33, 0x3F, 0x09, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14 }; - memcpy(eq->unknown12864, bytes, sizeof(bytes)); + + memcpy(eq->unknown12900, unknown12900_bytes, sizeof(unknown12900_bytes)); //set the checksum... CRC32::SetEQChecksum(__packet->pBuffer, sizeof(structs::PlayerProfile_Struct) - 4); diff --git a/common/patches/titanium_structs.h b/common/patches/titanium_structs.h index 831198363..76d7c4c72 100644 --- a/common/patches/titanium_structs.h +++ b/common/patches/titanium_structs.h @@ -879,7 +879,14 @@ struct PlayerProfile_Struct /*12564*/ PotionBelt_Struct potionbelt; // potion belt /*12852*/ uint8 unknown12852[8]; /*12860*/ uint32 available_slots; -/*12864*/ uint8 unknown12864[76]; +/*12864*/ uint8 unknown12864[12]; +/*12876*/ uint32 cold_resist; +/*12880*/ uint32 fire_resist; +/*12884*/ uint32 magic_resist; +/*12888*/ uint32 disease_resist; +/*12892*/ uint32 poison_resist; +/*12896*/ uint32 physical_resist; +/*12900*/ uint8 unknown12900[40]; /*12940*/ char name[64]; // Name of player /*13004*/ char last_name[32]; // Last name of player /*13036*/ uint32 guild_id; // guildid