From 185f2a4db36956f1250bfed0752e5a4fad9ccd7f Mon Sep 17 00:00:00 2001 From: Vayle <76063792+Valorith@users.noreply.github.com> Date: Sat, 31 Jan 2026 19:08:58 -0500 Subject: [PATCH 1/3] Fix: restrict spell suppression restoration to client-owned pets; preserve cleanup via guarded restoration; restore levitate visuals for pets - Limit restoration code path to IsPet() && GetOwner()->IsClient()\n- Guard restoration logic instead of early-return to keep cleanup paths\n- Restore nimbus, illusion, procs, and levitate FlyMode appropriately\n- Resolve conflicts with master in zone/spell_effects.cpp for PR #45 Co-Authored-By: Warp --- zone/spell_effects.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 0c355e4dc..f12ecdfef 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -4695,14 +4695,11 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses, bool suppress, uint32 su client->ReapplyBuff(slot, true); } else if (IsPet() && GetOwner() && GetOwner()->IsClient()) { // Reapply visual/state effects for client pets only - // All other non-client mobs (NPCs, bots, mercs) use normal dispel mechanic - if (!IsValidSpell(buffs[slot].spellid)) - return; - const auto& spell = spells[buffs[slot].spellid]; + // Other non-client mobs (NPCs, bots, mercs) use the normal dispel mechanic if (IsValidSpell(buffs[slot].spellid)) { - const auto &spell = spells[buffs[slot].spellid]; + const auto& spell = spells[buffs[slot].spellid]; // Restore nimbus (visual aura) effect before processing individual spell effects, - // mirroring Client::ReapplyBuff and bot buff restoration behavior. + // mirroring Client::ReapplyBuff behavior for client-owned pets. if (spell.nimbus_effect) { SetNimbusEffect(spell.nimbus_effect); } @@ -4727,8 +4724,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses, bool suppress, uint32 su case SpellEffect::RangedProc: AddRangedProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::RANGED_PROC)); break; - case SpellEffect::Levitate: - { + case SpellEffect::Levitate: { // Restore levitate visual effects after suppression expires if (!zone->CanLevitate()) { SendAppearancePacket(AppearanceType::FlyMode, 0); From 3716355750195783be944793070d6fe1635acd7b Mon Sep 17 00:00:00 2001 From: Vayle <76063792+Valorith@users.noreply.github.com> Date: Sat, 31 Jan 2026 19:11:50 -0500 Subject: [PATCH 2/3] Update zone/spell_effects.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- zone/spell_effects.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index f12ecdfef..ecd89388b 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -4700,8 +4700,8 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses, bool suppress, uint32 su const auto& spell = spells[buffs[slot].spellid]; // Restore nimbus (visual aura) effect before processing individual spell effects, // mirroring Client::ReapplyBuff behavior for client-owned pets. - if (spell.nimbus_effect) { - SetNimbusEffect(spell.nimbus_effect); + if (spell.nimbus_effect > 0) { + SetNimbusEffect(static_cast(spell.nimbus_effect)); } for (int i = 0; i < EFFECT_COUNT; i++) { switch (spell.effect_id[i]) { From 2b88b51674d8bb51250ea18b4ad5e8ec69f1ebc3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Feb 2026 00:13:21 +0000 Subject: [PATCH 3/3] Fix: Move brace to next line for case statement consistency Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com> --- zone/spell_effects.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index ecd89388b..f53751431 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -4724,7 +4724,8 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses, bool suppress, uint32 su case SpellEffect::RangedProc: AddRangedProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::RANGED_PROC)); break; - case SpellEffect::Levitate: { + case SpellEffect::Levitate: + { // Restore levitate visual effects after suppression expires if (!zone->CanLevitate()) { SendAppearancePacket(AppearanceType::FlyMode, 0);