diff --git a/common/patches/tob.cpp b/common/patches/tob.cpp index 9c7cdd7f3..93e9a66f2 100644 --- a/common/patches/tob.cpp +++ b/common/patches/tob.cpp @@ -145,6 +145,20 @@ namespace TOB #include "ss_define.h" // ENCODE methods + ENCODE(OP_AAExpUpdate) { + ENCODE_LENGTH_EXACT(AltAdvStats_Struct); + SETUP_DIRECT_ENCODE(AltAdvStats_Struct, structs::AltAdvStats_Struct); + + //later we should change the underlying server to use this more accurate value + //and encode the 330 in the other patches + eq->experience = emu->experience * 100000 / 330; + + OUT(unspent); + OUT(percentage); + + FINISH_ENCODE(); + } + ENCODE(OP_Action) { ENCODE_LENGTH_EXACT(Action_Struct); SETUP_DIRECT_ENCODE(Action_Struct, structs::MissileHitInfo); diff --git a/common/patches/tob_ops.h b/common/patches/tob_ops.h index afaf305c3..9e8b8e07b 100644 --- a/common/patches/tob_ops.h +++ b/common/patches/tob_ops.h @@ -1,4 +1,5 @@ //list of packets we need to encode on the way out: +E(OP_AAExpUpdate) E(OP_Action) E(OP_Animation) E(OP_ApplyPoison) diff --git a/common/patches/tob_structs.h b/common/patches/tob_structs.h index ba065542d..64642c78b 100644 --- a/common/patches/tob_structs.h +++ b/common/patches/tob_structs.h @@ -503,8 +503,8 @@ namespace TOB { struct ExpUpdate_Struct { - /*000*/ uint64 exp; //This is exp % / 1000 now; eg 69250 = 69.25% - /*008*/ uint64 unknown; //unclear, I didn't see the client actually read this value but i might have missed it + /*000*/ uint64 exp; // This is exp % / 1000 now; eg 69250 = 69.25% + /*008*/ uint64 unknown; // if this is the value "2", it opens up the tip window }; struct DeleteSpawn_Struct @@ -832,7 +832,7 @@ namespace TOB { /*000*/ uint32 experience; /*004*/ uint32 unspent; /*008*/ uint8 percentage; - /*009*/ uint8 unknown009[3]; + /*009*/ uint8 padding[3]; }; struct ZonePlayerToBind_Struct { diff --git a/tob/opcodes.md b/tob/opcodes.md index 320e466dc..8a11d5107 100644 --- a/tob/opcodes.md +++ b/tob/opcodes.md @@ -9,7 +9,7 @@ Below is a status list for the 450 opcodes we currently use on the server for th | Opcode | Status | Notes | Working On | |:----------------------------------|:--------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------| | `OP_AAAction` | 🟡 Unverified | | | -| `OP_AAExpUpdate` | 🟡 Unverified | | | +| `OP_AAExpUpdate` | 🟢 Verified | | | | `OP_AcceptNewTask` | 🔴 Not-Set | | | | `OP_AckPacket` | 🟢 Verified | | | | `OP_Action` | 🟡 Unverified | | | @@ -170,7 +170,7 @@ Below is a status list for the 450 opcodes we currently use on the server for th | `OP_EnvDamage` | 🟡 Unverified | | | | `OP_EvolveItem` | 🔴 Not-Set | | | | `OP_ExpansionInfo` | 🟢 Verified | Updated from u32 to u64 and works now | | -| `OP_ExpUpdate` | 🟡 Unverified | | | +| `OP_ExpUpdate` | 🟢 Verified | | | | `OP_FaceChange` | 🔴 Not-Set | | | | `OP_Feedback` | 🔴 Not-Set | | | | `OP_FeignDeath` | 🟡 Unverified | | | @@ -182,7 +182,7 @@ Below is a status list for the 450 opcodes we currently use on the server for th | `OP_FinishWindow2` | 🟡 Unverified | | | | `OP_Fishing` | 🟡 Unverified | | | | `OP_Fling` | 🟡 Unverified | | | -| `OP_FloatListThing` | 🟢 Verified | Movement History. Sent from client, but emu doesn't use it so setting it as varified. Reference is 0x1402FFAD0 | | +| `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 | | | diff --git a/utils/patches/patch_TOB.conf b/utils/patches/patch_TOB.conf index 3102e24a3..c718d5de4 100644 --- a/utils/patches/patch_TOB.conf +++ b/utils/patches/patch_TOB.conf @@ -93,7 +93,7 @@ OP_ClearAA=0x6093 OP_ClearLeadershipAbilities=0x0000 #removed; leadership abilities are baked in and always on OP_RespondAA=0x4449 OP_UpdateAA=0x1655 -OP_SendAAStats=0x7416 #i'll be honest i think this was removed at some point but this is the op at the spot in the list +OP_SendAAStats=0x7416 # Removed in TOB OP_AAExpUpdate=0x04c3 #need to look into whether this has changed; exp did OP_ExpUpdate=0x0e55 OP_HPUpdate=0x2723