[11013] Implemented spell 34026 and bonus to it from talent 35029 and ranks

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
pasdVn 2011-01-15 12:55:20 +03:00 committed by VladimirMangos
parent 1e8ca772b3
commit f9a6513d38
4 changed files with 102 additions and 47 deletions

View file

@ -5246,6 +5246,10 @@ SpellCastResult Spell::CheckCast(bool strict)
//custom check
switch(m_spellInfo->Id)
{
case 34026: // Kill Command
if (!m_caster->GetPet())
return SPELL_FAILED_NO_PET;
break;
case 61336: // Survival Instincts
if (m_caster->GetTypeId() != TYPEID_PLAYER || !((Player*)m_caster)->IsInFeralForm())
return SPELL_FAILED_ONLY_SHAPESHIFT;

View file

@ -2117,14 +2117,12 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
}
case SPELLFAMILY_HUNTER:
{
/* disabled until full implementation
switch(GetId())
{
case 34026: // Kill Command
target->CastSpell(target, 34027, true, NULL, this);
return;
}
*/
break;
}
case SPELLFAMILY_SHAMAN:
@ -8042,11 +8040,12 @@ m_permanent(false), m_isRemovedOnShapeLost(true), m_deleted(false), m_in_use(0)
break;
// some auras applied with max stack
case 24575: // Brittle Armor
case 24662: // Restless Strength
case 24659: // Unstable Power
case 24662: // Restless Strength
case 26464: // Mercurial Shield
case 34027: // Kill Command
case 55166: // Tidal Force
case 58914: // Kill Command (pet part)
case 71564: // Deadly Precision
m_stackAmount = m_spellProto->StackAmount;
break;
@ -8526,6 +8525,14 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
return;
break;
}
case 58914: // Kill Command, pet aura
{
// need remove here becase dummy aura hamdler apply/unapply at stack changes
if (!apply)
if(Unit* caster = GetCaster())
caster->RemoveAurasDueToSpell(34027);
return;
}
case 71905: // Soul Fragment
{
if (!apply)
@ -8794,16 +8801,57 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
break;
case SPELLFAMILY_HUNTER:
{
// The Beast Within and Bestial Wrath - immunity
if (GetId() == 19574 || GetId() == 34471)
switch (GetId())
{
case 19574: // Bestial Wrath - immunity
case 34471: // The Beast Within - immunity
{
spellId1 = 24395;
spellId2 = 24396;
spellId3 = 24397;
spellId4 = 26592;
break;
}
case 34027: // Kill Command, owner aura (spellmods)
{
if (apply)
{
if (m_target->HasAura(35029)) // Focused Fire, rank 1
spellId1 = 60110; // Kill Command, Focused Fire rank 1 bonus
else if (m_target->HasAura(35030)) // Focused Fire, rank 2
spellId1 = 60113; // Kill Command, Focused Fire rank 2 bonus
else
return;
}
else
{
spellId1 = 34026; // Kill Command, owner casting aura
spellId2 = 60110; // Kill Command, Focused Fire rank 1 bonus
spellId3 = 60113; // Kill Command, Focused Fire rank 2 bonus
if (Unit* pet = m_target->GetPet())
pet->RemoveAurasDueToSpell(58914); // Kill Command, pet aura
}
break;
}
case 35029: // Focused Fire, rank 1
{
if (apply && !m_target->HasAura(34027)) // Kill Command, owner casting aura
return;
spellId1 = 60110; // Kill Command, Focused Fire rank 1 bonus
break;
}
case 35030: // Focused Fire, rank 2
{
if (apply && !m_target->HasAura(34027)) // Kill Command, owner casting aura
return;
spellId1 = 60113; // Kill Command, Focused Fire rank 2 bonus
break;
}
default:
// Freezing Trap Effect
else if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000008))
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000008))
{
if(!apply)
{
@ -8833,6 +8881,8 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
return;
break;
}
break;
}
case SPELLFAMILY_PALADIN:
{
if (m_spellProto->Id == 31884) // Avenging Wrath

View file

@ -947,6 +947,17 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
owner->CastSpell(owner,58227,true,castItem,triggeredByAura);
return SPELL_AURA_PROC_OK;
}
// Kill Command, pet aura
case 58914:
{
// also decrease owner buff stack
if (Unit* owner = GetOwner())
owner->RemoveAuraHolderFromStack(34027);
// Remove only single aura from stack
if (triggeredByAura->GetStackAmount() > 1 && !triggeredByAura->GetHolder()->ModStackAmount(-1))
return SPELL_AURA_PROC_CANT_TRIGGER;
}
// Glyph of Life Tap
case 63320:
triggered_spell_id = 63321;
@ -3774,16 +3785,6 @@ SpellAuraProcResult Unit::HandleAddPctModifierAuraProc(Unit* /*pVictim*/, uint32
switch(spellInfo->SpellFamilyName)
{
case SPELLFAMILY_GENERIC:
{
if (spellInfo->Id == 34027) // Kill Command
{
// Remove only single aura from stack
if (triggeredByAura->GetStackAmount() > 1 && !triggeredByAura->GetHolder()->ModStackAmount(-1))
return SPELL_AURA_PROC_CANT_TRIGGER;
}
break;
}
case SPELLFAMILY_MAGE:
{
// Combustion

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11012"
#define REVISION_NR "11013"
#endif // __REVISION_NR_H__