Spell Death Grip works only if the Mob is in attack mode.
http://www.wowhead.com/spell=49576/death-grip
Branch(es): 3.3.5
TC rev. hash/commit:
TrinityCore rev. 671a34a966ae 2017-12-30 18:06:33 +0100 (335a branch)
TDB version: TDB_full_world_335.63_2017_04_18 + updates
Operating system: Windows 7
Are you sure about that spell ID? Looks like it was added in Cataclysm or later (spell ID 60000+)
What about http://www.wowhead.com/spell=49576/death-grip or source code reference?
Ups
@tkrokli you are right :) it is spell 49576
OK, I need to test that after I have had some sleep. Can anyone else confirm this?
I have this issue too. rev. ecc55c2
only works if the mob is in attack mode, and spell visual is ok.
You're testing this issue with this npc http://www.wowhead.com/npc=28557/scarlet-peasant ?
I tried with one mob near shattrah, with player account, indeed, it's bugged.
It works only with some npcs, I cannot find why.
Only NPCs with SmartAI have this bug, the problem is here: https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/AI/SmartScripts/SmartAI.cpp#L598 (cancelling controlled movement)
Whats an NPC ID that I can test with?
SELECT * FROM creature_template WHERE entry=30
.npc add 30
casted on it, it correctly pulled the Mob. Supposedly its using SmartAI according to the DB.
TrinityCore rev. f1896144c00e 2018-01-18 19:14:38 -0300 (3.3.5 branch) (Win64, RelWithDebInfo, Static)
TDB 335.63 + updates up to and including 2018_01_18_02_world_335.sql
Previously, the most regular and repeatable NPC I have seen with this issue is Scarlet Medic in the DK starter area, but the issue seems to have expanded to include the other Scarlet mobs too now. When casting Death Grip, the aggro'ed NPC simply runs towards the player to attack in melee range.
@tkrokli Indeed you are correct I will try and submit a patch very soon.
```diff --git src/server/game/AI/SmartScripts/SmartAI.cpp src/server/game/AI/SmartScripts/SmartAI.cpp
index 2b815b677a..70ea096389 100644
--- src/server/game/AI/SmartScripts/SmartAI.cpp
+++ src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -597,7 +597,8 @@ void SmartAI::AttackStart(Unit* who)
me->GetMotionMaster()->Clear(MOTION_SLOT_ACTIVE);
me->PauseMovement();
Test this and see if it works ok. I briefly tested with a spawned Scarlet Medic.
See:
https://gist.github.com/Langerz82/f8aa84b452c72af79d58d060b3e699bf
@Langerz82 : I tested your fix (linked and posted in your comment above) based on current TC 3.3.5 source commit fa3eb754cb, but no improvement. In fact, it got a little bit worse. The aggro'ed NPCs just stood still after Death Grip was cast, but it was still possible to Death Grip them a second time (after cooldown) while my player character is on their threat list (same as described earlier in this issue).
Can you test reverting what @Langerz82 posted and changing
me->PauseMovement();
to
me->PauseMovement(0, 0, false);
please? It should work, if not, removing me->PauseMovement() works 100%, but that is not correct probably
Thanks, will test that as soon as my current compile is done (testing the patch Langerz82 wrote for the Mind Control / Taming Rod issues).
i can confirm removing me->PauseMovement() fixes the issue
@ccrs: shouldn't 'forced' movements like this have highest priority?
@ariel- they do, but priority doesn't matter if you stop all movement (PauseMovement does that, if third parameter is true)
Then maybe it shouldn't stop controlled movegens, the problem here is that it's using Unit::StopMoving which simply stops whatever spline the unit has (including current controlled movement)
Tested in the DK starter area, the PauseMovement change was successful, it worked as intended.
Death Grip works without issues, even on the Scarlet Medic NPCs.
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 2b815b677a..00b6661d41 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -595,7 +595,7 @@ void SmartAI::AttackStart(Unit* who)
if (who && me->Attack(who, mCanAutoAttack))
{
me->GetMotionMaster()->Clear(MOTION_SLOT_ACTIVE);
- me->PauseMovement();
+ me->PauseMovement(0, 0, false);
if (mCanCombatMove)
{
The question remains: is this an acceptable solution, or do we need more changes?
Still not working. It only works on NPCs that are already attacking and/or running toward you. If you cast it on an unsuspecting NPC the movement of the NPC will interrupt the pulling motion of the spell.
1e25b215e5c5
a patch waiting tests exist since jan 20.
Most helpful comment
Only NPCs with SmartAI have this bug, the problem is here: https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/AI/SmartScripts/SmartAI.cpp#L598 (cancelling controlled movement)