diff --git a/sql/updates/world/4.3.4/custom_2018_02_14_01_world.sql b/sql/updates/world/4.3.4/custom_2018_02_14_01_world.sql new file mode 100644 index 00000000000..f0ef98a387f --- /dev/null +++ b/sql/updates/world/4.3.4/custom_2018_02_14_01_world.sql @@ -0,0 +1,5 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_umbris_blitz'; + +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(74670, 'spell_umbriss_blitz'), +(90250, 'spell_umbriss_blitz'); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index d0dc7193c6a..23acc1f1723 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -4479,6 +4479,7 @@ void Spell::EffectChargeDest(SpellEffIndex /*effIndex*/) if (m_targets.HasDst()) { Position pos = destTarget->GetPosition(); + float speed = G3D::fuzzyGt(m_spellInfo->Speed, 0.0f) ? m_spellInfo->Speed : SPEED_CHARGE; if (!m_caster->IsWithinLOS(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ())) { @@ -4487,7 +4488,7 @@ void Spell::EffectChargeDest(SpellEffIndex /*effIndex*/) pos = m_caster->GetFirstCollisionPosition(dist, angle); } - m_caster->GetMotionMaster()->MoveCharge(pos.m_positionX, pos.m_positionY, pos.m_positionZ); + m_caster->GetMotionMaster()->MoveCharge(pos.m_positionX, pos.m_positionY, pos.m_positionZ, speed); } } diff --git a/src/server/scripts/EasternKingdoms/GrimBatol/boss_general_umbriss.cpp b/src/server/scripts/EasternKingdoms/GrimBatol/boss_general_umbriss.cpp index 49acee89774..c8cb21f59ce 100644 --- a/src/server/scripts/EasternKingdoms/GrimBatol/boss_general_umbriss.cpp +++ b/src/server/scripts/EasternKingdoms/GrimBatol/boss_general_umbriss.cpp @@ -429,6 +429,36 @@ class spell_umbriss_bleeding_wound : public SpellScriptLoader } }; +class spell_umbriss_blitz : public SpellScriptLoader +{ + public: + spell_umbriss_blitz() : SpellScriptLoader("spell_umbriss_blitz") { } + + class spell_umbriss_blitz_SpellScript : public SpellScript + { + PrepareSpellScript(spell_umbriss_blitz_SpellScript); + + void HandleCharge(SpellEffIndex /*effIndex*/) + { + if (Unit* caster = GetCaster()) + { + caster->ClearUnitState(UNIT_STATE_CANNOT_TURN); + caster->ClearUnitState(UNIT_STATE_CASTING); + } + } + + void Register() override + { + OnEffectLaunch += SpellEffectFn(spell_umbriss_blitz_SpellScript::HandleCharge, EFFECT_0, SPELL_EFFECT_CHARGE_DEST); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_umbriss_blitz_SpellScript(); + } +}; + void AddSC_boss_general_umbriss() { new boss_general_umbriss(); @@ -436,4 +466,5 @@ void AddSC_boss_general_umbriss() new spell_umbriss_summon_blitz_trigger(); new spell_umbriss_summon_ground_siege_trigger(); new spell_umbriss_bleeding_wound(); + new spell_umbriss_blitz(); }