[DiscordArchive] Why would anpc gets stuck in evade ?
[DiscordArchive] Why would anpc gets stuck in evade ?
Archived author: jackpoz • Posted: 2025-09-14T09:59:00.236000+00:00
Original source
Why would anpc gets stuck in evade ?
Archived author: jackpoz • Posted: 2025-09-14T09:59:30.920000+00:00
Original source
Not in this discord
Archived author: Crane • Posted: 2025-09-14T10:07:59.105000+00:00
Original source
The NPC starts walking and the escort starts normally, then enters combat and stops.
This function ensures that during the evade, i.e. when returning to the last waypoint and then continuing to the destination, the NPC doesn't lose its auras and retains the form it was given at the start.
You force the NPC to retain its form and auras, so it stops and doesn't continue to walk past its waypoint.
Archived author: Crane • Posted: 2025-09-14T10:10:12.058000+00:00
Original source
<@228947336800370689>This is also done here: https://github.com/TrinityCore/TrinityCo...e.cpp#L176 So I have to get him to continue his waypoint outside of the fight
Archived author: Crane • Posted: 2025-09-14T10:11:40.038000+00:00
Original source
and I have already tried a lot of things, searched the whole TC core for similarities but found nothing at all
Archived author: jackpoz • Posted: 2025-09-14T10:14:03.825000+00:00
Original source
So he is losing auras that it shouldn't lose ?
Archived author: Crane • Posted: 2025-09-14T10:19:03.211000+00:00
Original source
<@228947336800370689>Exactly, there's an escort quest that was created with SAI, but SmartAI can't handle this function. The SAI quest just doesn't work Blizzard-like because he loses everything when he evades.
This quest: https://github.com/TrinityCore/TrinityCo...-644217059
I'm rebuilding this in C++ because, for example, Azerothcore apparently has a special table that can handle evading, but TC can't. Therefore, as described there, he always loses his auras and form when he evades. It's like a reset, so to speak. But in C++, you can suppress this with exactly this function, and it works. The only problem is that the NPC stops moving as soon as he leaves combat.
Archived author: Crane • Posted: 2025-09-14T10:20:37.635000+00:00
Original source
I recreated everything 1:1 in C++ and everything worked perfectly except for one thing.
Archived author: jackpoz • Posted: 2025-09-14T10:21:37.601000+00:00
Original source
And couldn't it be just a flag for the shapeshift to not be removed ?
Archived author: Crane • Posted: 2025-09-14T10:27:27.489000+00:00
Original source
Flags don't help because every NPC that evades, i.e., runs to the last position, loses its aura and form.
I then looked at this: https://github.com/TrinityCore/TrinityCo...AI.cpp#L93
Unfortunately, he doesn't run back to his last position, or if that has anything to do with it at all.