From d8466dc392e8d695bb01e5bf49e374a8dca7fb2e Mon Sep 17 00:00:00 2001 From: Xfurry Date: Tue, 24 Jan 2012 19:17:54 +0100 Subject: [PATCH] [11883] Implement spells 32300, 32301 Based on research done by Bugfix at SD2 forums Also reorder a few case spell_id in this area Signed-off-by: Schmoozerd --- src/game/SpellEffects.cpp | 49 ++++++++++++++++++++++++++------------- src/shared/revision_nr.h | 2 +- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 5646e8ab8..99c6b00da 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1258,6 +1258,14 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) ((Creature*)unitTarget)->ForcedDespawn(); return; } + case 32300: // Focus Fire + { + if (!unitTarget) + return; + + unitTarget->CastSpell(unitTarget, unitTarget->GetMap()->IsRegularDifficulty() ? 32302 : 38382, true); + return; + } case 33060: // Make a Wish { if (m_caster->GetTypeId()!=TYPEID_PLAYER) @@ -6580,6 +6588,22 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx) m_caster->SummonCreature(16474, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 30000); return; } + case 29395: // Break Kaliri Egg + { + uint32 creature_id = 0; + uint32 rand = urand(0, 99); + + if (rand < 10) + creature_id = 17034; + else if (rand < 60) + creature_id = 17035; + else + creature_id = 17039; + + if (WorldObject* pSource = GetAffectiveCasterObject()) + pSource->SummonCreature(creature_id, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120*IN_MILLISECONDS); + return; + } case 29830: // Mirren's Drinking Hat { uint32 item = 0; @@ -6610,6 +6634,15 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx) unitTarget->RemoveAurasAtMechanicImmunity(IMMUNE_TO_ROOT_AND_SNARE_MASK,30918,true); break; } + case 32301: // Ping Shirrak + { + if (!unitTarget) + return; + + // Cast Focus fire on caster + unitTarget->CastSpell(m_caster, 32300, true); + return; + } case 38358: // Tidal Surge { if (!unitTarget) @@ -6618,22 +6651,6 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx) unitTarget->CastSpell(unitTarget, 38353, true, NULL, NULL, m_caster->GetObjectGuid()); return; } - case 29395: // Break Kaliri Egg - { - uint32 creature_id = 0; - uint32 rand = urand(0, 99); - - if (rand < 10) - creature_id = 17034; - else if (rand < 60) - creature_id = 17035; - else - creature_id = 17039; - - if (WorldObject* pSource = GetAffectiveCasterObject()) - pSource->SummonCreature(creature_id, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120*IN_MILLISECONDS); - return; - } case 41055: // Copy Weapon { if (m_caster->GetTypeId() != TYPEID_UNIT || !unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 92ec5945a..081b78f4b 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 "11882" + #define REVISION_NR "11883" #endif // __REVISION_NR_H__