Jump to content

<9025> Death Grip


Recommended Posts

Posted

mangos rev 9025

udb dbase rev 386

custom patches: scriptdev2, kaxias dual spec, kaxias announce, valhalla vehicles

platform: windows xp

how it should work?

Harness the unholy energy that surrounds and binds all matter, drawing the target toward the death knight and forcing the enemy to attack the death knight for 3 sec.

How it DOES work

not drawing the target toward the death knight and not forcing the enemy to attack the death knight for 3 sec.

  • 1 month later...
Posted

I test some patch for fix Death Grip but they dont work anymore whith my revision(9210)

// Death Grip

switch(m_spellInfo->Id)

{

case 49560:

case 49576:

{

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,MONSTER_MOVE_UNK6,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,49576,true); //Taunt

return;

}

}

Anyone know why this code doesnt work ? Plz

Posted

Yes I think it does with this rev:

MaNGOS/0.16.0 (* * Revision 9202 - *) for Linux_x64 (little-endian)

Using script library: ScriptDev2 (for MaNGOS 9198+) Revision [1545] 2010-01-17 09:10:29 (Unix)

Using World DB: PSDB WotLK (283)

Using creature EventAI: PSDB EventAI r1542 & ACID 3.0.1

  • 2 weeks later...
  • 2 weeks later...
Posted
update please patch!

This patch works for me:

--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2188,6 +2188,33 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
                m_caster->CastCustomSpell(m_caster, 45470, &bp, NULL, NULL, true);
                return;
            }
+            switch(m_spellInfo->Id)
+            {   
+                // Death Grip
+                case 49560:
+                case 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, SPLINETYPE_NORMAL, SPLINEFLAG_UNKNOWN11, 1);
+                    }
+                    else
+                        unitTarget->NearTeleportTo(x,y,z,orientation,false);
+
+                    return;
+                }
+            }
            break;
        }
    }

  • 2 weeks later...
Posted

Here the patch updated:

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

return;

}

+ switch(m_spellInfo->Id)

+ {

+ // Death Grip

+ case 49560:

+ case 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, SPLINETYPE_NORMAL, SPLINEFLAG_UNKNOWN11, 1);

+ }

+ else

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

+

+ return;

+ }

+ }

break;

}

Posted

You have a little typo in the patch, but it works great! :D

You have wrote this:

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

return;

}

+ switch(m_spellInfo->Id)

+ {

+ // Death Grip

+ case 49560:

+ case 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,or ientation);

+ ((Creature*)unitTarget)->SendMonsterMove(x, y, z, SPLINETYPE_NORMAL, SPLINEFLAG_UNKNOWN11, 1);

+ }

+ else

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

+

+ return;

+ }

+ }

break;

}

and it has to be like this:

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

return;

}

+ switch(m_spellInfo->Id)

+ {

+ // Death Grip

+ case 49560:

+ case 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, SPLINETYPE_NORMAL, SPLINEFLAG_UNKNOWN11, 1);

+ }

+ else

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

+

+ return;

+ }

+ }

break;

}

It works great with revision 9591 + Dual-Spec! :)

×
×
  • 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