diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2025-02-26 10:35:48 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2025-02-26 10:39:56 +0100 |
commit | bc9a68bd584e572386ef8d21179d1c1eac513775 (patch) | |
tree | 2869a9836e25af4d4817b94e9938eb2d76b52857 /tools/protocol.py | |
parent | 2d32c37a5639d76f34f83d3a929677efa46962a5 (diff) | |
download | tmwa-being-spawn-message.tar.gz tmwa-being-spawn-message.tar.bz2 tmwa-being-spawn-message.tar.xz tmwa-being-spawn-message.zip |
Re-enable SMSG_BEING_SPAWN (0x007c) with additional fieldsbeing-spawn-message
This packet was disabled with the comment "manaplus is skipping this
packet". In fact, that isn't entirely true: M+ uses this packet to set a
"spawn ID" so that it can later trigger the spawn action after the being
is created.
Rather than just re-enabling this packet, I've added some additional
data (hp, max_hp, attack_range and sex) using previously unused fields,
which makes sending SMSG_BEING_VISIBLE (0x0078) obsolete. Starting with
client version 9 (M+ and Mana are currently on version 8), we now send
either SMSG_BEING_SPAWN or SMSG_BEING_VISIBLE.
Diffstat (limited to 'tools/protocol.py')
-rwxr-xr-x | tools/protocol.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/protocol.py b/tools/protocol.py index c4c8657..0c84b2a 100755 --- a/tools/protocol.py +++ b/tools/protocol.py @@ -2391,14 +2391,13 @@ def build_context(): at(18, u16, 'unknown 3'), at(20, species, 'species'), at(22, u16, 'unknown 4'), - at(24, u16, 'unknown 5'), - at(26, u16, 'unknown 6'), - at(28, u16, 'unknown 7'), - at(30, u16, 'unknown 8'), - at(32, u16, 'unknown 9'), - at(34, u16, 'unknown 10'), + at(24, u32, 'hp'), + at(28, u32, 'max hp'), + at(32, u16, 'unknown 5'), + at(34, u8, 'attack range'), + at(35, sex, 'sex'), at(36, pos1, 'pos'), - at(39, u16, 'unknown 11'), + at(39, u16, 'unknown 6'), ], fixed_size=41, pre=[BOOT, FINISH, GM, MAGIC, SCRIPT, TIMER, 0x0089, 0x008c, 0x00b8, 0x00b9, 0x00e6, 0x00f7, 0x0143, 0x0146, 0x01d5], |