diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index a542e32f3..7c9771a6a 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -1814,7 +1814,7 @@ namespace Framework.Constants DelayCombatTimerDuringCast = 0x80000, // Delay Combat Timer During Cast AuraIconOnlyForCasterLimit10 = 0x100000, // Aura Icon Only For Caster (Limit 10) (Client Only) ShowMechanicAsCombatText = 0x200000, // Show Mechanic As Combat Text (Client Only) - AbsorbCannotBeIgnore = 0x400000, /*Nyi*/ // Absorb Cannot Be Ignore + AbsorbCannotBeIgnore = 0x400000, // Absorb Cannot Be Ignore TapsImmediately = 0x800000, /*Nyi*/ // Taps Immediately CanTargetUntargetable = 0x1000000, // Can Target Untargetable DoesntResetSwingTimerIfInstant = 0x2000000, // Doesn'T Reset Swing Timer If Instant diff --git a/Source/Game/Entities/Unit/Unit.cs b/Source/Game/Entities/Unit/Unit.cs index fa7a4617f..663a60120 100644 --- a/Source/Game/Entities/Unit/Unit.cs +++ b/Source/Game/Entities/Unit/Unit.cs @@ -2600,6 +2600,7 @@ namespace Game.Entities if (currentAbsorb < 0) currentAbsorb = 0; + uint tempAbsorb = (uint)currentAbsorb; // This aura type is used both by Spirit of Redemption (death not really prevented, must grant all credit immediately) and Cheat Death (death prevented) @@ -3364,7 +3365,6 @@ namespace Game.Entities spell.CallScriptOnResistAbsorbCalculateHandlers(damageInfo, ref resistedDamage, ref absorbIgnoringDamage); damageInfo.ResistDamage(resistedDamage); - damageInfo.ModifyDamage(-absorbIgnoringDamage); // We're going to call functions which can modify content of the list during iteration over it's elements // Let's copy the list so we can prevent iterator invalidation @@ -3391,6 +3391,9 @@ namespace Game.Entities if (currentAbsorb < 0) currentAbsorb = 0; + if (!absorbAurEff.GetSpellInfo().HasAttribute(SpellAttr6.AbsorbCannotBeIgnore)) + damageInfo.ModifyDamage(-absorbIgnoringDamage); + uint tempAbsorb = (uint)currentAbsorb; bool defaultPrevented = false; @@ -3400,7 +3403,6 @@ namespace Game.Entities if (!defaultPrevented) { - // absorb must be smaller than the damage itself currentAbsorb = MathFunctions.RoundToInterval(ref currentAbsorb, 0, damageInfo.GetDamage()); @@ -3420,6 +3422,9 @@ namespace Game.Entities } } + if (!absorbAurEff.GetSpellInfo().HasAttribute(SpellAttr6.AbsorbCannotBeIgnore)) + damageInfo.ModifyDamage(absorbIgnoringDamage); + if (currentAbsorb != 0) { SpellAbsorbLog absorbLog = new(); @@ -3456,6 +3461,9 @@ namespace Game.Entities if (currentAbsorb < 0) currentAbsorb = 0; + if (!absorbAurEff.GetSpellInfo().HasAttribute(SpellAttr6.AbsorbCannotBeIgnore)) + damageInfo.ModifyDamage(-absorbIgnoringDamage); + uint tempAbsorb = (uint)currentAbsorb; bool defaultPrevented = false; @@ -3494,6 +3502,9 @@ namespace Game.Entities } } + if (!absorbAurEff.GetSpellInfo().HasAttribute(SpellAttr6.AbsorbCannotBeIgnore)) + damageInfo.ModifyDamage(absorbIgnoringDamage); + if (currentAbsorb != 0) { SpellAbsorbLog absorbLog = new(); @@ -3509,8 +3520,6 @@ namespace Game.Entities } } - damageInfo.ModifyDamage(absorbIgnoringDamage); - // split damage auras - only when not damaging self if (damageInfo.GetVictim() != damageInfo.GetAttacker()) {