mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[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:
@@ -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 ...
|
||||
|
||||
Reference in New Issue
Block a user