Fixed Savage Defense

Fixed Master Shapeshifter

Fixes issue #1299.

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-07-08 20:35:01 +02:00
parent 95ce454171
commit bf111e7d96
2 changed files with 14 additions and 7 deletions
+10 -3
View File
@@ -1795,10 +1795,17 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
RemainingDamage -= RemainingDamage * currentAbsorb / 100; RemainingDamage -= RemainingDamage * currentAbsorb / 100;
continue; continue;
} }
// Savage Defense (amount store original percent of attack power applied) // Savage Defense
if (spellProto->SpellIconID == 50) // only spell with this aura fit 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; continue;
} }
// Moonkin Form passive // Moonkin Form passive
@@ -2543,7 +2543,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
// Master Shapeshifter - Cat // Master Shapeshifter - Cat
if (AuraEffect const * aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0)) 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); target->CastCustomSpell(target, 48420, &bp, NULL, NULL, true);
} }
break; break;
@@ -2552,7 +2552,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
// Master Shapeshifter - Bear // Master Shapeshifter - Bear
if (AuraEffect const * aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0)) 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); target->CastCustomSpell(target, 48418, &bp, NULL, NULL, true);
} }
// Survival of the Fittest // Survival of the Fittest
@@ -2566,7 +2566,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
// Master Shapeshifter - Moonkin // Master Shapeshifter - Moonkin
if (AuraEffect const * aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0)) 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); target->CastCustomSpell(target, 48421, &bp, NULL, NULL, true);
} }
break; break;
@@ -2574,7 +2574,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
case FORM_TREE: case FORM_TREE:
if (AuraEffect const * aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0)) 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); target->CastCustomSpell(target, 48422, &bp, NULL, NULL, true);
} }
break; break;