From 57edda7535b6ce10783afe8ae84c6a3cc7ac3e06 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 31 Jan 2026 03:40:51 +0000 Subject: [PATCH 2/4] Add DivineAura effect restoration for non-client mobs Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com> --- zone/spell_effects.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 3ec303d3f..f202adb19 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -4704,6 +4704,9 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses, bool suppress, uint32 su case SpellEffect::Amnesia: Amnesia(true); break; + case SpellEffect::DivineAura: + invulnerable = true; + break; case SpellEffect::AddMeleeProc: case SpellEffect::WeaponProc: AddProcToWeapon(GetProcID(buffs[slot].spellid, i), false, 100 + spell.limit_value[i], buffs[slot].spellid, buffs[slot].casterlevel, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::MELEE_PROC)); From 7129acc3b01d613e69412c72d8f3b288fba1825e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 31 Jan 2026 04:23:15 +0000 Subject: [PATCH 3/4] Fix compilation error: change return false to return in void function Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com> --- zone/spell_effects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index f202adb19..c6b80b229 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -4691,7 +4691,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses, bool suppress, uint32 su } else { // Reapply visual/state effects for non-client mobs (pets, NPCs, bots) if (!IsValidSpell(buffs[slot].spellid)) - return false; + return; const auto& spell = spells[buffs[slot].spellid]; for (int i = 0; i < EFFECT_COUNT; i++) { switch (spell.effect_id[i]) { From fa3bbec7396fdd1554076a540e6cdc81948e6465 Mon Sep 17 00:00:00 2001 From: Vayle <76063792+Valorith@users.noreply.github.com> Date: Sat, 31 Jan 2026 15:12:58 -0500 Subject: [PATCH 4/4] Update zone/spell_effects.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- zone/spell_effects.cpp | 62 +++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 88208508e..eb88b10f1 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -4693,37 +4693,37 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses, bool suppress, uint32 su if (!IsValidSpell(buffs[slot].spellid)) return; 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. - if (spell.nimbus_effect) { - SetNimbusEffect(spell.nimbus_effect); - } - for (int i = 0; i < EFFECT_COUNT; i++) { - switch (spell.effect_id[i]) { - case SpellEffect::Illusion: - ApplySpellEffectIllusion(spell.id, entity_list.GetMobID(buffs[slot].casterid), slot, spell.base_value[i], spell.limit_value[i], spell.max_value[i]); - break; - case SpellEffect::Silence: - Silence(true); - break; - case SpellEffect::Amnesia: - Amnesia(true); - break; - case SpellEffect::DivineAura: - invulnerable = true; - break; - case SpellEffect::AddMeleeProc: - case SpellEffect::WeaponProc: - AddProcToWeapon(GetProcID(buffs[slot].spellid, i), false, 100 + spell.limit_value[i], buffs[slot].spellid, buffs[slot].casterlevel, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::MELEE_PROC)); - break; - case SpellEffect::DefensiveProc: - AddDefensiveProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::DEFENSIVE_PROC)); - break; - 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; - default: - break; + if (IsValidSpell(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. + if (spell.nimbus_effect) { + SetNimbusEffect(spell.nimbus_effect); + } + for (int i = 0; i < EFFECT_COUNT; i++) { + switch (spell.effect_id[i]) { + case SpellEffect::Illusion: + ApplySpellEffectIllusion(spell.id, entity_list.GetMobID(buffs[slot].casterid), slot, spell.base_value[i], spell.limit_value[i], spell.max_value[i]); + break; + case SpellEffect::Silence: + Silence(true); + break; + case SpellEffect::Amnesia: + Amnesia(true); + break; + case SpellEffect::AddMeleeProc: + case SpellEffect::WeaponProc: + AddProcToWeapon(GetProcID(buffs[slot].spellid, i), false, 100 + spell.limit_value[i], buffs[slot].spellid, buffs[slot].casterlevel, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::MELEE_PROC)); + break; + case SpellEffect::DefensiveProc: + AddDefensiveProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::DEFENSIVE_PROC)); + break; + 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; + default: + break; + } } } }