aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp43
-rw-r--r--src/game/Unit.cpp4
-rw-r--r--src/game/Unit.h3
3 files changed, 45 insertions, 5 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 502c6a3a8e3..9263747ce7c 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -3274,8 +3274,9 @@ void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real, bool changeAmoun
if(m_target->getClass() == CLASS_DRUID)
{
- if(form == FORM_CAT && apply) // add dash if in cat-from
+ if(form == FORM_CAT && apply)
{
+ // add dash if in cat-from
Unit::AuraMap & auras = m_target->GetAuras();
for (Unit::AuraMap::iterator iter = auras.begin(); iter != auras.end();++iter)
{
@@ -3291,6 +3292,24 @@ 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)
{
@@ -4954,13 +4973,33 @@ void AuraEffect::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real,
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
}
-void AuraEffect::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool Real, bool /*changeAmount*/)
+void AuraEffect::HandleModSpellHealingPercentFromStat(bool apply, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId() != TYPEID_PLAYER)
return;
// 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*/)
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index d5c4f0db0e1..29b7b09a12b 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -13335,9 +13335,9 @@ AuraEffect* Unit::GetDummyAura( uint32 spell_id ) const
return NULL;
}
-AuraEffect* Unit::GetDummyAura(SpellFamilyNames name, uint32 iconId) const
+AuraEffect* Unit::GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId) const
{
- Unit::AuraEffectList const& mDummy = GetAurasByType(SPELL_AURA_DUMMY);
+ Unit::AuraEffectList const& mDummy = GetAurasByType(type);
for(Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
{
SpellEntry const * spell = (*itr)->GetSpellProto();
diff --git a/src/game/Unit.h b/src/game/Unit.h
index f9e076b6085..ceb6859386b 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -1579,7 +1579,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
bool HasAuraType(AuraType auraType) const;
bool HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const;
AuraEffect* GetDummyAura(uint32 spell_id) const;
- AuraEffect* GetDummyAura(SpellFamilyNames name, uint32 iconId) const;
+ inline AuraEffect* GetDummyAura(SpellFamilyNames name, uint32 iconId) const { return GetAuraEffect(SPELL_AURA_DUMMY, name, iconId);}
+ AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId) const;
uint32 GetDiseasesByCaster(uint64 casterGUID, bool remove = false);
uint32 GetDoTsByCaster(uint64 casterGUID) const;