From 1a5f48521d97e7fcfb1ba89fc7e3095e0abf5c72 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Thu, 25 Nov 2021 10:16:28 -0500 Subject: [PATCH] [Bug Fix] Bind Sight will now function properly (#1825) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * start * bind sight fixed * Update spdat.h * Update spells.cpp * Search or jump to… Pull requests Issues Marketplace Explore @KayenEQ EQEmu / Server Public 60 338 290 Code Issues 106 Pull requests 11 Actions Projects 1 Wiki Security Insights [Bug Fix] Bind Sight will now function properly #1825 Open KayenEQ wants to merge 4 commits into EQEmu:master from KayenEQ:bindsightfix2 Open [Bug Fix] Bind Sight will now function properly --- common/spdat.h | 2 +- zone/client_packet.cpp | 3 ++- zone/spells.cpp | 14 +++++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/common/spdat.h b/common/spdat.h index 372cd97db..e77dcf521 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -775,7 +775,7 @@ typedef enum { //#define SE_CorpseBomb 70 // not used #define SE_NecPet 71 // implemented //#define SE_PreserveCorpse 72 // not used -#define SE_BindSight 73 // implemented +#define SE_BindSight 73 // implemented, @Vision, see through the eyes of your target, click off buff to end effect, base: 1, limit: none, max: none #define SE_FeignDeath 74 // implemented #define SE_VoiceGraft 75 // implemented #define SE_Sentinel 76 // *not implemented?(just seems to send a message) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 555d90144..0975c1df3 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -3986,8 +3986,9 @@ void Client::Handle_OP_BuffRemoveRequest(const EQApplicationPacket *app) uint16 SpellID = m->GetSpellIDFromSlot(brrs->SlotID); - if (SpellID && IsBeneficialSpell(SpellID) && !spells[SpellID].no_remove) + if (SpellID && (IsBeneficialSpell(SpellID) || IsEffectInSpell(SpellID, SE_BindSight)) && !spells[SpellID].no_remove) { m->BuffFadeBySlot(brrs->SlotID, true); + } } void Client::Handle_OP_Bug(const EQApplicationPacket *app) diff --git a/zone/spells.cpp b/zone/spells.cpp index 7f0d49df1..863646492 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -1458,6 +1458,14 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo if(DeleteChargeFromSlot >= 0) CastToClient()->DeleteItemInInventory(DeleteChargeFromSlot, 1, true); + if (IsClient() && IsEffectInSpell(spell_id, SE_BindSight)) { + for (int i = 0; i < GetMaxTotalSlots(); i++) { + if (buffs[i].spellid == spell_id) { + CastToClient()->SendBuffNumHitPacket(buffs[i], i);//its hack, it works. + } + } + } + //Check if buffs has numhits, then resend packet so it displays the hit count. if (IsClient() && (spells[spell_id].buff_duration > 0 || spells[spell_id].short_buff_box)) { for (int i = 0; i < GetMaxTotalSlots(); i++) { @@ -3655,11 +3663,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, int reflect_effectivenes } // select target - if // Bind Sight line of spells - ( - spell_id == 500 || // bind sight - spell_id == 407 // cast sight - ) + if (IsEffectInSpell(spell_id, SE_BindSight)) { action->target = GetID(); }