[Bug Fix] Aegolism Spell line stacking (#4399)

* fix stacking issues with Aegolism spell line

Issue: When casting buffing a player with aegolism spell line, who already has cleric AC, symbol and heroism spell, it would overwrite heorism buff and leave other two.

Aegolism spell line when applied when a client has Heroism spell line, AC spell line, and symbol spell line. Should overwrite the Heroism spell and fade the AC and Symbol buffs.

* Update spdat.cpp
This commit is contained in:
KayenEQ
2024-07-07 00:53:46 -04:00
committed by GitHub
parent 95cbadade5
commit d8ddd0aab9
3 changed files with 120 additions and 0 deletions
+12
View File
@@ -3743,6 +3743,18 @@ int Mob::AddBuff(Mob *caster, uint16 spell_id, int duration, int32 level_overrid
}
}
//remove associated buffs for certain live spell lines
if (IsAegolismSpell(spell_id)) {
int buff_count = GetMaxBuffSlots();
for (int slot = 0; slot < buff_count; slot++) {
if (IsValidSpell(buffs[slot].spellid)) {
if (AegolismStackingIsSymbolSpell(buffs[slot].spellid) || AegolismStackingIsArmorClassSpell(buffs[slot].spellid)) {
BuffFadeBySlot(slot);
}
}
}
}
buffs[emptyslot].spellid = spell_id;
buffs[emptyslot].casterlevel = caster_level;
if (caster && !caster->IsAura()) // maybe some other things we don't want to ...