Jump to content

[bug 7738] Death grip


Auntie Mangos

Recommended Posts

I tried this patch last night before posting but it was so late and I was very tired and forgot to remove this :

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 168cf44..adb562c 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1764,7 +1764,23 @@ void Spell::EffectDummy(uint32 i)
                }
                return;
            }
[b][color="Red"]-            break;[/color][/b]
+            //Death Grip temp fix
+            if(m_spellInfo->Id==49576)
+            {
+                if (!unitTarget||!m_caster)
+                    return;
+                uint32 mapid = m_caster->GetMapId();
+                float x = m_caster->GetPositionX();
+                float y = m_caster->GetPositionY(); 
+                float z = m_caster->GetPositionZ()+1;
+                float orientation = unitTarget->GetOrientation();
+                m_caster->CastSpell(unitTarget,49560,true,NULL);//get taunt debuff as well
+                unitTarget->SendMonsterMove(x,y,z,0,MOVEMENTFLAG_JUMPING,1);
+                if (unitTarget->GetTypeId()==TYPEID_PLAYER)
+                    unitTarget->NearTeleportTo(x,y,z,orientation,false);
+                return;
+            }
+            break;
    }

    // pet auras

This morning i found out and it works

I hope the Mangos source will be updated so will not need to apply a patch for the death grip to work

Thank you , Have a nice day

Link to comment
Share on other sites

  • 39 years later...

Hi , at rev 7676 the death grip (http://www.wowhead.com/?spell=49576) works but after that rev does not work any more :(

Last rev tested 7738 (Not working)

How it SHOULD work: teleports the target (player or npc) to the caster and taunts the target for 3 sec

What it does: Nothing , just the visual effect

I hope it gets fixed fast :P

Thank you , Have a nice day !

Link to comment
Share on other sites

Actually the spell should make the npc or player jump to you. For example you use Death grip on a player or mob and the animation should make the target jump from where he/she is to you. One long jump. It should not teleport the player. This is same for the druid cat form spell where you jump TO the target instead of the target jumping to you.

Link to comment
Share on other sites

I use this code atm for Death Grip:

+            // Death Grip
+            if( m_spellInfo->SpellFamilyFlags & 0x02000000LL )
+            {
+                if(!unitTarget || !m_caster)
+                    return;
+
+                // unitTarget is Creature
+                if(unitTarget->GetTypeId()!=TYPEID_PLAYER)
+                {
+            float x = m_caster->GetPositionX();
+            float y = m_caster->GetPositionY(); 
+            float z = m_caster->GetPositionZ()+1;
+            float orientation = unitTarget->GetOrientation();
+            unitTarget->SendMonsterMove(x,y,z,orientation,MOVEMENTFLAG_JUMPING,1);
+                }
+                else
+                {   // unitTarget is Player
+                    float vsin = sin(unitTarget->GetAngle(m_caster));
+                    float vcos = cos(unitTarget->GetAngle(m_caster));
+
+                    WorldPacket data(SMSG_MOVE_KNOCK_BACK, (8+4+4+4+4+4));
+                    data.append(unitTarget->GetPackGUID());
+                    data << uint32(0);                                      // Sequence
+                    data << float(vcos);                                    // x direction
+                    data << float(vsin);                                    // y direction
+                                                                        // Horizontal speed
+                    data << float(damage ? damage : unitTarget->GetDistance2d(m_caster));
+                    data << float(-10.0);                                   // Z Movement speed
+
+                    ((Player*)unitTarget)->GetSession()->SendPacket(&data);
+                }
+                m_caster->CastSpell(unitTarget,51399,true);    //Taunt
+                return;
+            }

Same method for getting creatures, but it uses a knockback effect (only reverse) for players

Link to comment
Share on other sites

  • 8 months later...
  • 5 weeks later...

Please update patch for mangos 9348

Good work. Previous patch helped.

I use this code atm for Death Grip:

+            // Death Grip
+            if( m_spellInfo->SpellFamilyFlags & 0x02000000LL )
+            {
+                if(!unitTarget || !m_caster)
+                    return;
+
+                // unitTarget is Creature
+                if(unitTarget->GetTypeId()!=TYPEID_PLAYER)
+                {
+            float x = m_caster->GetPositionX();
+            float y = m_caster->GetPositionY(); 
+            float z = m_caster->GetPositionZ()+1;
+            float orientation = unitTarget->GetOrientation();
+            unitTarget->SendMonsterMove(x,y,z,orientation,MOVEMENTFLAG_JUMPING,1);
+                }
+                else
+                {   // unitTarget is Player
+                    float vsin = sin(unitTarget->GetAngle(m_caster));
+                    float vcos = cos(unitTarget->GetAngle(m_caster));
+
+                    WorldPacket data(SMSG_MOVE_KNOCK_BACK, (8+4+4+4+4+4));
+                    data.append(unitTarget->GetPackGUID());
+                    data << uint32(0);                                      // Sequence
+                    data << float(vcos);                                    // x direction
+                    data << float(vsin);                                    // y direction
+                                                                        // Horizontal speed
+                    data << float(damage ? damage : unitTarget->GetDistance2d(m_caster));
+                    data << float(-10.0);                                   // Z Movement speed
+
+                    ((Player*)unitTarget)->GetSession()->SendPacket(&data);
+                }
+                m_caster->CastSpell(unitTarget,51399,true);    //Taunt
+                return;
+            }

Same method for getting creatures, but it uses a knockback effect (only reverse) for players

Link to comment
Share on other sites

Here's the code to Death Grip (sorry my bad english)

//Death Grip

else if (m_spellInfo->Id == 49560 || m_spellInfo->Id == 49576)

{

if (!unitTarget || !m_caster)

return;

float x = m_caster->GetPositionX();

float y = m_caster->GetPositionY();

float z = m_caster->GetPositionZ()+1;

float orientation = unitTarget->GetOrientation();

m_caster->CastSpell(unitTarget,51399,true,NULL);

if(unitTarget->GetTypeId() != TYPEID_PLAYER)

{

unitTarget->GetMap()->CreatureRelocation((Creature*)unitTarget,x,y,z,orientation);

((Creature*)unitTarget)->SendMonsterMove(x, y, z, orientation, ((Creature*)unitTarget)->GetSplineFlags(), 1);

}

else unitTarget->NearTeleportTo(x,y,z,orientation,false);

return;

}

break;

}

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