aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQAston <none@none>2009-06-26 19:17:57 +0200
committerQAston <none@none>2009-06-26 19:17:57 +0200
commit09717d7d810da7b56fa673fd3965d955b947a63b (patch)
treec7a3d66c9659b781febf86b6e8e1fedcfc647626
parent63a936b0b77baea933f2ab9116ef93487e13d701 (diff)
*Fix Survival of the Fittest.
--HG-- branch : trunk
-rw-r--r--src/game/SpellAuras.cpp65
1 files changed, 27 insertions, 38 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index ac23d3dc9e7..6d789765882 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1510,6 +1510,33 @@ void AuraEffect::HandleShapeshiftBoosts(bool apply)
}
}
}
+ if (GetMiscValue() == FORM_CAT)
+ {
+ // Nurturing Instinct
+ if (AuraEffect const * aurEff = m_target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254))
+ {
+ uint32 spellId = 0;
+ switch (aurEff->GetId())
+ {
+ case 33872:
+ spellId = 47179;
+ break;
+ case 33873:
+ spellId = 47180;
+ break;
+ }
+ m_target->CastSpell(m_target, spellId, true, NULL, this);
+ }
+ }
+ // Survival of the Fittest
+ else if (GetMiscValue() == FORM_BEAR || GetMiscValue() == FORM_DIREBEAR)
+ {
+ if (AuraEffect const * aurEff = m_target->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE,SPELLFAMILY_DRUID, 961))
+ {
+ int32 bp = m_target->CalculateSpellDamage(aurEff->GetSpellProto(),2,aurEff->GetSpellProto()->EffectBasePoints[2],m_target);
+ m_target->CastCustomSpell(m_target, 62069,&bp, NULL, NULL, true, 0, this);
+ }
+ }
}
}
else
@@ -3292,24 +3319,6 @@ void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real, bool changeAmoun
if(AuraEffect * aurEff =m_target->GetAura(SPELL_AURA_MOD_INCREASE_SPEED, SPELLFAMILY_DRUID, 0, 0, 0x8))
m_target->HandleAuraEffect(aurEff, false);
}
- // Nurturing Instinct
- if (AuraEffect const * aurEff = m_target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254))
- {
- uint32 spellId = 0;
- switch (aurEff->GetId())
- {
- case 33872:
- spellId = 47179;
- break;
- case 33873:
- spellId = 47180;
- break;
- }
- if(form == FORM_CAT && apply)
- m_target->CastSpell(m_target, spellId, true, NULL, this);
- else
- m_target->RemoveAurasDueToSpell(spellId, m_target->GetGUID());
- }
}
if (m_target->GetTypeId()==TYPEID_PLAYER)
{
@@ -4980,26 +4989,6 @@ void AuraEffect::HandleModSpellHealingPercentFromStat(bool apply, bool Real, boo
// Recalculate bonus
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
-
- if (Real && apply)
- {
- // Nurturing Instinct
- if (m_target->m_form == FORM_CAT)
- {
- uint32 spellId = 0;
- switch (GetId())
- {
- case 33872:
- spellId = 47179;
- break;
- case 33873:
- spellId = 47180;
- break;
- }
- if (spellId)
- m_target->CastSpell(m_target, spellId, true, NULL, this);
- }
- }
}
void AuraEffect::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool Real, bool /*changeAmount*/)