Skip to content

Commit

Permalink
[12539] Update some Sunwell Plateau spells
Browse files Browse the repository at this point in the history
Limit targets and allow positive effect for spell 46650
Implement effect for spells 46289 and 46637
Remove effect for spell 44845 - will be handled in script library
  • Loading branch information
xfurry committed Aug 22, 2013
1 parent 91268f6 commit 1167ecf
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 17 deletions.
1 change: 1 addition & 0 deletions src/game/Spell.cpp
Expand Up @@ -7765,6 +7765,7 @@ void Spell::GetSpellRangeAndRadius(SpellEffectIndex effIndex, float& radius, uin
break;
case 37676: // Insidious Whisper (SSC, Leotheras the Blind)
case 38028: // Watery Grave (SSC, Morogrim Tidewalker)
case 46650: // Open Brutallus Back Door (SWP, Felmyst)
case 67757: // Nerubian Burrower (Mode 3) (ToCrusader, Anub'arak)
case 71221: // Gas spore (Mode 1) (ICC, Festergut)
unMaxTargets = 4;
Expand Down
5 changes: 5 additions & 0 deletions src/game/SpellAuras.cpp
Expand Up @@ -2727,6 +2727,11 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
target->CastSpell(target, 47287, true, NULL, this);
return;
}
case 46637: // Break Ice
{
target->CastSpell(target, 46638, true);
return;
}
case 48385: // Create Spirit Fount Beam
{
target->CastSpell(target, target->GetMap()->IsRegularDifficulty() ? 48380 : 59320, true);
Expand Down
26 changes: 10 additions & 16 deletions src/game/SpellEffects.cpp
Expand Up @@ -1685,21 +1685,6 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
m_caster->CastSpell(unitTarget, 44455, true, m_CastItem);
return;
}
case 44845: // Spectral Realm
{
if (!unitTarget)
return;

// teleport all targets which have the spectral realm aura
if (unitTarget->HasAura(46021))
{
unitTarget->RemoveAurasDueToSpell(46021);
unitTarget->CastSpell(unitTarget, 46020, true);
unitTarget->CastSpell(unitTarget, 44867, true);
}

return;
}
case 44869: // Spectral Blast
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
Expand Down Expand Up @@ -7576,9 +7561,10 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
}

// Teleport target to the spectral realm, add debuff and force faction
unitTarget->CastSpell(unitTarget, 44852, true);
unitTarget->CastSpell(unitTarget, 46019, true);
unitTarget->CastSpell(unitTarget, 46021, true);
unitTarget->CastSpell(unitTarget, 44845, true);
unitTarget->CastSpell(unitTarget, 44852, true);
return;
}
case 45141: // Burn
Expand Down Expand Up @@ -7826,6 +7812,14 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget, spellId, true);
break;
}
case 46289: // Negative Energy
{
if (!unitTarget)
return;

m_caster->CastSpell(unitTarget, 46285, true);
return;
}
case 46430: // Synch Health
{
if (!unitTarget)
Expand Down
10 changes: 10 additions & 0 deletions src/game/SpellMgr.cpp
Expand Up @@ -694,6 +694,16 @@ bool IsPositiveEffect(SpellEntry const* spellproto, SpellEffectIndex effIndex)
break;
}
break;
case SPELL_EFFECT_SCRIPT_EFFECT:
// some explicitly required script effect sets
switch (spellproto->Id)
{
case 46650: // Open Brutallus Back Door
return true;
default:
break;
}
break;
// always positive effects (check before target checks that provided non-positive result in some case for positive effects)
case SPELL_EFFECT_HEAL:
case SPELL_EFFECT_LEARN_SPELL:
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12538"
#define REVISION_NR "12539"
#endif // __REVISION_NR_H__

0 comments on commit 1167ecf

Please sign in to comment.