From 32e880f571f962a74589c6be2358fec8f31db0d8 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 20 Jun 2015 14:05:32 -0400 Subject: [PATCH 1/2] Identified the extra byte at the end of OP_TargetBuffs/OP_BuffCreate --- common/eq_packet_structs.h | 1 + common/patches/rof.cpp | 4 ++-- common/patches/rof2.cpp | 4 ++-- common/patches/uf.cpp | 2 +- zone/spells.cpp | 6 ++++++ 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index 8e9f97138..f9f75838f 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -4733,6 +4733,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 BuffIconEntry_Struct entries[0]; }; diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index f4f01e300..8080bfce1 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -417,7 +417,7 @@ namespace RoF outapp->WriteUInt32(0); // Duration outapp->WriteUInt32(0); // ? outapp->WriteUInt8(0); // Caster name - outapp->WriteUInt8(0); // Terminating byte + outapp->WriteUInt8(0); // Type } FINISH_ENCODE(); @@ -454,7 +454,7 @@ namespace RoF __packet->WriteUInt32(emu->entries[i].num_hits); // Unknown __packet->WriteString(""); } - __packet->WriteUInt8(!emu->all_buffs); // Unknown + __packet->WriteUInt8(emu->type); // Unknown FINISH_ENCODE(); } diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 096467edf..68ff8bf44 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -483,7 +483,7 @@ namespace RoF2 outapp->WriteUInt32(0); // Duration outapp->WriteUInt32(0); // ? outapp->WriteUInt8(0); // Caster name - outapp->WriteUInt8(0); // Terminating byte + outapp->WriteUInt8(0); // Type } FINISH_ENCODE(); @@ -525,7 +525,7 @@ namespace RoF2 __packet->WriteUInt32(emu->entries[i].num_hits); // Unknown __packet->WriteString(""); } - __packet->WriteUInt8(!emu->all_buffs); // Unknown + __packet->WriteUInt8(emu->type); // Unknown FINISH_ENCODE(); } diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index deedcec5f..d63a1bc04 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -387,7 +387,7 @@ namespace UF __packet->WriteUInt32(emu->entries[i].num_hits); __packet->WriteString(""); } - __packet->WriteUInt8(!emu->all_buffs); + __packet->WriteUInt8(emu->type); FINISH_ENCODE(); /* diff --git a/zone/spells.cpp b/zone/spells.cpp index 868180dff..faaace669 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -5396,6 +5396,12 @@ EQApplicationPacket *Mob::MakeBuffsPacket(bool for_target) buff->entity_id = GetID(); buff->count = count; buff->all_buffs = 1; + // 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 = IsClient() ? 5 : 7; + else + buff->type = 0; uint32 index = 0; for(unsigned int i = 0; i < buff_count; ++i) From c3a805923ca940faa713ab59b59d148edb595f63 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 25 Jun 2015 13:21:02 -0400 Subject: [PATCH 2/2] Up the bard level check to 255 again 1-254 actually has special bard logic and client expects it --- common/spdat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spdat.cpp b/common/spdat.cpp index 7dd21479c..bb6097566 100644 --- a/common/spdat.cpp +++ b/common/spdat.cpp @@ -447,7 +447,7 @@ bool IsTGBCompatibleSpell(uint16 spell_id) bool IsBardSong(uint16 spell_id) { - if (IsValidSpell(spell_id) && spells[spell_id].classes[BARD - 1] < 127 && !spells[spell_id].IsDisciplineBuff) + if (IsValidSpell(spell_id) && spells[spell_id].classes[BARD - 1] < 255 && !spells[spell_id].IsDisciplineBuff) return true; return false;