Merge pull request #60 from Valorith/codex/fix-dispelmagic-suppressed-crash

Fix crash when dispelling suppressed buffs
This commit is contained in:
Vayle 2026-03-08 20:57:06 -04:00 committed by GitHub
commit 5edc3e54fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7537,7 +7537,12 @@ void Mob::DispelMagic(Mob* caster, uint16 spell_id, int effect_value, int chance
for (int slot = 0; slot < GetMaxTotalSlots(); ++slot) {
auto s = buffs[slot].spellid;
if (s == SPELL_UNKNOWN || spells[s].dispel_flag != 0 || IsDiscipline(s)) {
// Suppressed buffs always return when suppression ends; they cannot be dispelled.
if (s == SPELL_SUPPRESSED) {
continue;
}
if (!IsValidSpell(s) || spells[s].dispel_flag != 0 || IsDiscipline(s)) {
continue;
}