Scripts/FollowerAI: Some cleanup:

- FollowerAI properly resumes follow after evading.
- Removed duplicated getters from CreatureAI (IsEscorted vs IsEscortNPC), they were used to do the same thing
- FollowerAI properly assists in combat.
- FollowerAI properly despawns if quest is abandoned.
- FollowerAI now supports dynamic respawning for escort NPCs.
This commit is contained in:
Treeston
2019-08-01 18:32:26 +02:00
parent 3ffe570b21
commit 3d4bebd8d9
12 changed files with 77 additions and 145 deletions

View File

@@ -2964,7 +2964,7 @@ bool Map::CheckRespawn(RespawnInfo* info)
if (!creature->IsAlive())
continue;
// escort NPCs are allowed to respawn as long as all other instances are already escorting
if (isEscort && creature->IsEscortNPC(true))
if (isEscort && creature->IsEscorted())
continue;
doDelete = true;
break;