Core/Spells: implement DoT clipping

* Core/Spells: Implementation of DoT clipping.
* Core/Utilities: Backport "EnumFlags v3.0" from master.
* Core/Spells: Switch AURA_REMOVE_MODE to a flag set.
This commit is contained in:
Warpten authored and GitHub committed 2020-06-04 18:16:03 +02:00
1 parent 6498452dd1
commit 0af44ccc01
72 files changed
+597 -499

No files matched your search

+4 -5
View File
@@ -787,8 +787,7 @@ class spell_mage_living_bomb : public AuraScript
void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode();
if (removeMode != AURA_REMOVE_BY_ENEMY_SPELL && removeMode != AURA_REMOVE_BY_EXPIRE)
if (!GetTargetApplication()->GetRemoveMode().HasFlag(AuraRemoveFlags::Expired))
return;
if (Unit* caster = GetCaster())
@@ -821,7 +820,7 @@ class spell_mage_ice_barrier : public SpellScriptLoader
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL)
if (!GetTargetApplication()->GetRemoveMode().HasFlag(AuraRemoveFlags::ByEnemySpell))
return;
if (GetTarget()->HasAura(SPELL_MAGE_SHATTERED_BARRIER_R1))
@@ -984,7 +983,7 @@ class spell_mage_mana_shield : public SpellScriptLoader
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (GetTarget()->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_GENERIC, ICON_MAGE_INCANTER_S_ABSORPTION, EFFECT_0))
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_ENEMY_SPELL)
if (GetTargetApplication()->GetRemoveMode().HasFlag(AuraRemoveFlags::ByEnemySpell))
GetTarget()->CastSpell(GetTarget(), SPELL_MAGE_INCANTERS_ABSORBTION_KNOCKBACK, true);
}
@@ -1380,7 +1379,7 @@ class spell_mage_ring_of_frost_freeze : public SpellScriptLoader
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
if (!GetTargetApplication()->GetRemoveMode().HasFlag(AuraRemoveFlags::Expired))
if (GetCaster())
GetCaster()->CastSpell(GetTarget(), SPELL_MAGE_RING_OF_FROST_DUMMY, true);
}