Update to SE_NegateAttack, 'max' value can now set upper limit of damage absorbed.

DOT ticks will no longer be absorbed.
This commit is contained in:
KayenEQ
2014-06-22 10:30:18 -04:00
parent a4769239fa
commit 8ad9ad578c
4 changed files with 14 additions and 4 deletions
+11 -3
View File
@@ -3176,7 +3176,11 @@ int32 Mob::ReduceDamage(int32 damage)
if(!TryFadeEffect(slot))
BuffFadeBySlot(slot , true);
}
return -6;
if (spellbonuses.NegateAttacks[2] && (damage > spellbonuses.NegateAttacks[2]))
damage -= spellbonuses.NegateAttacks[2];
else
return -6;
}
}
@@ -3272,7 +3276,7 @@ int32 Mob::AffectMagicalDamage(int32 damage, uint16 spell_id, const bool iBuffTi
int32 slot = -1;
// See if we block the spell outright first
if (spellbonuses.NegateAttacks[0]){
if (!iBuffTic && spellbonuses.NegateAttacks[0]){
slot = spellbonuses.NegateAttacks[1];
if(slot >= 0) {
if(--buffs[slot].numhits == 0) {
@@ -3280,7 +3284,11 @@ int32 Mob::AffectMagicalDamage(int32 damage, uint16 spell_id, const bool iBuffTi
if(!TryFadeEffect(slot))
BuffFadeBySlot(slot , true);
}
return 0;
if (spellbonuses.NegateAttacks[2] && (damage > spellbonuses.NegateAttacks[2]))
damage -= spellbonuses.NegateAttacks[2];
else
return 0;
}
}