diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index b9b63016e..1520731db 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -4428,10 +4428,31 @@ void Aura::HandlePeriodicEnergize(bool apply, bool Real) if (!Real) return; - if (apply) + // For prevent double apply bonuses + bool loading = (m_target->GetTypeId() == TYPEID_PLAYER && ((Player*)m_target)->GetSession()->PlayerLoading()); + + if (apply && !loading) { switch (GetId()) { + case 54833: // Glyph of Innervate (value%/2 of casters base mana) + { + Unit* caster = GetCaster(); + m_modifier.m_amount = int32(caster->GetCreateMana() * GetBasePoints() / (200 * m_maxduration / m_periodicTimer)); + break; + + } + case 29166: // Innervate (value% of casters base mana) + { + Unit* caster = GetCaster(); + + // Glyph of Innervate + if (caster && caster->HasAura(54832)) + caster->CastSpell(caster,54833,true,NULL,this); + + m_modifier.m_amount = int32(caster->GetCreateMana() * GetBasePoints() / (100 * m_maxduration / m_periodicTimer)); + break; + } case 48391: // Owlkin Frenzy 2% base mana m_modifier.m_amount = m_target->GetCreateMana() * 2 / 100; break; @@ -4461,8 +4482,6 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real) // For prevent double apply bonuses bool loading = (m_target->GetTypeId() == TYPEID_PLAYER && ((Player*)m_target)->GetSession()->PlayerLoading()); - Unit* caster = GetCaster(); - SpellEntry const*spell = GetSpellProto(); switch( spell->SpellFamilyName) { @@ -4482,6 +4501,8 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real) } case SPELLFAMILY_HUNTER: { + Unit* caster = GetCaster(); + // Explosive Shot if (apply && !loading && caster) m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 14 / 100); diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index a5d861c26..bdb1b663b 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1537,6 +1537,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons (spellId_2 == 33891 && spellId_1 == 34123)) return false; + // Innervate and Glyph of Innervate and some other spells + if (spellInfo_1->SpellIconID == 62 && spellInfo_2->SpellIconID == 62) + return false; + // Wrath of Elune and Nature's Grace if( spellInfo_1->Id == 16886 && spellInfo_2->Id == 46833 || spellInfo_2->Id == 16886 && spellInfo_1->Id == 46833 ) return false; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 898e3d597..28a3902eb 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8891" + #define REVISION_NR "8892" #endif // __REVISION_NR_H__