Trinitycore: [3.3.5] Imp pet repositions itself after every cast

Created on 11 Dec 2018  路  17Comments  路  Source: TrinityCore/TrinityCore

Description:
The Imp pet (and every pet that has a casting spell) will reposition itself after every cast till it reaches a certain point.
I know this was reported before but all those issues are closed and this problem stll exists.
This video will give a better explanation than my poor english:
https://www.youtube.com/watch?v=hgXEetnqXdc&feature=youtu.be

Steps to reproduce the problem:

  1. Create a warlock and summon the Imp pet
  2. Make sure the Imp pet has Fireball on autocast
  3. Make him attack something (like a dummy NPC)

Branch(es): 3.3.5
TC rev. hash/commit: df641e993ac4e058c55ec97cceb19cf397a51105
Operating system: Win 8.1

Branch-3.3.5a Comp-Core Feedback-PatchFix Sub-Movement

All 17 comments

LoL - the imp is doing the same kind of movement as the previous issues, only in the opposite direction. It seems to want to run away from the fight, like a deserter... :-P

As far as I can remember, the old issues with imps and movement were that the imp moved 1 hop closer to the target for each ranged attack (fireball) until it was in melee range, where it started to fight in melee. The imp did this even if it should have continued to use ranged attack (fireball).

BTW, I notice that your imp used passive mode. Have you tested if the imp's behaviour changes if you set it to defensive or aggressive?

I have read the same in the old issues.
As you said, problem was the Imp moved 1 step closer to the target for each ranged attack.
Now, it is like the imp chooses some point in the map and every time you make him attack, he will go there step by step.
If the imp is out of mana and you make him attack (ranged), he goes directly to that point.

Defensive: Same behavior.
Aggresive: Same behavior.

In the current 335, in PvP the imp will inch closer to the player after each cast, when its at the target's hitbox it will circle / orbit the target player.

So what it should be doing is casting fireball and staying still, correct?

IsMovementPreventedByCasting conditional needs to included in FOLLOW_MOTION_TYPE. Will submit a patch for testing soon.

So what it should be doing is casting fireball and staying still, correct?

it should get in range and los if out of range or oos, if in range and in sight, shoot (no care for facing). If the target runs out of range or los, it should stop casting and resolve that.

I got it to stop moving towards the attack object, but when it runs out of mp it stands still when it should move towards and melee?

imp does not melee, ever. when it is out of mana (from casting or from being mana tapped) it just chills out.

Patch fix please test.
https://gist.github.com/Langerz82/a201a3f0ab251dc265bb210600492d86

I tested with a melee Pet and it was also working as intended.

Just to give an Update here :
I applied Langerz82 code and the Imp behaves correctly now.
He stays where he should and starts to idle when he runs out of mana until he has enough mana again for casting.
I did this some weeks ago so i cant tell if the Imp has this weird behavior at current revision. Might check it this evening on my clean test server.

Thanks for the feedback. Looking forward to any update on current clean TC source.

Looking the code, looks a clean fix, not a hack.
@Langerz82 can open a pr about it?

Let us hope he has not gone on vacation yet. Could be a bit of a wait if he has (3 weeks, maybe).

Hey, I no longer work on this project, someone else will have to create a PR for it. ;)

@Killyana can you check if the issue is now closed? 馃槃

Still not fixed.

4ddf7f59761df525e6ab5ef99175258a1d86101d

Was this page helpful?
0 / 5 - 0 ratings