Validated up to OP_MemorizeSpell (still needs testing in client)

This commit is contained in:
dannuic
2026-04-17 18:07:39 -06:00
parent 2da6d3f37c
commit ec5a9d0bd4
5 changed files with 52 additions and 6 deletions
+34
View File
@@ -957,6 +957,23 @@ namespace TOB
FINISH_ENCODE();
}
ENCODE(OP_MemorizeSpell) {
ENCODE_LENGTH_EXACT(MemorizeSpell_Struct);
SETUP_DIRECT_ENCODE(MemorizeSpell_Struct, structs::MemorizeSpell_Struct);
// TODO: TOB has a "finish memming" value (2) here, might be needed to keep client spell gems in sync
if (emu->scribing == 2)
eq->scribing = 3;
else
OUT(scribing);
OUT(slot);
OUT(spell_id);
OUT(reduction);
FINISH_ENCODE();
}
ENCODE(OP_MobHealth) {
ENCODE_LENGTH_EXACT(SpawnHPUpdate_Struct2);
SETUP_DIRECT_ENCODE(SpawnHPUpdate_Struct2, structs::MobHealth_Struct);
@@ -3821,6 +3838,23 @@ namespace TOB
DECODE_FORWARD(OP_GroupInvite);
}
DECODE(OP_MemorizeSpell) {
DECODE_LENGTH_EXACT(structs::MemorizeSpell_Struct);
SETUP_DIRECT_DECODE(MemorizeSpell_Struct, structs::MemorizeSpell_Struct);
// TODO: TOB has a "finish memming" value (2) here, might be needed to keep client spell gems in sync
if (emu->scribing == 3)
eq->scribing = 2;
else
IN(scribing);
IN(slot);
IN(spell_id);
IN(reduction);
FINISH_DIRECT_DECODE();
}
DECODE(OP_MoveItem)
{
DECODE_LENGTH_EXACT(structs::MoveItem_Struct);