mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-10 20:19:49 +01:00
Core/Spells: Heroic Leap may not target destinations that are more than 4 yards above the caster's ground position
This commit is contained in:
3
sql/updates/world/custom/custom_2019_12_13_00_world.sql
Normal file
3
sql/updates/world/custom/custom_2019_12_13_00_world.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_warr_heroic_leap';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(6544, 'spell_warr_heroic_leap');
|
||||
@@ -1194,6 +1194,25 @@ private:
|
||||
uint8 _hitTargets = 0;
|
||||
};
|
||||
|
||||
class spell_warr_heroic_leap : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_warr_heroic_leap);
|
||||
|
||||
SpellCastResult CheckLocation()
|
||||
{
|
||||
// The client shows an area as unreachable once the target destination is 4 yards above your position
|
||||
if (!GetExplTargetDest() || GetExplTargetDest()->GetPositionZ() - GetCaster()->GetPositionZ() > 4.f)
|
||||
return SPELL_FAILED_NOPATH;
|
||||
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_warr_heroic_leap::CheckLocation);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_warrior_spell_scripts()
|
||||
{
|
||||
RegisterAuraScript(spell_warr_blood_craze);
|
||||
@@ -1205,6 +1224,7 @@ void AddSC_warrior_spell_scripts()
|
||||
RegisterSpellScript(spell_warr_devastate);
|
||||
new spell_warr_execute();
|
||||
new spell_warr_glyph_of_sunder_armor();
|
||||
RegisterSpellScript(spell_warr_heroic_leap);
|
||||
new spell_warr_intimidating_shout();
|
||||
new spell_warr_lambs_to_the_slaughter();
|
||||
new spell_warr_last_stand();
|
||||
|
||||
Reference in New Issue
Block a user