Core/Spells: Allow skipping automatic removal of auras from spell_area when condition is no longer met (mostly used for cosmetic cutscenes after quest completion)

This commit is contained in:
hondacrx
2018-01-28 19:37:36 -05:00
parent 95e76df6ff
commit 84fdaef291
6 changed files with 151 additions and 77 deletions
+2 -2
View File
@@ -1802,9 +1802,9 @@ namespace Game.Entities
{
foreach (var spell in saBounds)
{
if (!spell.IsFitToRequirements(this, zone, area))
if (spell.flags.HasAnyFlag(SpellAreaFlag.AutoRemove) && !spell.IsFitToRequirements(this, zone, area))
RemoveAurasDueToSpell(spell.spellId);
else if (spell.autocast)
else if (spell.flags.HasAnyFlag(SpellAreaFlag.AutoCast))
if (!HasAura(spell.spellId))
CastSpell(this, spell.spellId, true);
}