mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Spells] Support for SPA 161 and 450 to give percent spell or dot mitigation from Items or AA's. (#1793)
* spell dot shield item AA support * Update spdat.h * Update attack.cpp
This commit is contained in:
+5
-3
@@ -3298,7 +3298,8 @@ int32 Mob::AffectMagicalDamage(int32 damage, uint16 spell_id, const bool iBuffTi
|
||||
|
||||
// If this is a DoT, use DoT Shielding...
|
||||
if (iBuffTic) {
|
||||
damage -= (damage * itembonuses.DoTShielding / 100);
|
||||
int total_dotshielding = itembonuses.DoTShielding + itembonuses.MitigateDotRune[SBIndex::MITIGATION_RUNE_PERCENT] + aabonuses.MitigateDotRune[SBIndex::MITIGATION_RUNE_PERCENT];
|
||||
damage -= (damage * total_dotshielding / 100);
|
||||
|
||||
if (spellbonuses.MitigateDotRune[SBIndex::MITIGATION_RUNE_PERCENT]) {
|
||||
slot = spellbonuses.MitigateDotRune[SBIndex::MITIGATION_RUNE_BUFFSLOT];
|
||||
@@ -3330,8 +3331,9 @@ int32 Mob::AffectMagicalDamage(int32 damage, uint16 spell_id, const bool iBuffTi
|
||||
else
|
||||
{
|
||||
// Reduce damage by the Spell Shielding first so that the runes don't take the raw damage.
|
||||
damage -= (damage * itembonuses.SpellShield / 100);
|
||||
|
||||
int total_spellshielding = itembonuses.SpellShield + itembonuses.MitigateSpellRune[SBIndex::MITIGATION_RUNE_PERCENT] + aabonuses.MitigateSpellRune[SBIndex::MITIGATION_RUNE_PERCENT];
|
||||
damage -= (damage * total_spellshielding / 100);
|
||||
|
||||
//Only mitigate if damage is above the minimium specified.
|
||||
if (spellbonuses.SpellThresholdGuard[SBIndex::THRESHOLDGUARD_MITIGATION_PERCENT]) {
|
||||
slot = spellbonuses.SpellThresholdGuard[SBIndex::THRESHOLDGUARD_BUFFSLOT];
|
||||
|
||||
Reference in New Issue
Block a user