mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[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:
parent
1e8ca772b3
commit
f9a6513d38
4 changed files with 102 additions and 47 deletions
|
|
@ -4870,14 +4870,14 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
{
|
{
|
||||||
if (m_spellInfo->Id == 51582) // Rocket Boots Engaged
|
if (m_spellInfo->Id == 51582) // Rocket Boots Engaged
|
||||||
{
|
{
|
||||||
if(m_caster->IsInWater())
|
if (m_caster->IsInWater())
|
||||||
return SPELL_FAILED_ONLY_ABOVEWATER;
|
return SPELL_FAILED_ONLY_ABOVEWATER;
|
||||||
}
|
}
|
||||||
else if(m_spellInfo->SpellIconID == 156) // Holy Shock
|
else if(m_spellInfo->SpellIconID == 156) // Holy Shock
|
||||||
{
|
{
|
||||||
// spell different for friends and enemies
|
// spell different for friends and enemies
|
||||||
// hart version required facing
|
// hart version required facing
|
||||||
if(m_targets.getUnitTarget() && !m_caster->IsFriendlyTo(m_targets.getUnitTarget()) && !m_caster->HasInArc( M_PI_F, m_targets.getUnitTarget() ))
|
if (m_targets.getUnitTarget() && !m_caster->IsFriendlyTo(m_targets.getUnitTarget()) && !m_caster->HasInArc( M_PI_F, m_targets.getUnitTarget() ))
|
||||||
return SPELL_FAILED_UNIT_NOT_INFRONT;
|
return SPELL_FAILED_UNIT_NOT_INFRONT;
|
||||||
}
|
}
|
||||||
// Fire Nova
|
// Fire Nova
|
||||||
|
|
@ -5246,8 +5246,12 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
//custom check
|
//custom check
|
||||||
switch(m_spellInfo->Id)
|
switch(m_spellInfo->Id)
|
||||||
{
|
{
|
||||||
|
case 34026: // Kill Command
|
||||||
|
if (!m_caster->GetPet())
|
||||||
|
return SPELL_FAILED_NO_PET;
|
||||||
|
break;
|
||||||
case 61336: // Survival Instincts
|
case 61336: // Survival Instincts
|
||||||
if(m_caster->GetTypeId() != TYPEID_PLAYER || !((Player*)m_caster)->IsInFeralForm())
|
if (m_caster->GetTypeId() != TYPEID_PLAYER || !((Player*)m_caster)->IsInFeralForm())
|
||||||
return SPELL_FAILED_ONLY_SHAPESHIFT;
|
return SPELL_FAILED_ONLY_SHAPESHIFT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -2117,14 +2117,12 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_HUNTER:
|
case SPELLFAMILY_HUNTER:
|
||||||
{
|
{
|
||||||
/* disabled until full implementation
|
|
||||||
switch(GetId())
|
switch(GetId())
|
||||||
{
|
{
|
||||||
case 34026: // Kill Command
|
case 34026: // Kill Command
|
||||||
target->CastSpell(target, 34027, true, NULL, this);
|
target->CastSpell(target, 34027, true, NULL, this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_SHAMAN:
|
case SPELLFAMILY_SHAMAN:
|
||||||
|
|
@ -8042,11 +8040,12 @@ m_permanent(false), m_isRemovedOnShapeLost(true), m_deleted(false), m_in_use(0)
|
||||||
break;
|
break;
|
||||||
// some auras applied with max stack
|
// some auras applied with max stack
|
||||||
case 24575: // Brittle Armor
|
case 24575: // Brittle Armor
|
||||||
case 24662: // Restless Strength
|
|
||||||
case 24659: // Unstable Power
|
case 24659: // Unstable Power
|
||||||
|
case 24662: // Restless Strength
|
||||||
case 26464: // Mercurial Shield
|
case 26464: // Mercurial Shield
|
||||||
case 34027: // Kill Command
|
case 34027: // Kill Command
|
||||||
case 55166: // Tidal Force
|
case 55166: // Tidal Force
|
||||||
|
case 58914: // Kill Command (pet part)
|
||||||
case 71564: // Deadly Precision
|
case 71564: // Deadly Precision
|
||||||
m_stackAmount = m_spellProto->StackAmount;
|
m_stackAmount = m_spellProto->StackAmount;
|
||||||
break;
|
break;
|
||||||
|
|
@ -8526,6 +8525,14 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
return;
|
return;
|
||||||
break;
|
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
|
case 71905: // Soul Fragment
|
||||||
{
|
{
|
||||||
if (!apply)
|
if (!apply)
|
||||||
|
|
@ -8794,43 +8801,86 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_HUNTER:
|
case SPELLFAMILY_HUNTER:
|
||||||
{
|
{
|
||||||
// The Beast Within and Bestial Wrath - immunity
|
switch (GetId())
|
||||||
if (GetId() == 19574 || GetId() == 34471)
|
|
||||||
{
|
{
|
||||||
spellId1 = 24395;
|
case 19574: // Bestial Wrath - immunity
|
||||||
spellId2 = 24396;
|
case 34471: // The Beast Within - immunity
|
||||||
spellId3 = 24397;
|
|
||||||
spellId4 = 26592;
|
|
||||||
}
|
|
||||||
// Freezing Trap Effect
|
|
||||||
else if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000008))
|
|
||||||
{
|
|
||||||
if(!apply)
|
|
||||||
{
|
{
|
||||||
Unit *caster = GetCaster();
|
spellId1 = 24395;
|
||||||
// Glyph of Freezing Trap
|
spellId2 = 24396;
|
||||||
if (caster && caster->HasAura(56845))
|
spellId3 = 24397;
|
||||||
|
spellId4 = 26592;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 34027: // Kill Command, owner aura (spellmods)
|
||||||
|
{
|
||||||
|
if (apply)
|
||||||
{
|
{
|
||||||
cast_at_remove = true;
|
if (m_target->HasAura(35029)) // Focused Fire, rank 1
|
||||||
spellId1 = 61394;
|
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
|
||||||
|
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000008))
|
||||||
|
{
|
||||||
|
if(!apply)
|
||||||
|
{
|
||||||
|
Unit *caster = GetCaster();
|
||||||
|
// Glyph of Freezing Trap
|
||||||
|
if (caster && caster->HasAura(56845))
|
||||||
|
{
|
||||||
|
cast_at_remove = true;
|
||||||
|
spellId1 = 61394;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Aspect of the Dragonhawk dodge
|
||||||
|
else if (GetSpellProto()->SpellFamilyFlags2 & 0x00001000)
|
||||||
|
{
|
||||||
|
spellId1 = 61848;
|
||||||
|
|
||||||
|
// triggered spell have same category as main spell and cooldown
|
||||||
|
if (apply && m_target->GetTypeId()==TYPEID_PLAYER)
|
||||||
|
((Player*)m_target)->RemoveSpellCooldown(61848);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
}
|
break;
|
||||||
else
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
// Aspect of the Dragonhawk dodge
|
|
||||||
else if (GetSpellProto()->SpellFamilyFlags2 & 0x00001000)
|
|
||||||
{
|
|
||||||
spellId1 = 61848;
|
|
||||||
|
|
||||||
// triggered spell have same category as main spell and cooldown
|
|
||||||
if (apply && m_target->GetTypeId()==TYPEID_PLAYER)
|
|
||||||
((Player*)m_target)->RemoveSpellCooldown(61848);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_PALADIN:
|
case SPELLFAMILY_PALADIN:
|
||||||
|
|
|
||||||
|
|
@ -947,6 +947,17 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
|
||||||
owner->CastSpell(owner,58227,true,castItem,triggeredByAura);
|
owner->CastSpell(owner,58227,true,castItem,triggeredByAura);
|
||||||
return SPELL_AURA_PROC_OK;
|
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
|
// Glyph of Life Tap
|
||||||
case 63320:
|
case 63320:
|
||||||
triggered_spell_id = 63321;
|
triggered_spell_id = 63321;
|
||||||
|
|
@ -3774,16 +3785,6 @@ SpellAuraProcResult Unit::HandleAddPctModifierAuraProc(Unit* /*pVictim*/, uint32
|
||||||
|
|
||||||
switch(spellInfo->SpellFamilyName)
|
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:
|
case SPELLFAMILY_MAGE:
|
||||||
{
|
{
|
||||||
// Combustion
|
// Combustion
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11012"
|
#define REVISION_NR "11013"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue