Jump to content

[11392][patch] Implement spell 38358 - Tidal Surge


Guest stfx

Recommended Posts

What bug does the patch fix? What features does the patch add?

Implements Script Dummy Effect for spell 38358 which should be used in scriptdev2 by Fathom-Guard Caribdis

Scriptdev2 currently uses the spell which is casted by 38358 which might be wrong :)

For which repository revision was the patch created?

[11369]

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

No.

Who has been writing this patch? Please include either forum user names or email addresses.

me but actually taken from megamage with proper formatting - https://github.com/TrinityCore/TrinityCore/commit/9676c5eddf8aee8665e3faa3918492aeaf816a8d

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 9f14747..322df49 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -6339,6 +6339,14 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)

                    break;
                }
+                case 38358:                                 // Tidal Surge
+                {
+                    if (!unitTarget)
+                        return;
+
+                    unitTarget->CastSpell(unitTarget, 38353, true, NULL, NULL, m_caster->GetObjectGuid());
+                    return;
+                }
                case 30918:                                 // Improved Sprint
                {
                    if (!unitTarget)

EDIT: Use correct way to cast spell pointed out by Schmoozerd. Thanks

Link to comment
Share on other sites

As I know this effect has to be applied to all units / players in range of 10y?

From 0ec33e781dd6a48de1a0367a3fc1cc20f1d61110 Mon Sep 17 00:00:00 2001
From: DaC <[email protected]>
Date: Mon, 11 Apr 2011 11:54:40 +0200
Subject: [PATCH 203/203] Tidal Surge - Karathress spell

---
src/game/SpellEffects.cpp |   18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index d60a1fb..2908d7a 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5084,6 +5084,24 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
                    unitTarget->RemoveAurasAtMechanicImmunity(IMMUNE_TO_ROOT_AND_SNARE_MASK,30918,true);
                    break;
                }
+                case 38358:                                 // Tidal Surge
+                {
+                    if (!unitTarget)
+                        return;
+
+                    // m_caster->CastSpell(unitTarget, 38353, true);
+                    ThreatList const& tList = m_caster->getThreatManager().getThreatList();
+                    for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i)
+                    {
+                        if ((*i) != 0 && (*i) != NULL)
+                        {
+                            Unit* pUnit = m_caster->GetMap()->GetUnit((*i)->getUnitGuid());
+                            if (pUnit->IsWithinDistInMap(m_caster, 10.0f))
+                                pUnit->CastSpell(pUnit, 38353, true);
+                        }
+                    }
+                    break;
+                }
                case 38794:                                 // Murmurs Touch Hero
                {
                    if (!unitTarget)
-- 
1.7.0.2.msysgit.0


Link to comment
Share on other sites

38358 is AoE spell, so DaC your suggestion is wrong

I agree with DasBlub, 38353 has Target-self so should be cast by unitTarget->CastSpell(unitTarget..

Further:

We should let the boss (m_caster) be original caster of spell 38353, so

unitTarget->CastSpell(unitTarget, 38353, true, NULL, NULL, m_caster->GetObjectGuid()); // % typos

Edit:

Please do not forget to provide patch at sd2 when implemented :)

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use