From 3b2fa785b60f2d3e76e9ca388444a5e660de8339 Mon Sep 17 00:00:00 2001
From: GradualSyrup <68757075+GradualSyrup@users.noreply.github.com>
Date: Fri, 16 Feb 2024 09:43:36 -0600
Subject: [PATCH] Fix Offset for GET_BATTLE_OBJECT_FROM_ID

---
 src/common/offsets.rs | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/common/offsets.rs b/src/common/offsets.rs
index 2ad8088..6f684db 100644
--- a/src/common/offsets.rs
+++ b/src/common/offsets.rs
@@ -52,17 +52,16 @@ macro_rules! impl_offset {
 //
 // Recommended to use the first 8 instructions (32 bytes), unless the function is shorter
 
-// OFFSET_GET_BATTLE_OBJECT_FROM_ID = 0x3ac540
-// TODO: This is wrong, its giving same offset as SET_CPU_CONTROLS 0x2da180
+// OFFSET_GET_BATTLE_OBJECT_FROM_ID = 0x3ac560
 static NEEDLE_GET_BATTLE_OBJECT_FROM_ID: &[u8] = &[
-    0xff, 0x03, 0x06, 0xd1,
-    0xee, 0x73, 0x00, 0xfd,
-    0xed, 0x33, 0x0f, 0x6d,
-    0xeb, 0x2b, 0x10, 0x6d,
-    0xe9, 0x23, 0x11, 0x6d,
-    0xfc, 0x6f, 0x12, 0xa9,
-    0xfa, 0x67, 0x13, 0xa9,
-    0xf8, 0x5f, 0x14, 0xa9,
+    0x08, 0x7c, 0x1c, 0x53,
+    0x1f, 0x11, 0x00, 0x71,
+    0x68, 0x07, 0x00, 0x54,
+    0x49, 0x08, 0x02, 0xf0,
+    0x29, 0xd1, 0x07, 0x91,
+    0x28, 0x79, 0xa8, 0xb8,
+    0x08, 0x01, 0x09, 0x8b,
+    0x00, 0x01, 0x1f, 0xd6,
 ];
 impl_offset!(GET_BATTLE_OBJECT_FROM_ID);