Update zone/spell_effects.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Vayle 2026-01-31 15:12:58 -05:00 committed by GitHub
parent 9eb982ef15
commit fa3bbec739
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4693,37 +4693,37 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses, bool suppress, uint32 su
if (!IsValidSpell(buffs[slot].spellid)) if (!IsValidSpell(buffs[slot].spellid))
return; return;
const auto& spell = spells[buffs[slot].spellid]; const auto& spell = spells[buffs[slot].spellid];
// Restore nimbus (visual aura) effect before processing individual spell effects, if (IsValidSpell(buffs[slot].spellid)) {
// mirroring Client::ReapplyBuff and bot buff restoration behavior. const auto &spell = spells[buffs[slot].spellid];
if (spell.nimbus_effect) { // Restore nimbus (visual aura) effect before processing individual spell effects,
SetNimbusEffect(spell.nimbus_effect); // mirroring Client::ReapplyBuff and bot buff restoration behavior.
} if (spell.nimbus_effect) {
for (int i = 0; i < EFFECT_COUNT; i++) { SetNimbusEffect(spell.nimbus_effect);
switch (spell.effect_id[i]) { }
case SpellEffect::Illusion: for (int i = 0; i < EFFECT_COUNT; i++) {
ApplySpellEffectIllusion(spell.id, entity_list.GetMobID(buffs[slot].casterid), slot, spell.base_value[i], spell.limit_value[i], spell.max_value[i]); switch (spell.effect_id[i]) {
break; case SpellEffect::Illusion:
case SpellEffect::Silence: ApplySpellEffectIllusion(spell.id, entity_list.GetMobID(buffs[slot].casterid), slot, spell.base_value[i], spell.limit_value[i], spell.max_value[i]);
Silence(true); break;
break; case SpellEffect::Silence:
case SpellEffect::Amnesia: Silence(true);
Amnesia(true); break;
break; case SpellEffect::Amnesia:
case SpellEffect::DivineAura: Amnesia(true);
invulnerable = true; break;
break; case SpellEffect::AddMeleeProc:
case SpellEffect::AddMeleeProc: case SpellEffect::WeaponProc:
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));
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;
break; case SpellEffect::DefensiveProc:
case SpellEffect::DefensiveProc: AddDefensiveProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::DEFENSIVE_PROC));
AddDefensiveProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::DEFENSIVE_PROC)); break;
break; case SpellEffect::RangedProc:
case SpellEffect::RangedProc: AddRangedProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::RANGED_PROC));
AddRangedProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::RANGED_PROC)); break;
break; default:
default: break;
break; }
} }
} }
} }