diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 712f976fb..823c0b41c 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -4305,6 +4305,20 @@ SpellCastResult Spell::CheckCast(bool strict) { switch(m_spellInfo->EffectApplyAuraName[i]) { + case SPELL_AURA_DUMMY: + { + //custom check + switch(m_spellInfo->Id) + { + case 61336: + if(m_caster->GetTypeId()!=TYPEID_PLAYER || !((Player*)m_caster)->IsInFeralForm()) + return SPELL_FAILED_ONLY_SHAPESHIFT; + break; + default: + break; + } + break; + } case SPELL_AURA_MOD_POSSESS: case SPELL_AURA_MOD_CHARM: { diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 1c57cae2d..e27374f83 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -2259,6 +2259,45 @@ void Aura::HandleAuraDummy(bool apply, bool Real) } case SPELLFAMILY_DRUID: { + switch(GetId()) + { + case 34246: // Idol of the Emerald Queen + { + if (m_target->GetTypeId() != TYPEID_PLAYER) + return; + + if(apply) + { + SpellModifier *mod = new SpellModifier; + mod->op = SPELLMOD_DOT; + mod->value = m_modifier.m_amount/7; + mod->type = SPELLMOD_FLAT; + mod->spellId = GetId(); + mod->mask = 0x001000000000LL; + mod->mask2= 0LL; + + m_spellmod = mod; + } + + ((Player*)m_target)->AddSpellMod(m_spellmod, apply); + return; + } + case 61336: // Survival Instincts + { + if(apply) + { + if (!m_target->IsInFeralForm()) + return; + + int32 bp0 = int32(m_target->GetMaxHealth() * m_modifier.m_amount / 100); + m_target->CastCustomSpell(m_target, 50322, &bp0, NULL, NULL, true); + } + else + m_target-> RemoveAurasDueToSpell(50322); + return; + } + } + // Lifebloom if ( GetSpellProto()->SpellFamilyFlags & 0x1000000000LL ) { @@ -2298,25 +2337,6 @@ void Aura::HandleAuraDummy(bool apply, bool Real) ((Player*)m_target)->UpdateAttackPowerAndDamage(); return; } - // Idol of the Emerald Queen - if ( GetId() == 34246 && m_target->GetTypeId()==TYPEID_PLAYER ) - { - if(apply) - { - SpellModifier *mod = new SpellModifier; - mod->op = SPELLMOD_DOT; - mod->value = m_modifier.m_amount/7; - mod->type = SPELLMOD_FLAT; - mod->spellId = GetId(); - mod->mask = 0x001000000000LL; - mod->mask2= 0LL; - - m_spellmod = mod; - } - - ((Player*)m_target)->AddSpellMod(m_spellmod, apply); - return; - } break; } case SPELLFAMILY_HUNTER: @@ -4691,6 +4711,7 @@ void Aura::HandleAuraModIncreaseHealth(bool apply, bool Real) case 28726: // Nightmare Seed ( Nightmare Seed ) case 34511: // Valor (Bulwark of Kings, Bulwark of the Ancient Kings) case 44055: // Tremendous Fortitude (Battlemaster's Alacrity) + case 50322: // Survival Instincts { if(Real) { diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 1cf471095..c64df4849 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1336,6 +1336,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons // Cat Energy (Feral T4 (2)) and Omen of Clarity if( spellInfo_1->Id == 16864 && spellInfo_2->Id == 37311 || spellInfo_2->Id == 16864 && spellInfo_1->Id == 37311 ) return false; + + // Survival Instincts and Survival Instincts + if( spellInfo_1->Id == 61336 && spellInfo_2->Id == 50322 || spellInfo_2->Id == 61336 && spellInfo_1->Id == 50322 ) + return false; } // Leader of the Pack and Scroll of Stamina (multi-family check) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 1280fd31e..87da620f6 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 "7475" + #define REVISION_NR "7476" #endif // __REVISION_NR_H__