Jump to content

[Help] Spell Spout


Recommended Posts

  • 41 years later...

Hey,

I'm working on the lurker below and I'm almost done with the script. But I've got a problem with the spout spell. Every 300 millisecons lurker should cast spout (spellid 37433), but only if there are a few conditions met, else lurker will cast a fake spout. Now my problem, if the spout hits me I'll get the damage (about 3k - 4k) and I'll get the knockback, but sometimes I'll get the damage without the knockback. But I don't know why..

Here is a excerpt from the script:

// cast spout
if(m_uiCastSpoutTimer < uiDiff)
{
   m_creature->InterruptNonMeleeSpells(false);

   Map* pMap = m_creature->GetMap();
   Map::PlayerList const &PlayerList = pMap->GetPlayers();
   if (!PlayerList.isEmpty())
   {   
       for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
       {
           if (itr->getSource() && m_creature->HasInArc(dPI/3, itr->getSource()) && m_creature->GetDistance(itr->getSource()) < iSpoutDist && !itr->getSource()->IsInWater())
               DoCastSpellIfCan(m_creature, SPELL_SPOUT, CAST_INTERRUPT_PREVIOUS);
           else
               DoCastSpellIfCan(m_creature, SPELL_SPOUT_FAKE, CAST_INTERRUPT_PREVIOUS);
       }
   }
   m_uiCastSpoutTimer = 300;
}

Where is the problem? my script? maybe a core-problem?

Link to comment
Share on other sites

Likely related spells:

37429 5min dureation, periodic trigger, 200ms, triggers 37433

37430 same, except can be used while stunned

37433 AoE TARGET_IN_FRONT_OF_CASTER - has effect knockback and damage

37431 ScriptEffect, self cast, 3s casting time

42581 5 min duration, periodic trigger, 200ms, triggers 42584 (remark other visual than 37429)

42582 same spell..

42584 AoE TARGET_IN_FRONT_OF_CASTER - has knockback effect

******* also triggers 42835 on self

42835 AoE TARGET_IN_FRONT_OF_CASTER - damage effect

I am pretty sure, that there was a fix for one of the knockback or dmg spells to ignore enemies in water recently, but I cannot find it

Link to comment
Share on other sites

if it is general, we can add a CodeLine in Spell::EffectKnockBack

like this one

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index da1148d..a027d09 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -9645,6 +9645,9 @@ void Spell::EffectKnockBack(SpellEffectIndex eff_idx)
    if(!unitTarget)
        return;

+    if (unitTarget->IsInWater())
+        return;
+
    // Can't knockback rooted target
    if (unitTarget->hasUnitState(UNIT_STAT_ROOT))
        return;

Link to comment
Share on other sites

It is better when lurker below has the aura 37429 or 42581 which trigger the spout spell 37433 or 42584 every 200ms

the spell attack all targets in ~30°. You must also apply the Core addition for Knockback immunity while in water. Which this you doesn't need your uggly scriptpart.

I hope i could help you. Sry for double post.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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