Blocked buffs

This commit is contained in:
KimLS
2024-12-16 22:13:37 -08:00
parent 62a84388c0
commit 852667016d
4 changed files with 62 additions and 8 deletions
+39
View File
@@ -3186,6 +3186,27 @@ namespace Laurion
FINISH_ENCODE();
}
ENCODE(OP_BlockedBuffs)
{
ENCODE_LENGTH_EXACT(BlockedBuffs_Struct);
SETUP_DIRECT_ENCODE(BlockedBuffs_Struct, structs::BlockedBuffs_Struct);
for (uint32 i = 0; i < BLOCKED_BUFF_COUNT; ++i)
eq->SpellID[i] = emu->SpellID[i];
for (uint32 i = BLOCKED_BUFF_COUNT; i < structs::BLOCKED_BUFF_COUNT; ++i)
eq->SpellID[i] = -1;
OUT(Count);
OUT(Pet);
OUT(Initialise);
OUT(Flags);
FINISH_ENCODE();
}
ENCODE(OP_RemoveBlockedBuffs) { ENCODE_FORWARD(OP_BlockedBuffs); }
// DECODE methods
DECODE(OP_EnterWorld)
@@ -3415,6 +3436,24 @@ namespace Laurion
FINISH_DIRECT_DECODE();
}
DECODE(OP_BlockedBuffs)
{
DECODE_LENGTH_EXACT(structs::BlockedBuffs_Struct);
SETUP_DIRECT_DECODE(BlockedBuffs_Struct, structs::BlockedBuffs_Struct);
for (uint32 i = 0; i < BLOCKED_BUFF_COUNT; ++i)
emu->SpellID[i] = eq->SpellID[i];
IN(Count);
IN(Pet);
IN(Initialise);
IN(Flags);
FINISH_DIRECT_DECODE();
}
DECODE(OP_RemoveBlockedBuffs) { DECODE_FORWARD(OP_BlockedBuffs); }
//Naive version but should work well enough for now
int ExtractIDFile(const std::string& input) {
std::string number;
+5
View File
@@ -44,6 +44,9 @@ E(OP_GMTraining)
E(OP_GMTrainSkillConfirm)
E(OP_SkillUpdate)
E(OP_RespondAA)
E(OP_BlockedBuffs)
E(OP_RemoveBlockedBuffs)
//list of packets we need to decode on the way in:
D(OP_EnterWorld)
D(OP_ZoneEntry)
@@ -60,6 +63,8 @@ D(OP_MoveItem)
D(OP_ShopRequest)
D(OP_CastSpell)
D(OP_GMTraining)
D(OP_BlockedBuffs)
D(OP_RemoveBlockedBuffs)
#undef E
#undef D
+10
View File
@@ -12,6 +12,7 @@ namespace Laurion {
static const uint32 MAX_PP_UNKNOWN_ABILITIES = 25;
static const uint32 MAX_RECAST_TYPES = 25;
static const uint32 MAX_ITEM_RECAST_TYPES = 100;
static const uint32 BLOCKED_BUFF_COUNT = 40;
static const uint32 BUFF_COUNT = 62;
static const uint32 MAX_PP_LANGUAGE = 32;
#pragma pack(1)
@@ -785,6 +786,15 @@ namespace Laurion {
/*008*/ uint8 percentage;
/*009*/ uint8 unknown009[3];
};
struct BlockedBuffs_Struct
{
/*000*/ int32 SpellID[BLOCKED_BUFF_COUNT];
/*120*/ uint32 Count;
/*124*/ uint8 Pet;
/*125*/ uint8 Initialise;
/*126*/ uint16 Flags;
};
#pragma pack()
}; //end namespace structs