Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix Death Grip when caster is jumping or falling #11648

Closed
wants to merge 1 commit into from

6 participants

@zabustak

Death Grip castable while jumping/falling and it shouldn't do that.

@zabustak zabustak referenced this pull request
Closed

Death Grip #432

@Ascathor

If I may bring an input.
I believe you can use it on knockback. However, not on consciously jumping and falling down. The difference is that you could jump and fall cliffs down on your own agenda - while a knockback is by enemy input. As a last resort, the death grip is a nice "last choice" cast for the DK against knockbackers while he can not use it to pull lame moves.

@gigatotem

@PortgasDAce The report is correct.

I've just tested it on Retail.

Attempting to cast Death Grip while you're jumping or falling will return a "Cant do that while moving" error.

@joschiwald
Collaborator

move it into spell_dk_death_grip and correct castresult to SPELL_FAILED_MOVING

@zabustak

Done and also fixed for rooted target

@joschiwald
Collaborator

sry about my previous comment, spell_dk_death_grip is not the initial spell of deathgrip, needs new spellscript for 49576
but maybe there is an unknown attribute to handle this

@Vincent-Michael
Collaborator

pls try with conditions in db

@joschiwald
Collaborator

not possible

@zabustak

what script name you want for initial spell ?

@joschiwald
Collaborator

spell_dk_death_grip_initital | spell_dk_death_grip
spell_dk_death_grip | spell_dk_death_grip_effect
spell_dk_death_grip | spell_dk_death_grip_jump

something like that, feel free to find a better name

@Aokromes
Owner

@zabustak you are alive? :P

@zabustak zabustak closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 2, 2014
  1. @zabustak

    CoreSpell: Death Grip shouldn't be castable when caster is jumping or…

    zabustak authored
    … falling or target is rooted
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 1 deletion.
  1. +14 −1 src/server/scripts/Spells/spell_dk.cpp
View
15 src/server/scripts/Spells/spell_dk.cpp
@@ -558,19 +558,32 @@ class spell_dk_death_grip : public SpellScriptLoader
{
PrepareSpellScript(spell_dk_death_grip_SpellScript);
+ SpellCastResult CheckCast()
+ {
+ if (Player* m_caster = GetCaster()->ToPlayer())
+ {
+
+ if (m_caster->HasUnitState(UNIT_STATE_JUMPING) || m_caster->HasUnitMovementFlag(MOVEMENTFLAG_FALLING))
+ return SPELL_FAILED_MOVING;
+ }
+
+ return SPELL_CAST_OK;
+ }
+
void HandleDummy(SpellEffIndex /*effIndex*/)
{
int32 damage = GetEffectValue();
Position const* pos = GetExplTargetDest();
if (Unit* target = GetHitUnit())
{
- if (!target->HasAuraType(SPELL_AURA_DEFLECT_SPELLS)) // Deterrence
+ if (!(target->HasAuraType(SPELL_AURA_DEFLECT_SPELLS) || target->HasAuraType(SPELL_AURA_MOD_ROOT))) // Deterrence / Root
target->CastSpell(pos->GetPositionX(), pos->GetPositionY(), pos->GetPositionZ(), damage, true);
}
}
void Register() OVERRIDE
{
+ OnCheckCast += SpellCheckCastFn(spell_dk_death_grip_SpellScript::CheckCast);
OnEffectHitTarget += SpellEffectFn(spell_dk_death_grip_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
Something went wrong with that request. Please try again.