Jump to content

Deathgrip


newbiewow

Recommended Posts

Try this patch (blizzlike jump effect)

based on mangos rev. [11632] Death Grip patch

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp

index 91ccec4..92aa54a 100644

--- a/src/game/SpellEffects.cpp

+++ b/src/game/SpellEffects.cpp

@@ -3187,6 +3187,24 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)

m_caster->CastCustomSpell(m_caster, 45470, &bp, NULL, NULL, true);

return;

}

+ // Death Grip

+ else if (m_spellInfo->Id == 49576)

+ {

+ if (!unitTarget)

+ return;

+

+ m_caster->CastSpell(unitTarget, 49560, true);

+ return;

+ }

+ else if (m_spellInfo->Id == 49560)

+ {

+ if (!unitTarget)

+ return;

+

+ uint32 spellId = m_spellInfo->CalculateSimpleValue(EFFECT_INDEX_0);

+ unitTarget->CastSpell(m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), spellId, true);

+ return;

+ }

// Obliterate

else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0002000000000000))

{

@@ -3490,6 +3508,8 @@ void Spell::EffectJump(SpellEffectIndex eff_idx)

pTarget = m_caster->GetMap()->GetUnit(((Player*)m_caster)->GetSelectionGuid());

o = pTarget ? pTarget->GetOrientation() : m_caster->GetOrientation();

+

+ m_caster->NearTeleportTo(x, y, z, o, true);

}

else

o = m_caster->GetOrientation();

@@ -3510,7 +3530,9 @@ void Spell::EffectJump(SpellEffectIndex eff_idx)

return;

}

- m_caster->NearTeleportTo(x, y, z, o, true);

+ float speed_z = 10.0f;

+ uint32 time = speed_z * 100;

+ m_caster->SendMonsterMove(x, y, z, SPLINETYPE_NORMAL, SPLINEFLAG_TRAJECTORY, time, NULL, speed_z);

}

void Spell::EffectTeleportUnits(SpellEffectIndex eff_idx)

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp

index 1e92106..4ce0270 100644

--- a/src/game/Unit.cpp

+++ b/src/game/Unit.cpp

@@ -399,6 +399,11 @@ void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, SplineTy

data << uint32(flags); // splineflags

data << uint32(moveTime); // Time in between points

+ if (flags & SPLINEFLAG_TRAJECTORY)

+ {

+ data << float(va_arg(vargs, double)); // Z jump speed

+ data << uint32(0); // walk time after jump

+ }

data << uint32(1); // 1 single waypoint

data << NewPosX << NewPosY << NewPosZ; // the single waypoint Point B

Note:

there is a bug with some creatures, and they can not be attacked after pulling it.

(it seems they is pulled just visual, but are still at the old location)

maybe EventAI script it confuses.

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