aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp13
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp8
2 files changed, 14 insertions, 7 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index a9e8cd0ee7f..d990ae397af 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -1795,10 +1795,17 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
RemainingDamage -= RemainingDamage * currentAbsorb / 100;
continue;
}
- // Savage Defense (amount store original percent of attack power applied)
- if (spellProto->SpellIconID == 50) // only spell with this aura fit
+ // Savage Defense
+ if (spellProto->SpellIconID == 146)
{
- RemainingDamage -= int32(currentAbsorb * pVictim->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
+ if (RemainingDamage < currentAbsorb)
+ currentAbsorb = RemainingDamage;
+
+ // don't use up the aura if we don't absorb anything
+ if (currentAbsorb > 0)
+ (*i)->GetBase()->DropCharge();
+
+ RemainingDamage -= currentAbsorb;
continue;
}
// Moonkin Form passive
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index fcc9558773c..8be639241d7 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -2543,7 +2543,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
// Master Shapeshifter - Cat
if (AuraEffect const * aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0))
{
- int32 bp = aurEff->GetAmount();
+ int32 bp = aurEff->GetAmount()+1;
target->CastCustomSpell(target, 48420, &bp, NULL, NULL, true);
}
break;
@@ -2552,7 +2552,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
// Master Shapeshifter - Bear
if (AuraEffect const * aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0))
{
- int32 bp = aurEff->GetAmount();
+ int32 bp = aurEff->GetAmount()+1;
target->CastCustomSpell(target, 48418, &bp, NULL, NULL, true);
}
// Survival of the Fittest
@@ -2566,7 +2566,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
// Master Shapeshifter - Moonkin
if (AuraEffect const * aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0))
{
- int32 bp = aurEff->GetAmount();
+ int32 bp = aurEff->GetAmount()+1;
target->CastCustomSpell(target, 48421, &bp, NULL, NULL, true);
}
break;
@@ -2574,7 +2574,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
case FORM_TREE:
if (AuraEffect const * aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0))
{
- int32 bp = aurEff->GetAmount();
+ int32 bp = aurEff->GetAmount()+1;
target->CastCustomSpell(target, 48422, &bp, NULL, NULL, true);
}
break;