Merge pull request #35 from Valorith/fix/buff-suppression-dobufftick

Fix: Skip DoBuffTic() for SPELL_SUPPRESSED slots (prevents OOB access)
This commit is contained in:
Vayle 2026-01-30 22:43:09 -05:00 committed by GitHub
commit e412a9bb99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3812,7 +3812,9 @@ void Mob::BuffProcess()
{ {
if (IsValidOrSuppressedSpell(buffs[buffs_i].spellid)) if (IsValidOrSuppressedSpell(buffs[buffs_i].spellid))
{ {
if (buffs[buffs_i].spellid != SPELL_SUPPRESSED) {
DoBuffTic(buffs[buffs_i], buffs_i, entity_list.GetMob(buffs[buffs_i].casterid)); DoBuffTic(buffs[buffs_i], buffs_i, entity_list.GetMob(buffs[buffs_i].casterid));
}
// If the Mob died during DoBuffTic, then the buff we are currently processing will have been removed // If the Mob died during DoBuffTic, then the buff we are currently processing will have been removed
if(!IsValidOrSuppressedSpell(buffs[buffs_i].spellid)) { if(!IsValidOrSuppressedSpell(buffs[buffs_i].spellid)) {
continue; continue;