Add OP_MobHealth encode.

This commit is contained in:
KimLS 2024-12-12 19:56:13 -08:00
parent b761f1cdf9
commit 0da381c272
3 changed files with 17 additions and 0 deletions

View File

@ -3076,6 +3076,16 @@ namespace Laurion
FINISH_ENCODE();
}
ENCODE(OP_MobHealth) {
ENCODE_LENGTH_EXACT(SpawnHPUpdate_Struct2);
SETUP_DIRECT_ENCODE(SpawnHPUpdate_Struct2, structs::MobHealth_Struct);
OUT(spawn_id);
OUT(hp);
FINISH_ENCODE();
}
// DECODE methods
DECODE(OP_EnterWorld)

View File

@ -40,6 +40,7 @@ E(OP_BuffCreate)
E(OP_Buff)
E(OP_ManaChange)
E(OP_Action)
E(OP_MobHealth)
//list of packets we need to decode on the way in:
D(OP_EnterWorld)
D(OP_ZoneEntry)

View File

@ -733,6 +733,12 @@ namespace Laurion {
//live however has a lot more info here depending on packet type
};
struct MobHealth_Struct
{
/*01*/ int16 spawn_id;
/*00*/ uint32 hp;
};
#pragma pack()
}; //end namespace structs