diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 63a303e38..d9fa4ef93 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -656,6 +656,7 @@ set(common_headers packet_dump_file.h packet_dump.h packet_functions.h + patches/IBuff.h patches/IMessage.h patches/client_version.h patches/patches.h diff --git a/common/emu_oplist.h b/common/emu_oplist.h index 5aea4a663..5c9d9144a 100644 --- a/common/emu_oplist.h +++ b/common/emu_oplist.h @@ -78,8 +78,8 @@ N(OP_Bind_Wound), N(OP_BlockedBuffs), N(OP_BoardBoat), N(OP_BookButton), -N(OP_Buff), -N(OP_BuffCreate), +N(OP_BuffDefinition), +N(OP_RefreshBuffs), N(OP_BuffRemoveRequest), N(OP_Bug), N(OP_BuyerItems), @@ -406,7 +406,7 @@ N(OP_OpenGuildTributeMaster), N(OP_OpenInventory), N(OP_OpenTributeMaster), N(OP_PDeletePetition), -N(OP_PetBuffWindow), +N(OP_RefreshPetBuffs), N(OP_PetCommands), N(OP_PetCommandState), N(OP_PetHoTT), @@ -562,7 +562,7 @@ N(OP_Stun), N(OP_Surname), N(OP_SwapSpell), N(OP_SystemFingerprint), -N(OP_TargetBuffs), +N(OP_RefreshTargetBuffs), N(OP_TargetCommand), N(OP_TargetHoTT), N(OP_TargetMouse), diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index c1476a6cf..9bd06082f 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -5656,7 +5656,7 @@ struct BuffIcon_Struct uint32 entity_id; uint8 all_buffs; uint16 count; - uint8 type; // 0 = self buff window, 1 = self target window, 4 = group, 5 = PC, 7 = NPC + uint8 type; // 0 = self buff window, 1 = self target window, 2 = pet buff or target window, 4 = group, 5 = PC, 7 = NPC int32 tic_timer; int32 name_lengths; // so ahh we kind of do these packets hacky, this is the total length of all the names to make creating the real packets in the translators easier BuffIconEntry_Struct entries[0]; diff --git a/common/patches/IBuff.h b/common/patches/IBuff.h new file mode 100644 index 000000000..42ebec462 --- /dev/null +++ b/common/patches/IBuff.h @@ -0,0 +1,34 @@ +// +// Created by dannu on 4/24/2026. +// + +#pragma once + +#include "common/emu_opcodes.h" + +#include +#include + +#include "common/types.h" + +class Client; +class Mob; +class EQApplicationPacket; +class Buffs_Struct; + +namespace Buff { + +class IBuff +{ +public: + IBuff() = default; + virtual ~IBuff() = default; + + virtual EQApplicationPacket* MakeLegacyBuffsPacket(Mob* mob, int32_t timer, bool for_target, bool clear_buffs) const = 0; + + virtual EQApplicationPacket* BuffDefinition(Mob* mob, const Buffs_Struct& buff, int slot, bool fade) const = 0; + virtual EQApplicationPacket* RefreshBuffs(EmuOpcode opcode, Mob* mob, int32_t timer, bool remove, bool buff_timers_suspended, const std::vector& slots) const = 0; + virtual void SetRefreshType(EQApplicationPacket* packet, Mob* source, Client* target) const = 0; +}; + +} // namespace Buff diff --git a/common/patches/client_version.cpp b/common/patches/client_version.cpp index 20a506899..581ab155d 100644 --- a/common/patches/client_version.cpp +++ b/common/patches/client_version.cpp @@ -34,30 +34,38 @@ struct ClientComponents { switch (version) { case Version::TOB: + buffComponent = std::make_shared(); messageComponent = std::make_shared(); break; case Version::RoF2: + buffComponent = std::make_shared(); messageComponent = std::make_shared(); break; case Version::RoF: + buffComponent = std::make_shared(); messageComponent = std::make_shared(); break; case Version::UF: + buffComponent = std::make_shared(); messageComponent = std::make_shared(); break; case Version::SoD: + buffComponent = std::make_shared(); messageComponent = std::make_shared(); break; case Version::SoF: + buffComponent = std::make_shared(); messageComponent = std::make_shared(); break; default: + buffComponent = std::make_shared(); messageComponent = std::make_shared(); break; } } const Version version; + std::shared_ptr buffComponent; std::shared_ptr messageComponent; }; @@ -78,6 +86,11 @@ static const ClientComponents& GetComponents(Version version) return patches.at(version); } +const std::shared_ptr& GetBuffComponent(Version version) +{ + return GetComponents(version).buffComponent; +} + const std::shared_ptr& GetMessageComponent(Version version) { return GetComponents(version).messageComponent; diff --git a/common/patches/client_version.h b/common/patches/client_version.h index 5c1ede856..092df844c 100644 --- a/common/patches/client_version.h +++ b/common/patches/client_version.h @@ -7,7 +7,9 @@ #include "common/emu_versions.h" #include +namespace Buff { class IBuff; } namespace Message { class IMessage; } // store all static functions for the different patches here +const std::shared_ptr& GetBuffComponent(EQ::versions::ClientVersion version); const std::shared_ptr& GetMessageComponent(EQ::versions::ClientVersion version); diff --git a/common/patches/deprecated_sof_opcode_list.h b/common/patches/deprecated_sof_opcode_list.h index d8a88f63f..13a171e8f 100644 --- a/common/patches/deprecated_sof_opcode_list.h +++ b/common/patches/deprecated_sof_opcode_list.h @@ -353,7 +353,7 @@ 0x05ea, 0x1b6f, 0x198e, -0x7bd6, OP_Buff +0x7bd6, OP_BuffDefinition 0x3501, 0x47ab, 0x7a9e, OP_World_Client_CRC1 diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 3ce262080..0ea19e8c4 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -402,7 +402,7 @@ namespace RoF FINISH_ENCODE(); } - ENCODE(OP_Buff) + ENCODE(OP_BuffDefinition) { ENCODE_LENGTH_EXACT(SpellBuffPacket_Struct); SETUP_DIRECT_ENCODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct); @@ -427,14 +427,14 @@ namespace RoF else eq->bufffade = 2; - // Bit of a hack. OP_Buff appears to add/remove the buff while OP_BuffCreate adds/removes the actual buff icon + // Bit of a hack. OP_BuffDefinition appears to add/remove the buff while OP_RefreshBuffs adds/removes the actual buff icon EQApplicationPacket *outapp = nullptr; if (eq->bufffade == 1) { - outapp = new EQApplicationPacket(OP_BuffCreate, 29); + outapp = new EQApplicationPacket(OP_RefreshBuffs, 29); outapp->WriteUInt32(emu->entityid); outapp->WriteUInt32(0); // tic timer - outapp->WriteUInt8(0); // Type of OP_BuffCreate packet ? + outapp->WriteUInt8(0); // Type of OP_RefreshBuffs packet ? outapp->WriteUInt16(1); // 1 buff in this packet outapp->WriteUInt32(eq->slotid); outapp->WriteUInt32(0xffffffff); // SpellID (0xffff to remove) @@ -446,10 +446,10 @@ namespace RoF FINISH_ENCODE(); if (outapp) - dest->FastQueuePacket(&outapp); // Send the OP_BuffCreate to remove the buff + dest->FastQueuePacket(&outapp); // Send the OP_RefreshBuffs to remove the buff } - ENCODE(OP_BuffCreate) + ENCODE(OP_RefreshBuffs) { SETUP_VAR_ENCODE(BuffIcon_Struct); @@ -1858,9 +1858,9 @@ namespace RoF FINISH_ENCODE(); } - ENCODE(OP_PetBuffWindow) + ENCODE(OP_RefreshPetBuffs) { - // The format of the RoF packet is identical to the OP_BuffCreate packet. + // The format of the RoF packet is identical to the OP_RefreshBuffs packet. SETUP_VAR_ENCODE(PetBuff_Struct); @@ -3239,7 +3239,7 @@ namespace RoF FINISH_ENCODE(); } - ENCODE(OP_TargetBuffs) { ENCODE_FORWARD(OP_BuffCreate); } + ENCODE(OP_RefreshTargetBuffs) { ENCODE_FORWARD(OP_RefreshBuffs); } ENCODE(OP_TaskDescription) { @@ -4196,7 +4196,7 @@ namespace RoF FINISH_DIRECT_DECODE(); } - DECODE(OP_Buff) + DECODE(OP_BuffDefinition) { DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct); SETUP_DIRECT_DECODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct); diff --git a/common/patches/rof.h b/common/patches/rof.h index 0d08c6e68..373524c65 100644 --- a/common/patches/rof.h +++ b/common/patches/rof.h @@ -60,3 +60,14 @@ public: }; } // namespace Message + +namespace Buff { + +class RoF : public UF +{ +public: + RoF() = default; + ~RoF() override = default; +}; + +} // namespace Buff diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index a2b3ba30e..4edf1aa8d 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -661,7 +661,7 @@ namespace RoF2 FINISH_ENCODE(); } - ENCODE(OP_Buff) + ENCODE(OP_BuffDefinition) { ENCODE_LENGTH_EXACT(SpellBuffPacket_Struct); SETUP_DIRECT_ENCODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct); @@ -685,14 +685,14 @@ namespace RoF2 else eq->bufffade = 2; - // Bit of a hack. OP_Buff appears to add/remove the buff while OP_BuffCreate adds/removes the actual buff icon + // Bit of a hack. OP_BuffDefinition appears to add/remove the buff while OP_RefreshBuffs adds/removes the actual buff icon EQApplicationPacket *outapp = nullptr; if (eq->bufffade == 1) { - outapp = new EQApplicationPacket(OP_BuffCreate, 29u); + outapp = new EQApplicationPacket(OP_RefreshBuffs, 29u); outapp->WriteUInt32(emu->entityid); outapp->WriteUInt32(0); // tic timer - outapp->WriteUInt8(0); // Type of OP_BuffCreate packet ? + outapp->WriteUInt8(0); // Type of OP_RefreshBuffs packet ? outapp->WriteUInt16(1); // 1 buff in this packet outapp->WriteUInt32(eq->slotid); outapp->WriteUInt32(0xffffffff); // SpellID (0xffff to remove) @@ -704,10 +704,10 @@ namespace RoF2 FINISH_ENCODE(); if (outapp) - dest->FastQueuePacket(&outapp); // Send the OP_BuffCreate to remove the buff + dest->FastQueuePacket(&outapp); // Send the OP_RefreshBuffs to remove the buff } - ENCODE(OP_BuffCreate) + ENCODE(OP_RefreshBuffs) { SETUP_VAR_ENCODE(BuffIcon_Struct); @@ -2464,9 +2464,9 @@ namespace RoF2 FINISH_ENCODE(); } - ENCODE(OP_PetBuffWindow) + ENCODE(OP_RefreshPetBuffs) { - // The format of the RoF2 packet is identical to the OP_BuffCreate packet. + // The format of the RoF2 packet is identical to the OP_RefreshBuffs packet. SETUP_VAR_ENCODE(PetBuff_Struct); @@ -3841,7 +3841,7 @@ namespace RoF2 FINISH_ENCODE(); } - ENCODE(OP_TargetBuffs) { ENCODE_FORWARD(OP_BuffCreate); } + ENCODE(OP_RefreshTargetBuffs) { ENCODE_FORWARD(OP_RefreshBuffs); } ENCODE(OP_TaskDescription) { @@ -5145,7 +5145,7 @@ namespace RoF2 FINISH_DIRECT_DECODE(); } - DECODE(OP_Buff) + DECODE(OP_BuffDefinition) { DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct); SETUP_DIRECT_DECODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct); diff --git a/common/patches/rof2.h b/common/patches/rof2.h index 3613fa354..31ce661b1 100644 --- a/common/patches/rof2.h +++ b/common/patches/rof2.h @@ -60,3 +60,14 @@ public: }; } // namespace Message + +namespace Buff { + +class RoF2 : public RoF +{ +public: + RoF2() = default; + ~RoF2() override = default; +}; + +} // namespace Buff diff --git a/common/patches/rof2_ops.h b/common/patches/rof2_ops.h index 65e371430..e07baf245 100644 --- a/common/patches/rof2_ops.h +++ b/common/patches/rof2_ops.h @@ -43,8 +43,8 @@ E(OP_BazaarSearch) E(OP_BecomeTrader) E(OP_BeginCast) E(OP_BlockedBuffs) -E(OP_Buff) -E(OP_BuffCreate) +E(OP_BuffDefinition) +E(OP_RefreshBuffs) E(OP_BuyerItems) E(OP_CancelTrade) E(OP_CastSpell) @@ -100,7 +100,7 @@ E(OP_MoveItem) E(OP_NewSpawn) E(OP_NewZone) E(OP_OnLevelMessage) -E(OP_PetBuffWindow) +E(OP_RefreshPetBuffs) E(OP_PlayerProfile) E(OP_RaidJoin) E(OP_RaidUpdate) @@ -123,7 +123,7 @@ E(OP_SpawnAppearance) E(OP_SpawnDoor) E(OP_SpecialMesg) E(OP_Stun) -E(OP_TargetBuffs) +E(OP_RefreshTargetBuffs) E(OP_TaskDescription) E(OP_TaskHistoryReply) E(OP_Track) @@ -153,7 +153,7 @@ D(OP_Barter) D(OP_BazaarSearch) D(OP_BlockedBuffs) D(OP_BookButton) -D(OP_Buff) +D(OP_BuffDefinition) D(OP_BuffRemoveRequest) D(OP_BuyerItems) D(OP_CastSpell) diff --git a/common/patches/rof_ops.h b/common/patches/rof_ops.h index ceb4ae8e9..b931f0a81 100644 --- a/common/patches/rof_ops.h +++ b/common/patches/rof_ops.h @@ -27,8 +27,8 @@ E(OP_Barter) E(OP_BazaarSearch) E(OP_BeginCast) E(OP_BlockedBuffs) -E(OP_Buff) -E(OP_BuffCreate) +E(OP_BuffDefinition) +E(OP_RefreshBuffs) E(OP_CancelTrade) E(OP_CastSpell) E(OP_ChannelMessage) @@ -81,7 +81,7 @@ E(OP_MoveItem) E(OP_NewSpawn) E(OP_NewZone) E(OP_OnLevelMessage) -E(OP_PetBuffWindow) +E(OP_RefreshPetBuffs) E(OP_PlayerProfile) E(OP_RaidJoin) E(OP_RaidUpdate) @@ -104,7 +104,7 @@ E(OP_SpawnAppearance) E(OP_SpawnDoor) E(OP_SpecialMesg) E(OP_Stun) -E(OP_TargetBuffs) +E(OP_RefreshTargetBuffs) E(OP_TaskDescription) E(OP_TaskHistoryReply) E(OP_Track) @@ -131,7 +131,7 @@ D(OP_AugmentInfo) D(OP_AugmentItem) D(OP_BazaarSearch) D(OP_BlockedBuffs) -D(OP_Buff) +D(OP_BuffDefinition) D(OP_BuffRemoveRequest) D(OP_CastSpell) D(OP_ChannelMessage) diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index ca8602565..b5c8a9840 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -293,7 +293,7 @@ namespace SoD dest->FastQueuePacket(&in, ack_req); } - ENCODE(OP_Buff) + ENCODE(OP_BuffDefinition) { ENCODE_LENGTH_EXACT(SpellBuffPacket_Struct); SETUP_DIRECT_ENCODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct); @@ -1375,7 +1375,7 @@ namespace SoD FINISH_ENCODE(); } - ENCODE(OP_PetBuffWindow) + ENCODE(OP_RefreshPetBuffs) { EQApplicationPacket *in = *p; *p = nullptr; @@ -2145,7 +2145,7 @@ namespace SoD FINISH_ENCODE(); } - ENCODE(OP_TargetBuffs) + ENCODE(OP_RefreshTargetBuffs) { SETUP_VAR_ENCODE(BuffIcon_Struct); @@ -2877,7 +2877,7 @@ namespace SoD FINISH_DIRECT_DECODE(); } - DECODE(OP_Buff) + DECODE(OP_BuffDefinition) { DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct); SETUP_DIRECT_DECODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct); diff --git a/common/patches/sod.h b/common/patches/sod.h index 203d52f19..9390e23ea 100644 --- a/common/patches/sod.h +++ b/common/patches/sod.h @@ -60,3 +60,14 @@ public: }; } // namespace Message + +namespace Buff { + +class SoD : public SoF +{ +public: + SoD() = default; + ~SoD() override = default; +}; + +} // namespace Buff diff --git a/common/patches/sod_ops.h b/common/patches/sod_ops.h index 48cebca54..37528836e 100644 --- a/common/patches/sod_ops.h +++ b/common/patches/sod_ops.h @@ -23,7 +23,7 @@ E(OP_ApplyPoison) E(OP_AugmentInfo) E(OP_Barter) E(OP_BazaarSearch) -E(OP_Buff) +E(OP_BuffDefinition) E(OP_CancelTrade) E(OP_ChannelMessage) E(OP_CharInventory) @@ -65,7 +65,7 @@ E(OP_MoveItem) E(OP_NewSpawn) E(OP_NewZone) E(OP_OnLevelMessage) -E(OP_PetBuffWindow) +E(OP_RefreshPetBuffs) E(OP_PlayerProfile) E(OP_RaidJoin) E(OP_RaidUpdate) @@ -80,7 +80,7 @@ E(OP_SomeItemPacketMaybe) E(OP_SpawnDoor) E(OP_SpecialMesg) E(OP_Stun) -E(OP_TargetBuffs) +E(OP_RefreshTargetBuffs) E(OP_TaskDescription) E(OP_Track) E(OP_Trader) @@ -102,7 +102,7 @@ D(OP_AugmentInfo) D(OP_AugmentItem) D(OP_BazaarSearch) D(OP_BookButton) -D(OP_Buff) +D(OP_BuffDefinition) D(OP_CastSpell) D(OP_ChannelMessage) D(OP_CharacterCreate) diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index ed72691f6..0d2106e20 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -272,7 +272,7 @@ namespace SoF FINISH_ENCODE(); } - ENCODE(OP_Buff) + ENCODE(OP_BuffDefinition) { ENCODE_LENGTH_EXACT(SpellBuffPacket_Struct); SETUP_DIRECT_ENCODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct); @@ -1049,7 +1049,7 @@ namespace SoF FINISH_ENCODE(); } - ENCODE(OP_PetBuffWindow) + ENCODE(OP_RefreshPetBuffs) { ENCODE_LENGTH_EXACT(PetBuff_Struct); SETUP_DIRECT_ENCODE(PetBuff_Struct, PetBuff_Struct); @@ -2321,7 +2321,7 @@ namespace SoF FINISH_DIRECT_DECODE(); } - DECODE(OP_Buff) + DECODE(OP_BuffDefinition) { DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct); SETUP_DIRECT_DECODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct); diff --git a/common/patches/sof.h b/common/patches/sof.h index 3c0206d17..374c3d7f8 100644 --- a/common/patches/sof.h +++ b/common/patches/sof.h @@ -60,3 +60,14 @@ public: }; } // namespace Message + +namespace Buff { + +class SoF : public Titanium +{ +public: + SoF() = default; + ~SoF() override = default; +}; + +} // namespace Buff diff --git a/common/patches/sof_ops.h b/common/patches/sof_ops.h index 58f9dc253..cd8e4bc67 100644 --- a/common/patches/sof_ops.h +++ b/common/patches/sof_ops.h @@ -23,7 +23,7 @@ E(OP_ApplyPoison) E(OP_AugmentInfo) E(OP_BazaarSearch) E(OP_BecomeTrader) -E(OP_Buff) +E(OP_BuffDefinition) E(OP_CancelTrade) E(OP_ChannelMessage) E(OP_CharInventory) @@ -60,7 +60,7 @@ E(OP_MoveItem) E(OP_NewSpawn) E(OP_NewZone) E(OP_OnLevelMessage) -E(OP_PetBuffWindow) +E(OP_RefreshPetBuffs) E(OP_PlayerProfile) E(OP_RaidJoin) E(OP_RaidUpdate) @@ -93,7 +93,7 @@ D(OP_ApplyPoison) D(OP_AugmentInfo) D(OP_AugmentItem) D(OP_BookButton) -D(OP_Buff) +D(OP_BuffDefinition) D(OP_Bug) D(OP_CastSpell) D(OP_ChannelMessage) diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index 49ead949e..2b7c96e9a 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -36,6 +36,8 @@ #include +#include "zone/mob.h" + namespace Titanium { @@ -326,7 +328,7 @@ namespace Titanium } } - ENCODE(OP_Buff) + ENCODE(OP_BuffDefinition) { ENCODE_LENGTH_EXACT(SpellBuffPacket_Struct); SETUP_DIRECT_ENCODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct); @@ -1307,7 +1309,7 @@ namespace Titanium FINISH_ENCODE(); } - ENCODE(OP_PetBuffWindow) + ENCODE(OP_RefreshPetBuffs) { ENCODE_LENGTH_EXACT(PetBuff_Struct); SETUP_DIRECT_ENCODE(PetBuff_Struct, PetBuff_Struct); @@ -2540,7 +2542,7 @@ namespace Titanium } } - DECODE(OP_Buff) + DECODE(OP_BuffDefinition) { DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct); SETUP_DIRECT_DECODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct); @@ -4014,3 +4016,79 @@ void Titanium::ResolveArguments(uint32_t id, std::array& args) c } } // namespace Message + +namespace Buff { +EQApplicationPacket* Titanium::MakeLegacyBuffsPacket(Mob* mob, int32_t timer, bool for_target, bool clear_buffs) const +{ + uint32 count = 0; + uint32 buff_count; + + // for self we want all buffs, for target, we want to skip song window buffs + // since NPCs and pets don't have a song window, we still see it for them :P + if (for_target) { + buff_count = (clear_buffs) ? 0 : mob->GetMaxBuffSlots(); + } + else { + buff_count = mob->GetMaxTotalSlots(); + } + + Buffs_Struct* buffs = mob->GetBuffs(); + + for(int i = 0; i < buff_count; ++i) { + if (buffs[i].spellid > 1) { + ++count; + } + } + + EQApplicationPacket* outapp = nullptr; + + //Create it for a targeting window, else create it for a create buff packet. + if(for_target) { + outapp = new EQApplicationPacket(OP_RefreshTargetBuffs, sizeof(BuffIcon_Struct) + sizeof(BuffIconEntry_Struct) * count); + } + else { + outapp = new EQApplicationPacket(OP_RefreshBuffs, sizeof(BuffIcon_Struct) + sizeof(BuffIconEntry_Struct) * count); + } + BuffIcon_Struct *buff = (BuffIcon_Struct*)outapp->pBuffer; + buff->entity_id = mob->GetID(); + buff->count = count; + buff->all_buffs = 1; + buff->tic_timer = timer; + // there are more types, the client doesn't seem to really care though. The others are also currently hard to fill in here ... + // (see comment in common/eq_packet_structs.h) + if (for_target) + buff->type = mob->IsClient() ? 5 : 7; + else + buff->type = 0; + + buff->name_lengths = 0; // hacky shit + uint32 index = 0; + for(int i = 0; i < buff_count; ++i) { + if (buffs[i].spellid > 1) { + buff->entries[index].buff_slot = i; + buff->entries[index].spell_id = buffs[i].spellid; + buff->entries[index].tics_remaining = buffs[i].ticsremaining; + buff->entries[index].num_hits = buffs[i].hit_number; + strn0cpy(buff->entries[index].caster, buffs[i].caster_name, 64); + buff->name_lengths += strlen(buff->entries[index].caster); + ++index; + } + } + + return outapp; +} + +EQApplicationPacket* Titanium::BuffDefinition(Mob* mob, const Buffs_Struct& buff, int slot, bool fade) const +{ + return nullptr; +} + +EQApplicationPacket* Titanium::RefreshBuffs(EmuOpcode opcode, Mob* mob, int32_t timer, bool remove, + bool buff_timers_suspended, const std::vector& slots) const +{ + return nullptr; +} + +void Titanium::SetRefreshType(EQApplicationPacket* packet, Mob* source, Client* target) const {} + +} // namespace Buff diff --git a/common/patches/titanium.h b/common/patches/titanium.h index 1d96475a2..4ed42e8df 100644 --- a/common/patches/titanium.h +++ b/common/patches/titanium.h @@ -17,6 +17,7 @@ */ #pragma once +#include "IBuff.h" #include "IMessage.h" #include "common/struct_strategy.h" @@ -73,3 +74,20 @@ protected: } // namespace Message +namespace Buff { + +class Titanium : public IBuff +{ +public: + Titanium() = default; + ~Titanium() override = default; + + EQApplicationPacket* MakeLegacyBuffsPacket(Mob* mob, int32_t timer, bool for_target, bool clear_buffs) const override; + + EQApplicationPacket* BuffDefinition(Mob* mob, const Buffs_Struct& buff, int slot, bool fade) const override; + EQApplicationPacket* RefreshBuffs(EmuOpcode opcode, Mob* mob, int32_t timer, bool remove, bool buff_timers_suspended, const std::vector& slots) const override; + void SetRefreshType(EQApplicationPacket* packet, Mob* source, Client* target) const override; +}; + +} // namespace Buff + diff --git a/common/patches/titanium_ops.h b/common/patches/titanium_ops.h index 1116baac7..b212e1df4 100644 --- a/common/patches/titanium_ops.h +++ b/common/patches/titanium_ops.h @@ -21,7 +21,7 @@ E(OP_AdventureMerchantSell) E(OP_ApplyPoison) E(OP_BazaarSearch) E(OP_BecomeTrader) -E(OP_Buff) +E(OP_BuffDefinition) E(OP_ChannelMessage) E(OP_CharInventory) E(OP_ClientUpdate) @@ -61,7 +61,7 @@ E(OP_ManaChange) E(OP_MemorizeSpell) E(OP_MoveItem) E(OP_OnLevelMessage) -E(OP_PetBuffWindow) +E(OP_RefreshPetBuffs) E(OP_PlayerProfile) E(OP_NewSpawn) E(OP_MarkRaidNPC) @@ -91,7 +91,7 @@ D(OP_AdventureMerchantSell) D(OP_ApplyPoison) D(OP_AugmentItem) D(OP_BazaarSearch) -D(OP_Buff) +D(OP_BuffDefinition) D(OP_Bug) D(OP_CastSpell) D(OP_ChannelMessage) diff --git a/common/patches/tob.cpp b/common/patches/tob.cpp index 2b781032c..34393c761 100644 --- a/common/patches/tob.cpp +++ b/common/patches/tob.cpp @@ -27,6 +27,8 @@ #include "common/packet_dump.h" #include "world/sof_char_create_data.h" +#include "zone/client.h" +#include "zone/mob.h" #include "zone/string_ids.h" namespace TOB @@ -254,92 +256,6 @@ namespace TOB FINISH_ENCODE(); } - ENCODE(OP_Buff) - { - ENCODE_LENGTH_EXACT(SpellBuffPacket_Struct); - SETUP_DIRECT_ENCODE(SpellBuffPacket_Struct, structs::EQAffectPacket_Struct); - - eq->entity_id = emu->entityid; - eq->unknown004 = 0; - - //fill in affect info - eq->affect.caster_id.Id = emu->buff.player_id; - eq->affect.flags = 0; - eq->affect.spell_id = emu->buff.spellid; - eq->affect.duration = emu->buff.duration; - eq->affect.initial_duration = emu->buff.duration; - eq->affect.hit_count = emu->buff.num_hits; - eq->affect.viral_timer = 0; - eq->affect.modifier = emu->buff.bard_modifier == 10 ? 1.0f : emu->buff.bard_modifier / 10.0f; - eq->affect.y = emu->buff.y; - eq->affect.x = emu->buff.x; - eq->affect.z = emu->buff.z; - eq->affect.level = emu->buff.level; - - eq->slot_id = ServerToTOBBuffSlot(emu->slotid); - if (emu->bufffade == 1) - { - eq->buff_fade = 1; - } - else - { - eq->buff_fade = 2; - } - - EQApplicationPacket* outapp = nullptr; - if (emu->bufffade == 1) - { - // Bit of a hack. OP_Buff appears to add/remove the buff while OP_BuffCreate adds/removes the actual buff icon - outapp = new EQApplicationPacket(OP_BuffCreate, 30); - outapp->WriteUInt32(emu->entityid); - outapp->WriteUInt32(0); // tic timer - outapp->WriteUInt8(0); // Type of OP_BuffCreate packet ? - outapp->WriteUInt16(1); // 1 buff in this packet - outapp->WriteUInt32(ServerToTOBBuffSlot(emu->slotid)); - outapp->WriteUInt32(0xffffffff); // SpellID (0xffff to remove) - outapp->WriteUInt32(0); // Duration - outapp->WriteUInt32(0); // numhits - outapp->WriteUInt8(0); // Caster name - outapp->WriteUInt8(0); // Type - outapp->WriteUInt8(0); // Type - } - - FINISH_ENCODE(); - - if (outapp) { - dest->FastQueuePacket(&outapp); - } - } - - ENCODE(OP_BuffCreate) - { - SETUP_VAR_ENCODE(BuffIcon_Struct); - - //TOB has one extra 0x00 byte before the end byte - uint32 sz = 13 + (17 * emu->count) + emu->name_lengths; // 17 includes nullterm - __packet->size = sz; - __packet->pBuffer = new unsigned char[sz]; - memset(__packet->pBuffer, 0, sz); - - __packet->WriteUInt32(emu->entity_id); - __packet->WriteUInt32(emu->tic_timer); - __packet->WriteUInt8(emu->all_buffs); // 1 indicates all buffs on the player (0 to add or remove a single buff) - __packet->WriteUInt16(emu->count); - - for (int i = 0; i < emu->count; ++i) - { - __packet->WriteUInt32(emu->type == 0 ? ServerToTOBBuffSlot(emu->entries[i].buff_slot) : emu->entries[i].buff_slot); - __packet->WriteUInt32(emu->entries[i].spell_id); - __packet->WriteUInt32(emu->entries[i].tics_remaining); - __packet->WriteUInt32(emu->entries[i].num_hits); // Unknown - __packet->WriteString(emu->entries[i].caster); - } - __packet->WriteUInt8(0); // Unknown1 - __packet->WriteUInt8(emu->type); // Unknown2 - - FINISH_ENCODE(); - } - ENCODE(OP_CancelTrade) { ENCODE_LENGTH_EXACT(CancelTrade_Struct); @@ -5693,3 +5609,119 @@ EQApplicationPacket* TOB::InterruptSpellOther(Mob* sender, uint32_t message, uin } // namespace Message +namespace Buff { + +EQApplicationPacket* TOB::MakeLegacyBuffsPacket(Mob* mob, int32_t timer, bool for_target, bool clear_buffs) const { return nullptr; } + +EQApplicationPacket* TOB::BuffDefinition(Mob* mob, const Buffs_Struct& buff, int slot, bool fade) const +{ + auto packet = new EQApplicationPacket(OP_BuffDefinition, sizeof(::TOB::structs::EQAffectPacket_Struct)); + auto affect = reinterpret_cast<::TOB::structs::EQAffectPacket_Struct*>(packet->pBuffer); + + // base packet + affect->entity_id = mob->GetID(); + affect->unknown004 = 0; + affect->slot_id = ::TOB::ServerToTOBBuffSlot(slot); + affect->buff_fade = fade ? 1 : 2; // 1 is remove, 2 is modify, 3 is add (only seen 1 and 2 sent) + + // affect slots + for (int affect_slot = 0; affect_slot < 6; ++affect_slot) { + // all of this is unknown, just what we've seen + affect->affect.slots[affect_slot].slot = -1; // this is always -1 + affect->affect.slots[affect_slot].padding = 0; // this is never 0, but the values aren't clear + affect->affect.slots[affect_slot].value = 0; // this is always 0 + } + + // affect info + affect->affect.caster_id.Id = buff.casterid; + affect->affect.caster_id.WorldId = RuleI(World, Id); + affect->affect.caster_id.Reserved = 0; + affect->affect.flags = 0; + affect->affect.spell_id = buff.spellid; + affect->affect.duration = buff.ticsremaining; + affect->affect.initial_duration = buff.ticsremaining; // this isn't correct, it's the total duration + affect->affect.hit_count = buff.hit_number; + affect->affect.viral_timer = 0; + affect->affect.modifier = static_cast(buff.instrument_mod) / 10.f; + affect->affect.y = static_cast(buff.caston_y); + affect->affect.x = static_cast(buff.caston_x); + affect->affect.z = static_cast(buff.caston_z); + affect->affect.type = 2; + affect->affect.level = buff.casterlevel > 0 ? buff.casterlevel : mob->GetLevel(); + + //no idea if these are right; eqlib doesn't seem to know either + if (buff.dot_rune > 0) + affect->affect.charges = buff.dot_rune; + else if (buff.magic_rune > 0) + affect->affect.charges = buff.magic_rune; + else if (buff.melee_rune > 0) + affect->affect.charges = buff.melee_rune; + else if (buff.counters > 0) + affect->affect.charges = buff.counters; + + affect->affect.activatable = 0; + affect->affect.unknown1 = 0; //might be some timer, not sure though + + return packet; +} + +EQApplicationPacket* TOB::RefreshBuffs(EmuOpcode opcode, Mob* mob, int32_t timer, bool remove, bool buff_timers_suspended, const std::vector& slots) const +{ + Buffs_Struct* buffs = mob->GetBuffs(); + + // pre-calculate the buffer size to avoid too many grow calls + size_t buffer_size = 13; // 13 bytes outside the list + std::vector send_slots; + if (slots.empty()) { + for (uint32_t slot = 0; slot < mob->GetMaxTotalSlots(); ++slot) + if (buffs[slot].spellid > 1) { + buffer_size += 17 + strlen(buffs[slot].caster_name); // 17 includes the null terminator + send_slots.push_back(slot); + } + } else { + for (uint32_t slot : slots) + if (slot < mob->GetMaxTotalSlots() && buffs[slot].spellid > 1) { + buffer_size += 17 + strlen(buffs[slot].caster_name); + send_slots.push_back(slot); + } + } + + SerializeBuffer buffer(buffer_size); + + buffer.WriteUInt32(mob->GetID()); + buffer.WriteInt32(timer); + buffer.WriteUInt8(slots.empty() ? 1 : 0); // 1 indicates all buffs on the player (0 to add or remove a single buff) + buffer.WriteUInt16(send_slots.size()); + + for (uint32_t slot : send_slots) { + buffer.WriteUInt32(::TOB::ServerToTOBBuffSlot(slot)); // the server stores fewer buffs + buffer.WriteInt32(remove ? -1 : buffs[slot].spellid); + buffer.WriteUInt32(buffs[slot].ticsremaining); + buffer.WriteUInt32(buffs[slot].hit_number); + buffer.WriteString(buffs[slot].caster_name); + } + + buffer.WriteUInt8(opcode == OP_RefreshPetBuffs ? 2 : 0); + buffer.WriteUInt8(buff_timers_suspended ? 1 : 0); // bBuffTimersOnHold + + return new EQApplicationPacket(opcode, std::move(buffer)); +} + +// 0 = self buff window, 1 = self target window, 2 = pet buff or target window, 4 = group, 5 = PC, 7 = NPC +void TOB::SetRefreshType(EQApplicationPacket* packet, Mob* source, Client* target) const +{ + unsigned char* type = &packet->pBuffer[packet->size - 2]; + + if (target->GetID() == source->GetID()) + *type = 1; + else if (target->IsPet()) + *type = 2; + else if (target->HasGroup() && source->GetGroup() == target->GetGroup()) + *type = 4; + else if (target->IsClient()) + *type = 5; + else + *type = 7; +} + +} // namespace Buff diff --git a/common/patches/tob.h b/common/patches/tob.h index c3cc9e2c9..cb4f6f3f0 100644 --- a/common/patches/tob.h +++ b/common/patches/tob.h @@ -39,8 +39,8 @@ namespace Message { class TOB : public RoF2 { public: - TOB() {} - ~TOB() override {} + TOB() = default; + ~TOB() override = default; [[nodiscard]] EQApplicationPacket* Formatted(uint32_t color, uint32_t id, const std::array& args) const override; @@ -53,3 +53,20 @@ protected: }; } // namespace Message + +namespace Buff { + +class TOB : public RoF2 +{ +public: + TOB() = default; + ~TOB() override = default; + + EQApplicationPacket* MakeLegacyBuffsPacket(Mob* mob, int32_t timer, bool for_target, bool clear_buffs) const override; + + EQApplicationPacket* BuffDefinition(Mob* mob, const Buffs_Struct& buff, int slot, bool fade) const override; + EQApplicationPacket* RefreshBuffs(EmuOpcode opcode, Mob* mob, int32_t timer, bool remove, bool buff_timers_suspended, const std::vector& slots) const override; + void SetRefreshType(EQApplicationPacket* packet, Mob* source, Client* target) const override; +}; + +} // namespace Buff diff --git a/common/patches/tob_ops.h b/common/patches/tob_ops.h index 0136ef5ba..a727fd400 100644 --- a/common/patches/tob_ops.h +++ b/common/patches/tob_ops.h @@ -6,8 +6,6 @@ E(OP_ApplyPoison) E(OP_AugmentInfo) E(OP_BeginCast) E(OP_BlockedBuffs) -E(OP_Buff) -E(OP_BuffCreate) E(OP_CancelTrade) E(OP_CastSpell) E(OP_ChannelMessage) diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index 32f958b35..b4c1b60c7 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -434,7 +434,7 @@ namespace UF } } - ENCODE(OP_Buff) + ENCODE(OP_BuffDefinition) { ENCODE_LENGTH_EXACT(SpellBuffPacket_Struct); SETUP_DIRECT_ENCODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct); @@ -454,7 +454,7 @@ namespace UF FINISH_ENCODE(); } - ENCODE(OP_BuffCreate) + ENCODE(OP_RefreshBuffs) { SETUP_VAR_ENCODE(BuffIcon_Struct); @@ -1800,7 +1800,7 @@ namespace UF FINISH_ENCODE(); } - ENCODE(OP_PetBuffWindow) + ENCODE(OP_RefreshPetBuffs) { EQApplicationPacket *in = *p; *p = nullptr; @@ -2729,7 +2729,7 @@ namespace UF FINISH_ENCODE(); } - ENCODE(OP_TargetBuffs) { ENCODE_FORWARD(OP_BuffCreate); } + ENCODE(OP_RefreshTargetBuffs) { ENCODE_FORWARD(OP_RefreshBuffs); } ENCODE(OP_TaskDescription) { @@ -3638,7 +3638,7 @@ namespace UF FINISH_DIRECT_DECODE(); } - DECODE(OP_Buff) + DECODE(OP_BuffDefinition) { DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct); SETUP_DIRECT_DECODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct); diff --git a/common/patches/uf.h b/common/patches/uf.h index 05c27875b..dfdc5e481 100644 --- a/common/patches/uf.h +++ b/common/patches/uf.h @@ -60,3 +60,14 @@ public: }; } // namespace Message + +namespace Buff { + +class UF : public SoD +{ +public: + UF() = default; + ~UF() override = default; +}; + +} // namespace Buff diff --git a/common/patches/uf_ops.h b/common/patches/uf_ops.h index 4b0830e83..a92746534 100644 --- a/common/patches/uf_ops.h +++ b/common/patches/uf_ops.h @@ -25,8 +25,8 @@ E(OP_AugmentInfo) E(OP_Barter) E(OP_BazaarSearch) E(OP_BecomeTrader) -E(OP_Buff) -E(OP_BuffCreate) +E(OP_BuffDefinition) +E(OP_RefreshBuffs) E(OP_CancelTrade) E(OP_ChannelMessage) E(OP_CharInventory) @@ -75,7 +75,7 @@ E(OP_MoveItem) E(OP_NewSpawn) E(OP_NewZone) E(OP_OnLevelMessage) -E(OP_PetBuffWindow) +E(OP_RefreshPetBuffs) E(OP_PlayerProfile) E(OP_RaidJoin) E(OP_RaidUpdate) @@ -93,7 +93,7 @@ E(OP_SpawnAppearance) E(OP_SpawnDoor) E(OP_SpecialMesg) E(OP_Stun) -E(OP_TargetBuffs) +E(OP_RefreshTargetBuffs) E(OP_TaskDescription) E(OP_Track) E(OP_Trader) @@ -116,7 +116,7 @@ D(OP_AugmentInfo) D(OP_AugmentItem) D(OP_BazaarSearch) D(OP_BookButton) -D(OP_Buff) +D(OP_BuffDefinition) D(OP_BuffRemoveRequest) D(OP_CastSpell) D(OP_ChannelMessage) diff --git a/tob/opcodes.md b/tob/opcodes.md index 9c60dc50d..3c6bb5c38 100644 --- a/tob/opcodes.md +++ b/tob/opcodes.md @@ -68,8 +68,8 @@ Below is a status list for the 450 opcodes we currently use on the server for th | `OP_BlockedBuffs` | 🟢 Verified | | | | `OP_BoardBoat` | 🟡 Unverified | | | | `OP_BookButton` | 🟡 Unverified | | | -| `OP_Buff` | 🟡 Unverified | | | -| `OP_BuffCreate` | 🟡 Unverified | | | +| `OP_BuffDefinition` | 🟡 Unverified | | | +| `OP_RefreshBuffs` | 🟡 Unverified | | | | `OP_BuffRemoveRequest` | 🟡 Unverified | | | | `OP_Bug` | 🟡 Unverified | | | | `OP_BuyerItems` | 🔴 Not-Set | | | @@ -395,7 +395,7 @@ Below is a status list for the 450 opcodes we currently use on the server for th | `OP_OpenInventory` | 🔴 Not-Set | | | | `OP_OpenTributeMaster` | 🔴 Not-Set | | | | `OP_PDeletePetition` | 🔴 Not-Set | | | -| `OP_PetBuffWindow` | 🔴 Not-Set | | | +| `OP_RefreshPetBuffs` | 🔴 Not-Set | | | | `OP_PetCommands` | 🔴 Not-Set | | | | `OP_PetCommandState` | 🔴 Not-Set | | | | `OP_PetHoTT` | 🔴 Not-Set | | | @@ -551,7 +551,7 @@ Below is a status list for the 450 opcodes we currently use on the server for th | `OP_Surname` | 🔴 Not-Set | | | | `OP_SwapSpell` | 🟢 Verified | | | | `OP_SystemFingerprint` | 🔴 Not-Set | | | -| `OP_TargetBuffs` | 🔴 Not-Set | | | +| `OP_RefreshTargetBuffs` | 🔴 Not-Set | | | | `OP_TargetCommand` | 🟡 Unverified | | | | `OP_TargetHoTT` | 🔴 Not-Set | | | | `OP_TargetMouse` | 🟡 Unverified | | | diff --git a/utils/EQExtractor2/EQExtractor2/patch_April15-2013.conf b/utils/EQExtractor2/EQExtractor2/patch_April15-2013.conf index 4661c9f03..98fa92c92 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_April15-2013.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_April15-2013.conf @@ -173,7 +173,7 @@ OP_CastSpell=0x3f6d OP_Consider=0x3815 OP_FormattedMessage=0x52c0 OP_SimpleMessage=0x0e29 -OP_Buff=0x0dd5 +OP_BuffDefinition=0x0dd5 OP_Illusion=0x1182 OP_MoneyOnCorpse=0x05e8 OP_RandomReply=0x4b1a @@ -231,8 +231,8 @@ OP_TargetHoTT=0x2baa OP_XTargetResponse=0x0be2 OP_XTargetRequest=0x024c OP_XTargetAutoAddHaters=0x3729 -OP_TargetBuffs=0x241c -OP_BuffCreate=0x6878 +OP_RefreshTargetBuffs=0x241c +OP_RefreshBuffs=0x6878 OP_BuffRemoveRequest=0x78ab OP_DeleteSpawn=0x5279 OP_AutoAttack=0x1bf5 @@ -298,7 +298,7 @@ OP_SendFindableNPCs=0x743b OP_FindPersonRequest=0x3560 OP_FindPersonReply=0x0844 OP_Sound=0x1b73 -OP_PetBuffWindow=0x56c0 +OP_RefreshPetBuffs=0x56c0 OP_LevelAppearance=0x6698 OP_Translocate=0x091a OP_Sacrifice=0x5b22 diff --git a/utils/EQExtractor2/EQExtractor2/patch_Aug04-2011.conf b/utils/EQExtractor2/EQExtractor2/patch_Aug04-2011.conf index 44893bc82..934194134 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_Aug04-2011.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_Aug04-2011.conf @@ -169,7 +169,7 @@ OP_CastSpell=0x7286 # OP_Consider=0x0000 # OP_FormattedMessage=0x32c6 # OP_SimpleMessage=0x0000 # C 0x0000 -OP_Buff=0x0000 # +OP_BuffDefinition=0x0000 # OP_Illusion=0x0000 # OP_MoneyOnCorpse=0x0000 # OP_RandomReply=0x0000 # @@ -224,8 +224,8 @@ OP_TargetMouse=0x5f5e # OP_MobHealth=0x0000 # OP_InitialMobHealth=0x0000 # OP_TargetHoTT=0x0000 # -OP_TargetBuffs=0x0000 # -OP_BuffCreate=0x0000 +OP_RefreshTargetBuffs=0x0000 # +OP_RefreshBuffs=0x0000 OP_DeleteSpawn=0x725a # OP_AutoAttack=0x1df9 # OP_AutoAttack2=0x0000 # @@ -290,7 +290,7 @@ OP_SendFindableNPCs=0x0786 # OP_FindPersonRequest=0x0000 # OP_FindPersonReply=0x0000 # OP_Sound=0x0000 # -OP_PetBuffWindow=0x0000 # +OP_RefreshPetBuffs=0x0000 # OP_LevelAppearance=0x0000 # OP_Translocate=0x0000 # OP_Sacrifice=0x0000 # diff --git a/utils/EQExtractor2/EQExtractor2/patch_August15-2012.conf b/utils/EQExtractor2/EQExtractor2/patch_August15-2012.conf index 6549d6dfd..f2c8c9566 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_August15-2012.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_August15-2012.conf @@ -177,7 +177,7 @@ OP_CastSpell=0x0000 # OP_Consider=0x0000 # OP_FormattedMessage=0x0000 # OP_SimpleMessage=0x0000 # -OP_Buff=0x0000 # +OP_BuffDefinition=0x0000 # OP_Illusion=0x0000 # OP_MoneyOnCorpse=0x0000 # OP_RandomReply=0x0000 # @@ -234,8 +234,8 @@ OP_TargetMouse=0x0000 # OP_MobHealth=0x0000 # OP_InitialMobHealth=0x0000 # OP_TargetHoTT=0x0000 # -OP_TargetBuffs=0x0000 # -OP_BuffCreate=0x0000 # +OP_RefreshTargetBuffs=0x0000 # +OP_RefreshBuffs=0x0000 # OP_BuffRemoveRequest=0x0000 OP_DeleteSpawn=0x0000 # OP_AutoAttack=0x0000 # @@ -302,7 +302,7 @@ OP_SendFindableNPCs=0x6c36 # OP_FindPersonRequest=0x0000 # OP_FindPersonReply=0x0000 # OP_Sound=0x0000 # -OP_PetBuffWindow=0x0000 # +OP_RefreshPetBuffs=0x0000 # OP_LevelAppearance=0x0000 # OP_Translocate=0x0000 # OP_Sacrifice=0x0000 # diff --git a/utils/EQExtractor2/EQExtractor2/patch_Dec10-2012.conf b/utils/EQExtractor2/EQExtractor2/patch_Dec10-2012.conf index 5dbbda600..2a9e10ccc 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_Dec10-2012.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_Dec10-2012.conf @@ -173,7 +173,7 @@ OP_CastSpell=0x1cb5 OP_Consider=0x4d8d OP_FormattedMessage=0x6afe OP_SimpleMessage=0x02a5 -OP_Buff=0x08ed +OP_BuffDefinition=0x08ed OP_Illusion=0x6c43 OP_MoneyOnCorpse=0x1837 OP_RandomReply=0x6525 @@ -231,8 +231,8 @@ OP_TargetHoTT=0x3af5 OP_XTargetResponse=0x7f64 OP_XTargetRequest=0x6753 OP_XTargetAutoAddHaters=0x5f51 -OP_TargetBuffs=0x1c71 -OP_BuffCreate=0x71f5 +OP_RefreshTargetBuffs=0x1c71 +OP_RefreshBuffs=0x71f5 OP_BuffRemoveRequest=0x7efd OP_DeleteSpawn=0x3b06 OP_AutoAttack=0x0d14 @@ -298,7 +298,7 @@ OP_SendFindableNPCs=0x34c3 OP_FindPersonRequest=0x2f3b OP_FindPersonReply=0x44f7 OP_Sound=0x3cec -OP_PetBuffWindow=0x7197 +OP_RefreshPetBuffs=0x7197 OP_LevelAppearance=0x7c4d OP_Translocate=0x6f01 OP_Sacrifice=0x76ab diff --git a/utils/EQExtractor2/EQExtractor2/patch_Dec7-2010.conf b/utils/EQExtractor2/EQExtractor2/patch_Dec7-2010.conf index 570e31cce..9c4334b8a 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_Dec7-2010.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_Dec7-2010.conf @@ -169,7 +169,7 @@ OP_CastSpell=0x7286 # C OP_Consider=0x0000 # C OP_FormattedMessage=0x0000 # C OP_SimpleMessage=0x0000 # C 0x0000 -OP_Buff=0x0000 # C +OP_BuffDefinition=0x0000 # C OP_Illusion=0x0000 # C OP_MoneyOnCorpse=0x0000 # C OP_RandomReply=0x0000 # C @@ -224,8 +224,8 @@ OP_TargetMouse=0x36f8 # C 0x0000 OP_MobHealth=0x0000 # C OP_InitialMobHealth=0x0000 # C OP_TargetHoTT=0x0000 # C -OP_TargetBuffs=0x0000 # C -OP_BuffCreate=0x6bfb # V +OP_RefreshTargetBuffs=0x0000 # C +OP_RefreshBuffs=0x6bfb # V OP_DeleteSpawn=0x7434 # was 0x7434 OP_AutoAttack=0x0000 # C OP_AutoAttack2=0x0000 # C @@ -290,7 +290,7 @@ OP_SendFindableNPCs=0x49f6 # C OP_FindPersonRequest=0x0000 # C OP_FindPersonReply=0x0000 # C OP_Sound=0x0000 # C -OP_PetBuffWindow=0x0000 # C +OP_RefreshPetBuffs=0x0000 # C OP_LevelAppearance=0x0000 # C OP_Translocate=0x0000 # C OP_Sacrifice=0x0000 # C diff --git a/utils/EQExtractor2/EQExtractor2/patch_Feb11-2013.conf b/utils/EQExtractor2/EQExtractor2/patch_Feb11-2013.conf index fa04ec9f8..cae71ac8b 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_Feb11-2013.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_Feb11-2013.conf @@ -173,7 +173,7 @@ OP_CastSpell=0x0e18 OP_Consider=0x0fcd OP_FormattedMessage=0x748e OP_SimpleMessage=0x3ecd -OP_Buff=0x1a9b +OP_BuffDefinition=0x1a9b OP_Illusion=0x359a OP_MoneyOnCorpse=0x1107 OP_RandomReply=0x5cc5 @@ -231,8 +231,8 @@ OP_TargetHoTT=0x1fd6 OP_XTargetResponse=0x6d47 OP_XTargetRequest=0x2603 OP_XTargetAutoAddHaters=0x5fe3 -OP_TargetBuffs=0x4c77 -OP_BuffCreate=0x20ee +OP_RefreshTargetBuffs=0x4c77 +OP_RefreshBuffs=0x20ee OP_BuffRemoveRequest=0x7ca3 OP_DeleteSpawn=0x0ead OP_AutoAttack=0x12fb @@ -298,7 +298,7 @@ OP_SendFindableNPCs=0x7b8a OP_FindPersonRequest=0x5d79 OP_FindPersonReply=0x2b23 OP_Sound=0x03fa -OP_PetBuffWindow=0x1e1c +OP_RefreshPetBuffs=0x1e1c OP_LevelAppearance=0x0442 OP_Translocate=0x2e84 OP_Sacrifice=0x0d88 diff --git a/utils/EQExtractor2/EQExtractor2/patch_Feb8-2011.conf b/utils/EQExtractor2/EQExtractor2/patch_Feb8-2011.conf index b4f2c3415..8212d2062 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_Feb8-2011.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_Feb8-2011.conf @@ -169,7 +169,7 @@ OP_CastSpell=0x7286 # C OP_Consider=0x0000 # C OP_FormattedMessage=0x0000 # C OP_SimpleMessage=0x0000 # C 0x0000 -OP_Buff=0x0000 # C +OP_BuffDefinition=0x0000 # C OP_Illusion=0x0000 # C OP_MoneyOnCorpse=0x0000 # C OP_RandomReply=0x0000 # C @@ -224,8 +224,8 @@ OP_TargetMouse=0x36f8 # C 0x0000 OP_MobHealth=0x0000 # C OP_InitialMobHealth=0x0000 # C OP_TargetHoTT=0x0000 # C -OP_TargetBuffs=0x0000 # C -OP_BuffCreate=0x6bfb # V +OP_RefreshTargetBuffs=0x0000 # C +OP_RefreshBuffs=0x6bfb # V OP_DeleteSpawn=0x7434 # was 0x7434 OP_AutoAttack=0x0000 # C OP_AutoAttack2=0x0000 # C @@ -290,7 +290,7 @@ OP_SendFindableNPCs=0x7eeb # C OP_FindPersonRequest=0x0000 # C OP_FindPersonReply=0x0000 # C OP_Sound=0x0000 # C -OP_PetBuffWindow=0x0000 # C +OP_RefreshPetBuffs=0x0000 # C OP_LevelAppearance=0x0000 # C OP_Translocate=0x0000 # C OP_Sacrifice=0x0000 # C diff --git a/utils/EQExtractor2/EQExtractor2/patch_Jan16-2013.conf b/utils/EQExtractor2/EQExtractor2/patch_Jan16-2013.conf index a2fea9ca6..ffbd37c25 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_Jan16-2013.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_Jan16-2013.conf @@ -173,7 +173,7 @@ OP_CastSpell=0x6bd3 OP_Consider=0x1184 OP_FormattedMessage=0x1bc4 OP_SimpleMessage=0x4926 -OP_Buff=0x3526 +OP_BuffDefinition=0x3526 OP_Illusion=0x02e6 OP_MoneyOnCorpse=0x2a0f OP_RandomReply=0x0b4b @@ -231,8 +231,8 @@ OP_TargetHoTT=0x43ec OP_XTargetResponse=0x18c5 OP_XTargetRequest=0x47bc OP_XTargetAutoAddHaters=0x48f8 -OP_TargetBuffs=0x0a99 -OP_BuffCreate=0x1cc2 +OP_RefreshTargetBuffs=0x0a99 +OP_RefreshBuffs=0x1cc2 OP_BuffRemoveRequest=0x1338 OP_DeleteSpawn=0x781f OP_AutoAttack=0x1740 @@ -298,7 +298,7 @@ OP_SendFindableNPCs=0x5de1 OP_FindPersonRequest=0x4150 OP_FindPersonReply=0x65f0 OP_Sound=0x797b -OP_PetBuffWindow=0x12cd +OP_RefreshPetBuffs=0x12cd OP_LevelAppearance=0x34b9 OP_Translocate=0x7121 OP_Sacrifice=0x609b diff --git a/utils/EQExtractor2/EQExtractor2/patch_July13-2012.conf b/utils/EQExtractor2/EQExtractor2/patch_July13-2012.conf index 5f53a8eaa..8238d518b 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_July13-2012.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_July13-2012.conf @@ -177,7 +177,7 @@ OP_CastSpell=0x8543 # OP_Consider=0x70c6 # OP_FormattedMessage=0x4675 # OP_SimpleMessage=0x0698 # -OP_Buff=0x4658 # +OP_BuffDefinition=0x4658 # OP_Illusion=0x10b7 # OP_MoneyOnCorpse=0x4074 # OP_RandomReply=0x07fb # @@ -234,8 +234,8 @@ OP_TargetMouse=0x3edc # OP_MobHealth=0x5cb0 # OP_InitialMobHealth=0x0000 # OP_TargetHoTT=0x460e # -OP_TargetBuffs=0x7c24 # -OP_BuffCreate=0x0c98 # +OP_RefreshTargetBuffs=0x7c24 # +OP_RefreshBuffs=0x0c98 # OP_BuffRemoveRequest=0x3567 OP_DeleteSpawn=0x3164 # OP_AutoAttack=0x2257 # @@ -302,7 +302,7 @@ OP_SendFindableNPCs=0x50c1 # OP_FindPersonRequest=0x19a8 # OP_FindPersonReply=0x7e45 # OP_Sound=0x2d1d # -OP_PetBuffWindow=0x4895 # +OP_RefreshPetBuffs=0x4895 # OP_LevelAppearance=0x78b9 # OP_Translocate=0x42ef # OP_Sacrifice=0x2dc6 # diff --git a/utils/EQExtractor2/EQExtractor2/patch_June25-2012.conf b/utils/EQExtractor2/EQExtractor2/patch_June25-2012.conf index 3be014ca9..935bb4698 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_June25-2012.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_June25-2012.conf @@ -177,7 +177,7 @@ OP_CastSpell=0x8543 # OP_Consider=0x70c6 # OP_FormattedMessage=0x4675 # OP_SimpleMessage=0x0698 # -OP_Buff=0x4658 # +OP_BuffDefinition=0x4658 # OP_Illusion=0x10b7 # OP_MoneyOnCorpse=0x4074 # OP_RandomReply=0x07fb # @@ -234,8 +234,8 @@ OP_TargetMouse=0x3edc # OP_MobHealth=0x5cb0 # OP_InitialMobHealth=0x0000 # OP_TargetHoTT=0x460e # -OP_TargetBuffs=0x7c24 # -OP_BuffCreate=0x0c98 # +OP_RefreshTargetBuffs=0x7c24 # +OP_RefreshBuffs=0x0c98 # OP_BuffRemoveRequest=0x3567 OP_DeleteSpawn=0x3164 # OP_AutoAttack=0x2257 # @@ -302,7 +302,7 @@ OP_SendFindableNPCs=0x099e # OP_FindPersonRequest=0x19a8 # OP_FindPersonReply=0x7e45 # OP_Sound=0x2d1d # -OP_PetBuffWindow=0x4895 # +OP_RefreshPetBuffs=0x4895 # OP_LevelAppearance=0x78b9 # OP_Translocate=0x42ef # OP_Sacrifice=0x2dc6 # diff --git a/utils/EQExtractor2/EQExtractor2/patch_Mar13-2013.conf b/utils/EQExtractor2/EQExtractor2/patch_Mar13-2013.conf index 25ff533bb..a337d8e8d 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_Mar13-2013.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_Mar13-2013.conf @@ -173,7 +173,7 @@ OP_CastSpell=0x56ab OP_Consider=0x476f OP_FormattedMessage=0x69aa OP_SimpleMessage=0x0e87 -OP_Buff=0x2acd +OP_BuffDefinition=0x2acd OP_Illusion=0x739c OP_MoneyOnCorpse=0x43c4 OP_RandomReply=0x467d @@ -231,8 +231,8 @@ OP_TargetHoTT=0x72b0 OP_XTargetResponse=0x38c9 OP_XTargetRequest=0x616b OP_XTargetAutoAddHaters=0x0ef7 -OP_TargetBuffs=0x0aa5 -OP_BuffCreate=0x3e45 +OP_RefreshTargetBuffs=0x0aa5 +OP_RefreshBuffs=0x3e45 OP_BuffRemoveRequest=0x063f OP_DeleteSpawn=0x49e0 OP_AutoAttack=0x18e2 @@ -298,7 +298,7 @@ OP_SendFindableNPCs=0x6788 OP_FindPersonRequest=0x6ccd OP_FindPersonReply=0x1f1c OP_Sound=0x6957 -OP_PetBuffWindow=0x66a7 +OP_RefreshPetBuffs=0x66a7 OP_LevelAppearance=0x3714 OP_Translocate=0x4613 OP_Sacrifice=0x1502 diff --git a/utils/EQExtractor2/EQExtractor2/patch_Mar15-2012.conf b/utils/EQExtractor2/EQExtractor2/patch_Mar15-2012.conf index 23248f238..de4efdb37 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_Mar15-2012.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_Mar15-2012.conf @@ -175,7 +175,7 @@ OP_CastSpell=0x8543 # OP_Consider=0x70c6 # OP_FormattedMessage=0x4675 # OP_SimpleMessage=0x0698 # -OP_Buff=0x4658 # +OP_BuffDefinition=0x4658 # OP_Illusion=0x10b7 # OP_MoneyOnCorpse=0x4074 # OP_RandomReply=0x07fb # @@ -232,8 +232,8 @@ OP_TargetMouse=0x3edc # OP_MobHealth=0x5cb0 # OP_InitialMobHealth=0x0000 # OP_TargetHoTT=0x460e # -OP_TargetBuffs=0x7c24 # -OP_BuffCreate=0x0c98 # +OP_RefreshTargetBuffs=0x7c24 # +OP_RefreshBuffs=0x0c98 # OP_BuffRemoveRequest=0x3567 OP_DeleteSpawn=0x3164 # OP_AutoAttack=0x2257 # @@ -300,7 +300,7 @@ OP_SendFindableNPCs=0x3015 # OP_FindPersonRequest=0x19a8 # OP_FindPersonReply=0x7e45 # OP_Sound=0x2d1d # -OP_PetBuffWindow=0x4895 # +OP_RefreshPetBuffs=0x4895 # OP_LevelAppearance=0x78b9 # OP_Translocate=0x42ef # OP_Sacrifice=0x2dc6 # diff --git a/utils/EQExtractor2/EQExtractor2/patch_March15-2011.conf b/utils/EQExtractor2/EQExtractor2/patch_March15-2011.conf index b693f0619..9356c1857 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_March15-2011.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_March15-2011.conf @@ -169,7 +169,7 @@ OP_CastSpell=0x7286 # C OP_Consider=0x0000 # C OP_FormattedMessage=0x0000 # C OP_SimpleMessage=0x0000 # C 0x0000 -OP_Buff=0x0000 # C +OP_BuffDefinition=0x0000 # C OP_Illusion=0x0000 # C OP_MoneyOnCorpse=0x0000 # C OP_RandomReply=0x0000 # C @@ -224,8 +224,8 @@ OP_TargetMouse=0x36f8 # C 0x0000 OP_MobHealth=0x0000 # C OP_InitialMobHealth=0x0000 # C OP_TargetHoTT=0x0000 # C -OP_TargetBuffs=0x0000 # C -OP_BuffCreate=0x6bfb # V +OP_RefreshTargetBuffs=0x0000 # C +OP_RefreshBuffs=0x6bfb # V OP_DeleteSpawn=0x7434 # was 0x7434 OP_AutoAttack=0x0000 # C OP_AutoAttack2=0x0000 # C @@ -290,7 +290,7 @@ OP_SendFindableNPCs=0x7eeb # C OP_FindPersonRequest=0x0000 # C OP_FindPersonReply=0x0000 # C OP_Sound=0x0000 # C -OP_PetBuffWindow=0x0000 # C +OP_RefreshPetBuffs=0x0000 # C OP_LevelAppearance=0x0000 # C OP_Translocate=0x0000 # C OP_Sacrifice=0x0000 # C diff --git a/utils/EQExtractor2/EQExtractor2/patch_May12-2010.conf b/utils/EQExtractor2/EQExtractor2/patch_May12-2010.conf index dacd2248f..59b75ca71 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_May12-2010.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_May12-2010.conf @@ -170,7 +170,7 @@ OP_CastSpell=0x50c2 # C OP_Consider=0x3c2d # C OP_FormattedMessage=0x3b52 # C OP_SimpleMessage=0x1f4d # C 0x5448 -OP_Buff=0x0d1d # C +OP_BuffDefinition=0x0d1d # C OP_Illusion=0x231f # C OP_MoneyOnCorpse=0x4a83 # C OP_RandomReply=0x6d5d # C @@ -225,8 +225,8 @@ OP_TargetMouse=0x5f5e # C 0x7bbb OP_MobHealth=0x15de # C OP_InitialMobHealth=0x5cb0 # C OP_TargetHoTT=0x4d56 # C -OP_TargetBuffs=0x3f24 # C -OP_BuffCreate=0x2121 # V +OP_RefreshTargetBuffs=0x3f24 # C +OP_RefreshBuffs=0x2121 # V OP_DeleteSpawn=0x58c5 # C OP_AutoAttack=0x1df9 # C OP_AutoAttack2=0x517b # C @@ -291,7 +291,7 @@ OP_SendFindableNPCs=0x6193 # C OP_FindPersonRequest=0x1e04 # C OP_FindPersonReply=0x7cae # C OP_Sound=0x737a # C -OP_PetBuffWindow=0x7b87 # C +OP_RefreshPetBuffs=0x7b87 # C OP_LevelAppearance=0x1bd4 # C OP_Translocate=0x3d9c # C OP_Sacrifice=0x301b # C diff --git a/utils/EQExtractor2/EQExtractor2/patch_May12-2011.conf b/utils/EQExtractor2/EQExtractor2/patch_May12-2011.conf index 572967ead..1367ea267 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_May12-2011.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_May12-2011.conf @@ -169,7 +169,7 @@ OP_CastSpell=0x7286 # C OP_Consider=0x0000 # C OP_FormattedMessage=0x0000 # C OP_SimpleMessage=0x0000 # C 0x0000 -OP_Buff=0x0000 # C +OP_BuffDefinition=0x0000 # C OP_Illusion=0x0000 # C OP_MoneyOnCorpse=0x0000 # C OP_RandomReply=0x0000 # C @@ -224,8 +224,8 @@ OP_TargetMouse=0x36f8 # C 0x0000 OP_MobHealth=0x0000 # C OP_InitialMobHealth=0x0000 # C OP_TargetHoTT=0x0000 # C -OP_TargetBuffs=0x0000 # C -OP_BuffCreate=0x6bfb # V +OP_RefreshTargetBuffs=0x0000 # C +OP_RefreshBuffs=0x6bfb # V OP_DeleteSpawn=0x7434 # was 0x7434 OP_AutoAttack=0x0000 # C OP_AutoAttack2=0x0000 # C @@ -290,7 +290,7 @@ OP_SendFindableNPCs=0x390c # C OP_FindPersonRequest=0x0000 # C OP_FindPersonReply=0x0000 # C OP_Sound=0x0000 # C -OP_PetBuffWindow=0x0000 # C +OP_RefreshPetBuffs=0x0000 # C OP_LevelAppearance=0x0000 # C OP_Translocate=0x0000 # C OP_Sacrifice=0x0000 # C diff --git a/utils/EQExtractor2/EQExtractor2/patch_Nov17-2011.conf b/utils/EQExtractor2/EQExtractor2/patch_Nov17-2011.conf index 91dc487ba..a77eab374 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_Nov17-2011.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_Nov17-2011.conf @@ -160,7 +160,7 @@ OP_CastSpell=0x7286 # OP_Consider=0x70c6 #c OP_FormattedMessage=0x32c6 # OP_SimpleMessage=0x0000 # C 0x0000 -OP_Buff=0x0000 # +OP_BuffDefinition=0x0000 # OP_Illusion=0x4843 #c OP_MoneyOnCorpse=0x0000 # OP_RandomReply=0x0000 # @@ -215,8 +215,8 @@ OP_TargetMouse=0x3edc # OP_MobHealth=0x5cb0 #c OP_InitialMobHealth=0x0000 # OP_TargetHoTT=0x0000 # -OP_TargetBuffs=0x0000 # -OP_BuffCreate=0x0000 +OP_RefreshTargetBuffs=0x0000 # +OP_RefreshBuffs=0x0000 OP_DeleteSpawn=0x58c5 #c OP_AutoAttack=0x1df9 # OP_AutoAttack2=0x0000 # @@ -281,7 +281,7 @@ OP_SendFindableNPCs=0x3015 # OP_FindPersonRequest=0x0000 # OP_FindPersonReply=0x0000 # OP_Sound=0x0000 # -OP_PetBuffWindow=0x0000 # +OP_RefreshPetBuffs=0x0000 # OP_LevelAppearance=0x0000 # OP_Translocate=0x0000 # OP_Sacrifice=0x0000 # diff --git a/utils/EQExtractor2/EQExtractor2/patch_Sep01-2010.conf b/utils/EQExtractor2/EQExtractor2/patch_Sep01-2010.conf index 5cb16815b..913363212 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_Sep01-2010.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_Sep01-2010.conf @@ -170,7 +170,7 @@ OP_CastSpell=0x7286 # C OP_Consider=0x0000 # C OP_FormattedMessage=0x0000 # C OP_SimpleMessage=0x0000 # C 0x0000 -OP_Buff=0x0000 # C +OP_BuffDefinition=0x0000 # C OP_Illusion=0x0000 # C OP_MoneyOnCorpse=0x0000 # C OP_RandomReply=0x0000 # C @@ -225,8 +225,8 @@ OP_TargetMouse=0x36f8 # C 0x0000 OP_MobHealth=0x0000 # C OP_InitialMobHealth=0x0000 # C OP_TargetHoTT=0x0000 # C -OP_TargetBuffs=0x0000 # C -OP_BuffCreate=0x0000 # V +OP_RefreshTargetBuffs=0x0000 # C +OP_RefreshBuffs=0x0000 # V OP_DeleteSpawn=0x7434 # C OP_AutoAttack=0x0000 # C OP_AutoAttack2=0x0000 # C @@ -291,7 +291,7 @@ OP_SendFindableNPCs=0x162d # C OP_FindPersonRequest=0x0000 # C OP_FindPersonReply=0x0000 # C OP_Sound=0x0000 # C -OP_PetBuffWindow=0x0000 # C +OP_RefreshPetBuffs=0x0000 # C OP_LevelAppearance=0x0000 # C OP_Translocate=0x0000 # C OP_Sacrifice=0x0000 # C diff --git a/utils/EQExtractor2/EQExtractor2/patch_Sep22-2010.conf b/utils/EQExtractor2/EQExtractor2/patch_Sep22-2010.conf index feb6eaf12..5d921774f 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_Sep22-2010.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_Sep22-2010.conf @@ -170,7 +170,7 @@ OP_CastSpell=0x0000 # C OP_Consider=0x0000 # C OP_FormattedMessage=0x0000 # C OP_SimpleMessage=0x0000 # C 0x0000 -OP_Buff=0x0000 # C +OP_BuffDefinition=0x0000 # C OP_Illusion=0x0000 # C OP_MoneyOnCorpse=0x0000 # C OP_RandomReply=0x0000 # C @@ -225,8 +225,8 @@ OP_TargetMouse=0x36f8 # C 0x0000 OP_MobHealth=0x0000 # C OP_InitialMobHealth=0x0000 # C OP_TargetHoTT=0x0000 # C -OP_TargetBuffs=0x0000 # C -OP_BuffCreate=0x0000 # V +OP_RefreshTargetBuffs=0x0000 # C +OP_RefreshBuffs=0x0000 # V OP_DeleteSpawn=0x7434 # was 0x7434 OP_AutoAttack=0x0000 # C OP_AutoAttack2=0x0000 # C @@ -291,7 +291,7 @@ OP_SendFindableNPCs=0x6b67 # was 0x162d OP_FindPersonRequest=0x0000 # C OP_FindPersonReply=0x0000 # C OP_Sound=0x0000 # C -OP_PetBuffWindow=0x0000 # C +OP_RefreshPetBuffs=0x0000 # C OP_LevelAppearance=0x0000 # C OP_Translocate=0x0000 # C OP_Sacrifice=0x0000 # C diff --git a/utils/EQExtractor2/EQExtractor2/patch_SoD.conf b/utils/EQExtractor2/EQExtractor2/patch_SoD.conf index 3ae82376b..599d94657 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_SoD.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_SoD.conf @@ -172,7 +172,7 @@ OP_CastSpell=0x3582 # C OP_Consider=0x6024 # C OP_FormattedMessage=0x1318 # C OP_SimpleMessage=0x5448 # C -OP_Buff=0x7ea8 # C +OP_BuffDefinition=0x7ea8 # C OP_Illusion=0x48f9 # C OP_MoneyOnCorpse=0x6546 # C OP_RandomReply=0x6cdc # C @@ -227,7 +227,7 @@ OP_TargetMouse=0x7bbb # C OP_MobHealth=0x47ea # C OP_InitialMobHealth=0x2d25 # C OP_TargetHoTT=0x3ec7 # C -OP_TargetBuffs=0x3df8 +OP_RefreshTargetBuffs=0x3df8 OP_DeleteSpawn=0x3164 # C OP_AutoAttack=0x3d86 # C OP_AutoAttack2=0x4ca1 # C @@ -293,7 +293,7 @@ OP_SendFindableNPCs=0x5360 OP_FindPersonRequest=0x3168 # C OP_FindPersonReply=0x1ac8 # C OP_Sound=0x303e # C -OP_PetBuffWindow=0x2dd3 # C +OP_RefreshPetBuffs=0x2dd3 # C OP_LevelAppearance=0x6dc3 # C OP_Translocate=0x2042 # C OP_Sacrifice=0x5805 # C diff --git a/utils/EQExtractor2/EQExtractor2/patch_TestServer-Feb5-2013.conf b/utils/EQExtractor2/EQExtractor2/patch_TestServer-Feb5-2013.conf index a633e4f37..b835930b7 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_TestServer-Feb5-2013.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_TestServer-Feb5-2013.conf @@ -173,7 +173,7 @@ OP_CastSpell=0x568e OP_Consider=0x0ea4 OP_FormattedMessage=0x7cd3 OP_SimpleMessage=0x4a83 -OP_Buff=0x3c26 +OP_BuffDefinition=0x3c26 OP_Illusion=0x25dd OP_MoneyOnCorpse=0x6fbd OP_RandomReply=0x3939 @@ -231,8 +231,8 @@ OP_TargetHoTT=0x042a OP_XTargetResponse=0x5473 OP_XTargetRequest=0x45a9 OP_XTargetAutoAddHaters=0x5af8 -OP_TargetBuffs=0x156f -OP_BuffCreate=0x2013 +OP_RefreshTargetBuffs=0x156f +OP_RefreshBuffs=0x2013 OP_BuffRemoveRequest=0x718c OP_DeleteSpawn=0x69b2 OP_AutoAttack=0x702f @@ -298,7 +298,7 @@ OP_SendFindableNPCs=0x6516 OP_FindPersonRequest=0x4e65 OP_FindPersonReply=0x5e04 OP_Sound=0x6ad4 -OP_PetBuffWindow=0x5be1 +OP_RefreshPetBuffs=0x5be1 OP_LevelAppearance=0x7a6f OP_Translocate=0x3a61 OP_Sacrifice=0x18a6 diff --git a/utils/EQExtractor2/EQExtractor2/patch_TestServer-Jan16-2013.conf b/utils/EQExtractor2/EQExtractor2/patch_TestServer-Jan16-2013.conf index 5a8baa8fa..62afc1735 100644 --- a/utils/EQExtractor2/EQExtractor2/patch_TestServer-Jan16-2013.conf +++ b/utils/EQExtractor2/EQExtractor2/patch_TestServer-Jan16-2013.conf @@ -173,7 +173,7 @@ OP_CastSpell=0x5c4b OP_Consider=0x0e31 OP_FormattedMessage=0x3735 OP_SimpleMessage=0x4645 -OP_Buff=0x7fb5 +OP_BuffDefinition=0x7fb5 OP_Illusion=0x3772 OP_MoneyOnCorpse=0x4ab0 OP_RandomReply=0x76ea @@ -231,8 +231,8 @@ OP_TargetHoTT=0x1be6 OP_XTargetResponse=0x0ad9 OP_XTargetRequest=0x3034 OP_XTargetAutoAddHaters=0x7efd -OP_TargetBuffs=0x5e3b -OP_BuffCreate=0x51da +OP_RefreshTargetBuffs=0x5e3b +OP_RefreshBuffs=0x51da OP_BuffRemoveRequest=0x6ce2 OP_DeleteSpawn=0x0ef8 OP_AutoAttack=0x577f @@ -298,7 +298,7 @@ OP_SendFindableNPCs=0x62da OP_FindPersonRequest=0x41fb OP_FindPersonReply=0x23e2 OP_Sound=0x622a -OP_PetBuffWindow=0x53f8 +OP_RefreshPetBuffs=0x53f8 OP_LevelAppearance=0x5b03 OP_Translocate=0x5e10 OP_Sacrifice=0x2ee4 diff --git a/utils/patches/opcodes.conf b/utils/patches/opcodes.conf index 3f5e87b5a..0469ce50e 100644 --- a/utils/patches/opcodes.conf +++ b/utils/patches/opcodes.conf @@ -175,7 +175,7 @@ OP_SetRunMode=0x4aba # ShowEQ 10/27/05 OP_SimpleMessage=0x673c # ShowEQ 10/27/05 OP_SaveOnZoneReq=0x1540 # ShowEQ 10/27/05 OP_SenseHeading=0x05ac # ShowEQ 10/27/05 -OP_Buff=0x6a53 # ShowEQ 10/27/05 +OP_BuffDefinition=0x6a53 # ShowEQ 10/27/05 OP_LootComplete=0x0a94 # ShowEQ 10/27/05 OP_EnvDamage=0x31b3 # ShowEQ 10/27/05 OP_Split=0x4848 # ShowEQ 10/27/05 diff --git a/utils/patches/patch_RoF.conf b/utils/patches/patch_RoF.conf index f961afadf..c4def424a 100644 --- a/utils/patches/patch_RoF.conf +++ b/utils/patches/patch_RoF.conf @@ -179,7 +179,7 @@ OP_CastSpell=0x1cb5 OP_Consider=0x4d8d OP_FormattedMessage=0x6afe OP_SimpleMessage=0x02a5 -OP_Buff=0x08ed +OP_BuffDefinition=0x08ed OP_Illusion=0x6c43 OP_MoneyOnCorpse=0x1837 OP_RandomReply=0x6525 @@ -241,8 +241,8 @@ OP_XTargetRequest=0x6753 OP_XTargetAutoAddHaters=0x5f51 OP_XTargetOpen=0x7423 OP_XTargetOpenResponse=0x27e8 -OP_TargetBuffs=0x1c71 -OP_BuffCreate=0x71f5 +OP_RefreshTargetBuffs=0x1c71 +OP_RefreshBuffs=0x71f5 OP_BuffRemoveRequest=0x7efd OP_DeleteSpawn=0x3b06 OP_AutoAttack=0x0d14 @@ -312,7 +312,7 @@ OP_FindPersonRequest=0x2f3b OP_FindPersonReply=0x44f7 OP_Sound=0x3cec OP_CashReward=0x17a5 -OP_PetBuffWindow=0x7197 +OP_RefreshPetBuffs=0x7197 OP_LevelAppearance=0x7c4d OP_Translocate=0x6f01 OP_Sacrifice=0x76ab diff --git a/utils/patches/patch_RoF2.conf b/utils/patches/patch_RoF2.conf index e5d9173cf..bff232bf9 100644 --- a/utils/patches/patch_RoF2.conf +++ b/utils/patches/patch_RoF2.conf @@ -183,7 +183,7 @@ OP_CastSpell=0x1287 OP_Consider=0x742b OP_FormattedMessage=0x1024 OP_SimpleMessage=0x213f -OP_Buff=0x659c +OP_BuffDefinition=0x659c OP_Illusion=0x312a OP_MoneyOnCorpse=0x5f44 OP_RandomReply=0x106b @@ -241,13 +241,13 @@ OP_TargetMouse=0x075d OP_MobHealth=0x37b1 OP_InitialMobHealth=0x0000 # Unused? OP_TargetHoTT=0x0272 -OP_TargetBuffs=0x4f4b +OP_RefreshTargetBuffs=0x4f4b OP_XTargetResponse=0x4d59 OP_XTargetRequest=0x3763 OP_XTargetAutoAddHaters=0x672f OP_XTargetOpen=0x61df OP_XTargetOpenResponse=0x3ef8 -OP_BuffCreate=0x3377 +OP_RefreshBuffs=0x3377 OP_BuffRemoveRequest=0x64f2 OP_DeleteSpawn=0x7280 OP_AutoAttack=0x109d @@ -316,7 +316,7 @@ OP_FindPersonRequest=0x5cea OP_FindPersonReply=0x7e58 OP_Sound=0x1a30 OP_CashReward=0x5f7a -OP_PetBuffWindow=0x5882 +OP_RefreshPetBuffs=0x5882 OP_LevelAppearance=0x3bc9 OP_Translocate=0x6580 OP_Sacrifice=0x1821 diff --git a/utils/patches/patch_SoD.conf b/utils/patches/patch_SoD.conf index b79f1441c..da5ca33cf 100644 --- a/utils/patches/patch_SoD.conf +++ b/utils/patches/patch_SoD.conf @@ -178,7 +178,7 @@ OP_CastSpell=0x3582 # C OP_Consider=0x6024 # C OP_FormattedMessage=0x1318 # C OP_SimpleMessage=0x5448 # C -OP_Buff=0x7ea8 # C +OP_BuffDefinition=0x7ea8 # C OP_Illusion=0x48f9 # C OP_MoneyOnCorpse=0x6546 # C OP_RandomReply=0x6cdc # C @@ -236,7 +236,7 @@ OP_TargetMouse=0x7bbb # C OP_MobHealth=0x47ea # C OP_InitialMobHealth=0x2d25 # C OP_TargetHoTT=0x3ec7 # C -OP_TargetBuffs=0x3df8 +OP_RefreshTargetBuffs=0x3df8 OP_BuffRemoveRequest=0x6f9d OP_DeleteSpawn=0x3164 # C OP_AutoAttack=0x3d86 # C @@ -308,7 +308,7 @@ OP_FindPersonRequest=0x3168 # C OP_FindPersonReply=0x1ac8 # C OP_Sound=0x303e # C OP_CashReward=0x3703 -OP_PetBuffWindow=0x2dd3 # C +OP_RefreshPetBuffs=0x2dd3 # C OP_LevelAppearance=0x6dc3 # C OP_Translocate=0x2042 # C OP_Sacrifice=0x5805 # C diff --git a/utils/patches/patch_SoF.conf b/utils/patches/patch_SoF.conf index 91d5c7660..a523730d3 100644 --- a/utils/patches/patch_SoF.conf +++ b/utils/patches/patch_SoF.conf @@ -175,7 +175,7 @@ OP_CastSpell=0x7F5D #SEQ 12/04/08 OP_Consider=0x32E1 #SEQ 12/04/08 OP_FormattedMessage=0x5B9E #SEQ 12/04/08 OP_SimpleMessage=0x553E #SEQ 12/04/08 -OP_Buff=0x7BD6 #SEQ 12/04/08 +OP_BuffDefinition=0x7BD6 #SEQ 12/04/08 OP_Illusion=0x7F86 #SEQ 12/04/08 OP_MoneyOnCorpse=0x51C9 #SEQ 12/04/08 OP_RandomReply=0x649C #SEQ 12/04/08 @@ -300,7 +300,7 @@ OP_FindPersonRequest=0x07F0 #Derision 2009 OP_FindPersonReply=0x7770 #Derision 2009 OP_Sound=0x2B02 #Derision 2009 OP_CashReward=0x5e80 -OP_PetBuffWindow=0x124A #Derision 2009 +OP_RefreshPetBuffs=0x124A #Derision 2009 OP_LevelAppearance=0x3EC8 #Derision 2009 OP_Translocate=0x1F0F #Derision 2009 OP_Sacrifice=0x55C9 #Derision 2009 diff --git a/utils/patches/patch_TOB.conf b/utils/patches/patch_TOB.conf index de96f6841..895b19c17 100644 --- a/utils/patches/patch_TOB.conf +++ b/utils/patches/patch_TOB.conf @@ -178,7 +178,10 @@ OP_CastSpell=0x1d63 OP_Consider=0x4568 OP_FormattedMessage=0x29b4 OP_SimpleMessage=0x5b2d -OP_Buff=0x2427 +OP_BuffDefinition=0x2427 +OP_RefreshBuffs=0x754c +OP_RefreshTargetBuffs=0x197f +OP_RefreshPetBuffs=0x4f42 OP_Illusion=0x7fb0 OP_MoneyOnCorpse=0x6f63 OP_RandomReply=0x1234 @@ -236,13 +239,11 @@ OP_TargetMouse=0x7f48 OP_MobHealth=0x445e OP_InitialMobHealth=0x0000 # Unused? OP_TargetHoTT=0x0000 -OP_TargetBuffs=0x0000 OP_XTargetResponse=0x0000 OP_XTargetRequest=0x0000 OP_XTargetAutoAddHaters=0x0000 OP_XTargetOpen=0x0000 OP_XTargetOpenResponse=0x0000 -OP_BuffCreate=0x754c OP_BuffRemoveRequest=0x0c06 OP_DeleteSpawn=0x33fa OP_AutoAttack=0x3ced @@ -310,7 +311,6 @@ OP_FindPersonRequest=0x0000 OP_FindPersonReply=0x0000 OP_Sound=0x5949 OP_CashReward=0x3237 -OP_PetBuffWindow=0x0000 OP_LevelAppearance=0x5eb5 OP_Translocate=0x0611 OP_Sacrifice=0x4b76 diff --git a/utils/patches/patch_Titanium.conf b/utils/patches/patch_Titanium.conf index 8d39d3ec1..2181e1fe1 100644 --- a/utils/patches/patch_Titanium.conf +++ b/utils/patches/patch_Titanium.conf @@ -188,7 +188,7 @@ OP_AutoFire=0x6c53 OP_Consider=0x65ca # ShowEQ 10/27/05 OP_Emote=0x547a # ShowEQ 10/27/05 OP_PetCommands=0x10a1 # ShowEQ 10/27/05 -OP_PetBuffWindow=0x4e31 +OP_RefreshPetBuffs=0x4e31 OP_SpawnAppearance=0x7c32 # ShowEQ 10/27/05 OP_DeleteSpawn=0x55bc # ShowEQ 10/27/05 OP_FormattedMessage=0x5a48 # ShowEQ 10/27/05 @@ -199,7 +199,7 @@ OP_SetRunMode=0x4aba # ShowEQ 10/27/05 OP_SimpleMessage=0x673c # ShowEQ 10/27/05 OP_SaveOnZoneReq=0x1540 # ShowEQ 10/27/05 OP_SenseHeading=0x05ac # ShowEQ 10/27/05 -OP_Buff=0x6a53 # ShowEQ 10/27/05 +OP_BuffDefinition=0x6a53 # ShowEQ 10/27/05 OP_LootComplete=0x0a94 # ShowEQ 10/27/05 OP_EnvDamage=0x31b3 # ShowEQ 10/27/05 OP_Split=0x4848 # ShowEQ 10/27/05 diff --git a/utils/patches/patch_UF.conf b/utils/patches/patch_UF.conf index aa3beb3a2..c3c916989 100644 --- a/utils/patches/patch_UF.conf +++ b/utils/patches/patch_UF.conf @@ -187,7 +187,7 @@ OP_CastSpell=0x50c2 # C OP_Consider=0x3c2d # C OP_FormattedMessage=0x3b52 # C OP_SimpleMessage=0x1f4d # C 0x5448 -OP_Buff=0x0d1d # C +OP_BuffDefinition=0x0d1d # C OP_Illusion=0x231f # C OP_MoneyOnCorpse=0x4a83 # C OP_RandomReply=0x6d5d # C @@ -252,8 +252,8 @@ OP_XTargetRequest=0x4750 # OP_XTargetAutoAddHaters=0x1a28 # OP_XTargetOpen=0x11ae OP_XTargetOpenResponse=0x45d3 -OP_TargetBuffs=0x3f24 # C -OP_BuffCreate=0x2121 # V +OP_RefreshTargetBuffs=0x3f24 # C +OP_RefreshBuffs=0x2121 # V OP_BuffRemoveRequest=0x4065 OP_DeleteSpawn=0x58c5 # C OP_AutoAttack=0x1df9 # C @@ -324,7 +324,7 @@ OP_FindPersonRequest=0x1e04 # C OP_FindPersonReply=0x7cae # C OP_Sound=0x737a # C OP_CashReward=0x039d -OP_PetBuffWindow=0x7b87 # C +OP_RefreshPetBuffs=0x7b87 # C OP_LevelAppearance=0x1bd4 # C OP_Translocate=0x3d9c # C OP_Sacrifice=0x301b # C diff --git a/utils/scripts/opcode_scripts/patch_NEW.conf b/utils/scripts/opcode_scripts/patch_NEW.conf index 29bc320d9..37852598b 100644 --- a/utils/scripts/opcode_scripts/patch_NEW.conf +++ b/utils/scripts/opcode_scripts/patch_NEW.conf @@ -174,7 +174,7 @@ OP_CastSpell=0x1287 OP_Consider=0x742b OP_FormattedMessage=0x1024 OP_SimpleMessage=0x213f -OP_Buff=0x659c +OP_BuffDefinition=0x659c OP_Illusion=0x312a OP_MoneyOnCorpse=0x5f44 OP_RandomReply=0x106b @@ -232,8 +232,8 @@ OP_TargetHoTT=0x0272 OP_XTargetResponse=0x672f OP_XTargetRequest=0x45be OP_XTargetAutoAddHaters=0x792c -OP_TargetBuffs=0x4f4b -OP_BuffCreate=0x3377 +OP_RefreshTargetBuffs=0x4f4b +OP_RefreshBuffs=0x3377 OP_BuffRemoveRequest=0x64f2 OP_DeleteSpawn=0x7280 OP_AutoAttack=0x109d @@ -301,7 +301,7 @@ OP_SendFindableNPCs=0x4613 OP_FindPersonRequest=0x5cea OP_FindPersonReply=0x7e58 OP_Sound=0x1a30 -OP_PetBuffWindow=0x5882 +OP_RefreshPetBuffs=0x5882 OP_LevelAppearance=0x3bc9 OP_Translocate=0x6580 OP_Sacrifice=0x1821 diff --git a/utils/scripts/opcode_scripts/patch_OLD.conf b/utils/scripts/opcode_scripts/patch_OLD.conf index 589c47468..6ebb2df91 100644 --- a/utils/scripts/opcode_scripts/patch_OLD.conf +++ b/utils/scripts/opcode_scripts/patch_OLD.conf @@ -174,7 +174,7 @@ OP_CastSpell=0x1287 OP_Consider=0x742b OP_FormattedMessage=0x1024 OP_SimpleMessage=0x213f -OP_Buff=0x659c +OP_BuffDefinition=0x659c OP_Illusion=0x312a OP_MoneyOnCorpse=0x5f44 OP_RandomReply=0x106b @@ -232,8 +232,8 @@ OP_TargetHoTT=0x0272 OP_XTargetResponse=0x672f OP_XTargetRequest=0x45be OP_XTargetAutoAddHaters=0x792c -OP_TargetBuffs=0x4f4b -OP_BuffCreate=0x3377 +OP_RefreshTargetBuffs=0x4f4b +OP_RefreshBuffs=0x3377 OP_BuffRemoveRequest=0x64f2 OP_DeleteSpawn=0x7280 OP_AutoAttack=0x109d @@ -301,7 +301,7 @@ OP_SendFindableNPCs=0x3897 OP_FindPersonRequest=0x5cea OP_FindPersonReply=0x7e58 OP_Sound=0x1a30 -OP_PetBuffWindow=0x5882 +OP_RefreshPetBuffs=0x5882 OP_LevelAppearance=0x3bc9 OP_Translocate=0x6580 OP_Sacrifice=0x1821 diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 7dc0dab17..d76ea7b86 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -139,7 +139,7 @@ void MapOpcodes() ConnectedOpcodes[OP_BlockedBuffs] = &Client::Handle_OP_BlockedBuffs; ConnectedOpcodes[OP_BoardBoat] = &Client::Handle_OP_BoardBoat; ConnectedOpcodes[OP_BookButton] = &Client::Handle_OP_BookButton; - ConnectedOpcodes[OP_Buff] = &Client::Handle_OP_Buff; + ConnectedOpcodes[OP_BuffDefinition] = &Client::Handle_OP_BuffDefinition; ConnectedOpcodes[OP_BuffRemoveRequest] = &Client::Handle_OP_BuffRemoveRequest; ConnectedOpcodes[OP_Bug] = &Client::Handle_OP_Bug; ConnectedOpcodes[OP_Camp] = &Client::Handle_OP_Camp; @@ -4163,14 +4163,14 @@ void Client::Handle_OP_BookButton(const EQApplicationPacket* app) QueuePacket(&outapp); } -void Client::Handle_OP_Buff(const EQApplicationPacket *app) +void Client::Handle_OP_BuffDefinition(const EQApplicationPacket *app) { /* Note: if invisibility is on client, this will force it to drop. */ if (app->size != sizeof(SpellBuffPacket_Struct)) { - LogError("Size mismatch in OP_Buff. expected [{}] got [{}]", sizeof(SpellBuffPacket_Struct), app->size); + LogError("Size mismatch in OP_BuffDefinition. expected [{}] got [{}]", sizeof(SpellBuffPacket_Struct), app->size); DumpPacket(app); return; } diff --git a/zone/client_packet.h b/zone/client_packet.h index 0946f0438..36c3b77f0 100644 --- a/zone/client_packet.h +++ b/zone/client_packet.h @@ -72,7 +72,7 @@ void Handle_OP_BlockedBuffs(const EQApplicationPacket *app); void Handle_OP_BoardBoat(const EQApplicationPacket *app); void Handle_OP_BookButton(const EQApplicationPacket *app); - void Handle_OP_Buff(const EQApplicationPacket *app); + void Handle_OP_BuffDefinition(const EQApplicationPacket *app); void Handle_OP_BuffRemoveRequest(const EQApplicationPacket *app); void Handle_OP_Bug(const EQApplicationPacket *app); void Handle_OP_Camp(const EQApplicationPacket *app); diff --git a/zone/client_version.h b/zone/client_version.h index 595f9bad9..ef40ceec0 100644 --- a/zone/client_version.h +++ b/zone/client_version.h @@ -7,6 +7,7 @@ #include "common/emu_versions.h" #include "common/patches/client_version.h" +#include "common/patches/IBuff.h" #include "common/patches/IMessage.h" #include "zone/client.h" @@ -97,10 +98,88 @@ static auto QueueCloseClients( }; } +template +static void FastQueuePacket(Client* c, Fun fun, Obj* obj, Args&&... args) +{ + static_assert(std::is_member_function_pointer_v); + EQApplicationPacket* app = std::invoke(fun, obj, std::forward(args)...); + if (app != nullptr) { + c->FastQueuePacket(&app); // FastQueuePacket inherits the lifetime management of the packet, do not delete or it will be double free + } +} + +static auto QueueClientsByTarget(Mob* sender, bool iSendToSender, Mob* SkipThisMob, bool ackreq, bool HoTT, + uint32 ClientVersionBits, bool inspect_buffs, bool clear_target_window) +{ + return [=](Fun fun, + std::function component_getter, Args&&... args) { + static_assert(std::is_member_function_pointer_v, "Function is required to be a member function"); + std::unordered_map build_packets; + std::unordered_map client_list = entity_list.GetClientList(); + + for (auto [_, c] : client_list) { + if (c != SkipThisMob && (iSendToSender || c != sender)) { + Mob* Target = c->GetTarget(); + if (Target != nullptr) { + // if (Target == sender || (iSendToSender && c == sender) || (HoTT && Target->GetTarget() == sender)) { + // // the client has the sender targeted, so check if we send the packet + // EQApplicationPacket* app = std::invoke(fun, component_getter(c), std::forward(args)...); + // } + Mob* TargetsTarget = Target->GetTarget(); + bool Send = iSendToSender && c == sender; + if (c != sender) { + if (Target == sender) { + if (inspect_buffs) { // if inspect_buffs is true we're sending a mob's buffs to those with the LAA + Send = clear_target_window; + if (c->GetGM() || RuleB(Spells, AlwaysSendTargetsBuffs)) { + if (c->GetGM()) { + if (!c->EntityVariableExists(SEE_BUFFS_FLAG)) { + c->Message(Chat::White, + "Your GM flag allows you to always see your targets' buffs."); + c->SetEntityVariable(SEE_BUFFS_FLAG, "1"); + } + } + + Send = !clear_target_window; + } else if (c->IsRaidGrouped()) { + Raid* raid = c->GetRaid(); + if (raid) { + uint32 gid = raid->GetGroup(c); + if (gid < MAX_RAID_GROUPS && raid->GroupCount(gid) >= 3) { + if (raid->GetLeadershipAA(groupAAInspectBuffs, gid)) + Send = !clear_target_window; + } + } + } else { + Group* group = c->GetGroup(); + if (group && group->GroupCount() >= 3) { + if (group->GetLeadershipAA(groupAAInspectBuffs)) { + Send = !clear_target_window; + } + } + } + } else { + Send = true; + } + } else if (HoTT && TargetsTarget == sender) { + Send = true; + } + } + + if (Send && (c->ClientVersionBit() & ClientVersionBits)) { + EQApplicationPacket* app = std::invoke(fun, component_getter(c), std::forward(args)...); + } + } + } + } + }; +} + } // namespace ClientPatch // Helpers for the Message interface to send message packets namespace Message { + static std::function GetComponent = [](const Client* c) -> IMessage* { return GetMessageComponent(c->GetClientVersion()).get(); }; @@ -152,3 +231,22 @@ inline void InterruptSpellOther(Mob* sender, uint32_t message, uint32_t spawn_id } } // namespace Message + +// helper functions to handle sending buffs +namespace Buff { + +static std::function GetComponent = [](const Client* c) -> IBuff* { + return GetBuffComponent(c->GetClientVersion()).get(); +}; + +inline void SendLegacyBuffsPacket(Client* c, Mob* sender, int32 timer, bool for_target = true, bool clear_buffs = false) +{ + ClientPatch::FastQueuePacket(c, &IBuff::MakeLegacyBuffsPacket, GetComponent(c), sender, timer, for_target, clear_buffs); +} + +inline void SendLegacyBuffsPacketToClients(Client* c, bool for_target = true, bool clear_buffs = false) +{ + +} + +} // namespace Buff diff --git a/zone/common.h b/zone/common.h index 1ab8bf2d0..8bee866bf 100644 --- a/zone/common.h +++ b/zone/common.h @@ -223,9 +223,9 @@ namespace Journal { //this is our internal representation of the BUFF struct, can put whatever we want in it struct Buffs_Struct { - uint16 spellid; + int32 spellid; uint8 casterlevel; - uint16 casterid; // Maybe change this to a pointer sometime, but gotta make sure it's 0'd when it no longer points to anything + uint32 casterid; // Maybe change this to a pointer sometime, but gotta make sure it's 0'd when it no longer points to anything char caster_name[64]; int32 ticsremaining; uint32 counters; diff --git a/zone/lua_packet.cpp b/zone/lua_packet.cpp index 3f0fc93dd..7dbc4bd32 100644 --- a/zone/lua_packet.cpp +++ b/zone/lua_packet.cpp @@ -530,7 +530,8 @@ luabind::scope lua_register_packet_opcodes() { luabind::value("Camp", static_cast(OP_Camp)), luabind::value("YellForHelp", static_cast(OP_YellForHelp)), luabind::value("SafePoint", static_cast(OP_SafePoint)), - luabind::value("Buff", static_cast(OP_Buff)), + luabind::value("Buff", static_cast(OP_BuffDefinition)), + luabind::value("BuffDefinition", static_cast(OP_BuffDefinition)), luabind::value("ColoredText", static_cast(OP_ColoredText)), luabind::value("SpecialMesg", static_cast(OP_SpecialMesg)), luabind::value("Consent", static_cast(OP_Consent)), @@ -798,7 +799,8 @@ luabind::scope lua_register_packet_opcodes() { luabind::value("CancelTask", static_cast(OP_CancelTask)), luabind::value("TaskHistoryRequest", static_cast(OP_TaskHistoryRequest)), luabind::value("TaskHistoryReply", static_cast(OP_TaskHistoryReply)), - luabind::value("PetBuffWindow", static_cast(OP_PetBuffWindow)), + luabind::value("PetBuffWindow", static_cast(OP_RefreshPetBuffs)), + luabind::value("RefreshPetBuffs", static_cast(OP_RefreshPetBuffs)), luabind::value("RaidJoin", static_cast(OP_RaidJoin)), luabind::value("Translocate", static_cast(OP_Translocate)), luabind::value("Sacrifice", static_cast(OP_Sacrifice)), @@ -858,7 +860,8 @@ luabind::scope lua_register_packet_opcodes() { luabind::value("GroupRoles", static_cast(OP_GroupRoles)), luabind::value("SendFindableNPCs", static_cast(OP_SendFindableNPCs)), luabind::value("HideCorpse", static_cast(OP_HideCorpse)), - luabind::value("TargetBuffs", static_cast(OP_TargetBuffs)), + luabind::value("TargetBuffs", static_cast(OP_RefreshTargetBuffs)), + luabind::value("RefreshTargetBuffs", static_cast(OP_RefreshTargetBuffs)), luabind::value("TradeBusy", static_cast(OP_TradeBusy)), luabind::value("GuildUpdate", static_cast(OP_GuildUpdate)), luabind::value("CameraEffect", static_cast(OP_CameraEffect)), @@ -882,7 +885,8 @@ luabind::scope lua_register_packet_opcodes() { luabind::value("DzCompass", static_cast(OP_DzCompass)), luabind::value("DzChooseZone", static_cast(OP_DzChooseZone)), luabind::value("DzChooseZoneReply", static_cast(OP_DzChooseZoneReply)), - luabind::value("BuffCreate", static_cast(OP_BuffCreate)), + luabind::value("BuffCreate", static_cast(OP_RefreshBuffs)), + luabind::value("RefreshBuffs", static_cast(OP_RefreshBuffs)), luabind::value("GuildStatus", static_cast(OP_GuildStatus)), luabind::value("BuffRemoveRequest", static_cast(OP_BuffRemoveRequest)), luabind::value("CorpseDrag", static_cast(OP_CorpseDrag)), diff --git a/zone/spells.cpp b/zone/spells.cpp index 888b86406..80dfffb99 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -5834,7 +5834,7 @@ void Client::MakeBuffFadePacket(uint16 spell_id, int slot_id, bool send_message) { EQApplicationPacket* outapp = nullptr; - outapp = new EQApplicationPacket(OP_Buff, sizeof(SpellBuffPacket_Struct)); + outapp = new EQApplicationPacket(OP_BuffDefinition, sizeof(SpellBuffPacket_Struct)); SpellBuffPacket_Struct* sbf = (SpellBuffPacket_Struct*) outapp->pBuffer; sbf->entityid = GetID(); @@ -6530,7 +6530,7 @@ int Mob::GetCasterLevel(uint16 spell_id) { void Client::SendBuffDurationPacket(Buffs_Struct &buff, int slot) { EQApplicationPacket* outapp = nullptr; - outapp = new EQApplicationPacket(OP_Buff, sizeof(SpellBuffPacket_Struct)); + outapp = new EQApplicationPacket(OP_BuffDefinition, sizeof(SpellBuffPacket_Struct)); SpellBuffPacket_Struct* sbf = (SpellBuffPacket_Struct*) outapp->pBuffer; sbf->entityid = GetID(); @@ -6566,7 +6566,7 @@ void Client::SendBuffNumHitPacket(Buffs_Struct &buff, int slot) if (ClientVersion() < EQ::versions::ClientVersion::UF) return; EQApplicationPacket *outapp = nullptr; - outapp = new EQApplicationPacket(OP_BuffCreate, sizeof(BuffIcon_Struct) + sizeof(BuffIconEntry_Struct)); + outapp = new EQApplicationPacket(OP_RefreshBuffs, sizeof(BuffIcon_Struct) + sizeof(BuffIconEntry_Struct)); BuffIcon_Struct *bi = (BuffIcon_Struct *)outapp->pBuffer; bi->entity_id = GetID(); bi->count = 1; @@ -6591,7 +6591,7 @@ void Mob::SendPetBuffsToClient() int PetBuffCount = 0; - auto outapp = new EQApplicationPacket(OP_PetBuffWindow, sizeof(PetBuff_Struct)); + auto outapp = new EQApplicationPacket(OP_RefreshPetBuffs, sizeof(PetBuff_Struct)); PetBuff_Struct* pbs=(PetBuff_Struct*)outapp->pBuffer; memset(outapp->pBuffer,0,outapp->size); pbs->petid=GetID(); @@ -6651,10 +6651,10 @@ EQApplicationPacket *Mob::MakeBuffsPacket(bool for_target, bool clear_buffs) //Create it for a targeting window, else create it for a create buff packet. if(for_target) { - outapp = new EQApplicationPacket(OP_TargetBuffs, sizeof(BuffIcon_Struct) + sizeof(BuffIconEntry_Struct) * count); + outapp = new EQApplicationPacket(OP_RefreshTargetBuffs, sizeof(BuffIcon_Struct) + sizeof(BuffIconEntry_Struct) * count); } else { - outapp = new EQApplicationPacket(OP_BuffCreate, sizeof(BuffIcon_Struct) + sizeof(BuffIconEntry_Struct) * count); + outapp = new EQApplicationPacket(OP_RefreshBuffs, sizeof(BuffIcon_Struct) + sizeof(BuffIconEntry_Struct) * count); } BuffIcon_Struct *buff = (BuffIcon_Struct*)outapp->pBuffer; buff->entity_id = GetID();