From c5d089de681a3e6e0e9e628d11acfe95d72bfabb Mon Sep 17 00:00:00 2001 From: dannuic Date: Sat, 18 Apr 2026 12:08:54 -0600 Subject: [PATCH] Validated message and interrupt packets, needs refactor for full functionality --- common/patches/tob.cpp | 8 ++++---- common/patches/tob_structs.h | 7 +++++++ tob/opcodes.md | 8 ++++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/common/patches/tob.cpp b/common/patches/tob.cpp index 78c0c11c6..a57195041 100644 --- a/common/patches/tob.cpp +++ b/common/patches/tob.cpp @@ -671,8 +671,8 @@ namespace TOB } SerializeBuffer buffer; - buffer.WriteUInt32(emu->unknown0); - buffer.WriteUInt8(0); // Observed + buffer.WriteUInt32(0); // This is a string written like the message arrays + buffer.WriteUInt8(emu->unknown0); buffer.WriteUInt32(emu->string_id); buffer.WriteUInt32(emu->type); @@ -972,7 +972,7 @@ namespace TOB else if (emu->scribing == 3) eq->scribing = 4; else - OUT(scribing); // TODO: can handle 4 here (I assume it's just like 2 or 3 but can have a reduction component) + OUT(scribing); OUT(slot); OUT(spell_id); @@ -3866,7 +3866,7 @@ namespace TOB else if (eq->scribing == 4) emu->scribing = 3; else - IN(scribing); // TODO: Handle 4 here (clicky keyring) + IN(scribing); IN(slot); IN(spell_id); diff --git a/common/patches/tob_structs.h b/common/patches/tob_structs.h index e003490ea..db3cd4ad7 100644 --- a/common/patches/tob_structs.h +++ b/common/patches/tob_structs.h @@ -713,6 +713,13 @@ namespace TOB { /*39*/ }; + struct InterruptCast_Struct + { + uint32 spawnid; + uint32 messageid; + char message[0]; + }; + struct EQAffectSlot_Struct { /*00*/ int32 slot; /*04*/ int32 padding; diff --git a/tob/opcodes.md b/tob/opcodes.md index 7e451637a..31d2b54d2 100644 --- a/tob/opcodes.md +++ b/tob/opcodes.md @@ -79,7 +79,7 @@ Below is a status list for the 450 opcodes we currently use on the server for th | `OP_CancelTask` | 🔴 Not-Set | | | | `OP_CancelTrade` | 🟡 Unverified | | | | `OP_CashReward` | 🟡 Unverified | | | -| `OP_CastSpell` | 🟡 Unverified | | | +| `OP_CastSpell` | 🟢 Verified | | | | `OP_ChangeSize` | 🟢 Verified | | | | `OP_ChannelMessage` | 🟡 Unverified | | | | `OP_ChangePetName` | 🔴 Not-Set | | | @@ -185,7 +185,7 @@ Below is a status list for the 450 opcodes we currently use on the server for th | `OP_FloatListThing` | 🟢 Verified | Movement History. Sent from client, but emu doesn't use it so setting it as verified. Reference is 0x1402FFAD0 | | | `OP_Forage` | 🟡 Unverified | | | | `OP_ForceFindPerson` | 🔴 Not-Set | | | -| `OP_FormattedMessage` | 🟡 Unverified | | | +| `OP_FormattedMessage` | 🟢 Verified | Some major work to do here -- the client now expects a spell link in the packet, will need to refactor the client work to decouple the stream from the internal representation | | | `OP_FriendsWho` | 🟡 Unverified | | | | `OP_GetGuildMOTD` | 🔴 Not-Set | | | | `OP_GetGuildMOTDReply` | 🔴 Not-Set | | | @@ -289,7 +289,7 @@ Below is a status list for the 450 opcodes we currently use on the server for th | `OP_InspectMessageUpdate` | 🔴 Not-Set | | | | `OP_InspectRequest` | 🔴 Not-Set | | | | `OP_InstillDoubt` | 🟡 Unverified | | | -| `OP_InterruptCast` | 🟡 Unverified | | | +| `OP_InterruptCast` | 🟢 Verified | Some major work to do here -- the client now expects a spell link in the packet, will need to refactor the client work to decouple the stream from the internal representation | | | `OP_InvokeChangePetName` | 🔴 Not-Set | | | | `OP_InvokeChangePetNameImmediate` | 🔴 Not-Set | | | | `OP_InvokeNameChangeImmediate` | 🔴 Not-Set | | | @@ -533,7 +533,7 @@ Below is a status list for the 450 opcodes we currently use on the server for th | `OP_ShopRetrieveParcel` | 🟡 Unverified | | | | `OP_ShopParcelIcon` | 🟡 Unverified | | | | `OP_ShopRequest` | 🟡 Unverified | | | -| `OP_SimpleMessage` | 🟡 Unverified | | | +| `OP_SimpleMessage` | 🟢 Verified | | | | `OP_SkillUpdate` | 🟡 Unverified | | | | `OP_Sneak` | 🟡 Unverified | | | | `OP_Some3ByteHPUpdate` | 🔴 Not-Set | | |