From 9bc5b82a26579f7f67ff8bfb641cafbb05d5fd5c Mon Sep 17 00:00:00 2001 From: santacrab2 <79347566+santacrab2@users.noreply.github.com> Date: Fri, 21 Apr 2023 02:18:53 -0400 Subject: [PATCH] - Updates RaidBlockPointer and BlockKeyPointer (#146) - Updates Block size from 32 to 48 for search --- RaidCrawler.Core/Connection/ConnectionWrapper.cs | 6 +++--- RaidCrawler.Core/Structures/Offsets.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RaidCrawler.Core/Connection/ConnectionWrapper.cs b/RaidCrawler.Core/Connection/ConnectionWrapper.cs index 0d3d8bb..34443db 100644 --- a/RaidCrawler.Core/Connection/ConnectionWrapper.cs +++ b/RaidCrawler.Core/Connection/ConnectionWrapper.cs @@ -131,8 +131,8 @@ public async Task SearchSaveKey(uint key, CancellationToken token) while (start < end) { - var block_ct = (end - start) / 32; - var mid = start + (block_ct >> 1) * 32; + var block_ct = (end - start) / 48; + var mid = start + (block_ct >> 1) * 48; data = await Connection.ReadBytesAbsoluteAsync(mid, 4, token).ConfigureAwait(false); var found = BitConverter.ToUInt32(data); @@ -141,7 +141,7 @@ public async Task SearchSaveKey(uint key, CancellationToken token) if (found >= key) end = mid; - else start = mid + 32; + else start = mid + 48; } return start; } diff --git a/RaidCrawler.Core/Structures/Offsets.cs b/RaidCrawler.Core/Structures/Offsets.cs index e6cf193..e5aa73a 100644 --- a/RaidCrawler.Core/Structures/Offsets.cs +++ b/RaidCrawler.Core/Structures/Offsets.cs @@ -6,8 +6,8 @@ public abstract class Offsets public const string VioletID = "01008F6008C5E000"; public IReadOnlyList SaveBlockPointer = new List() { 0x44AAC88, 0xE0, 0x80, 0x08, 0x0 }; // Thanks Lincoln-LM! - public IReadOnlyList RaidBlockPointer = new List() { 0x44A98C8, 0x180, 0x40 }; - public IReadOnlyList BlockKeyPointer = new List() { 0x449EEE8, 0xD8, 0x0, 0x0, 0x30, 0x0 }; + public IReadOnlyList RaidBlockPointer = new List() { 0x44BFBA8, 0x180, 0x40 }; + public IReadOnlyList BlockKeyPointer = new List() { 0x44B5158, 0xD8, 0x0, 0x0, 0x30, 0x0 }; public IReadOnlyList DifficultyFlags = new List() { 0xEC95D8EF, 0xA9428DFE, 0x9535F471, 0x6E7F8220 }; public const uint BCATRaidBinaryLocation = 0x520A1B0; // Thanks Lincoln-LM!