diff options
author | Sovak <Sovak007@gmail.com> | 2012-09-15 20:35:30 +0200 |
---|---|---|
committer | Sovak <Sovak007@gmail.com> | 2012-09-15 20:35:30 +0200 |
commit | 6c7961ad9caaf583dbf4f09aaac1c1969a2c705a (patch) | |
tree | 4da4de0a64d378c207c5293ce2518ec2502d4400 /src | |
parent | 0c02c574dc7b38cbf3728d558e6bd1fb1472c8cc (diff) |
Core/Auras: Fix some spells with effect SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE
Thanks to SkyFire
Signed-off-by: Sovak <Sovak007@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index cf58a51dad8..6004e6d36d1 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -718,6 +718,37 @@ int32 AuraEffect::CalculateAmount(Unit* caster) if (MountCapabilityEntry const* mountCapability = GetBase()->GetUnitOwner()->GetMountCapability(uint32(GetMiscValueB()))) amount = mountCapability->Id; break; + case SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE: + { + if (caster) + { + // if Level <= 70 resist = player level + int32 resist = caster->getLevel(); + + if (resist > 70 && resist < 81) + resist += (resist - 70) * 5; + else if (resist > 80) + resist += ((resist-70) * 5 + (resist - 80) * 7); + + switch (GetId()) + { + case 20043: // Aspect of the Wild + case 8185: // Elemental Resistance + case 19891: // Resistance Aura + case 79106: // Shadow Protection + case 79107: // Shadow Protection + amount = resist; + break; + case 79060: // Mark of the Wild + case 79061: // Mark of the Wild + case 79062: // Blessing of Kings + case 79063: // Blessing of Kings + case 90363: // Embrace of the Shale Spider + amount = resist / 2; + break; + } + break; + } default: break; } |