aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/ScriptedAI
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/AI/ScriptedAI')
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp9
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp9
2 files changed, 6 insertions, 12 deletions
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index 691ca506ede..bd47759817b 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -278,13 +278,10 @@ void EscortAI::AddWaypoint(uint32 id, float x, float y, float z, float orientati
void EscortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false */, ObjectGuid playerGUID /* = 0 */, Quest const* quest /* = nullptr */, bool instantRespawn /* = false */, bool canLoopPath /* = false */, bool resetWaypoints /* = true */)
{
// Queue respawn from the point it starts
- if (Map* map = me->GetMap())
+ if (CreatureData const* cdata = me->GetCreatureData())
{
- if (CreatureData const* cdata = me->GetCreatureData())
- {
- if (sWorld->getBoolConfig(CONFIG_RESPAWN_DYNAMIC_ESCORTNPC) && (cdata->spawnGroupData->flags & SPAWNGROUP_FLAG_ESCORTQUESTNPC))
- me->SaveRespawnTime(me->GetRespawnDelay());
- }
+ if (sWorld->getBoolConfig(CONFIG_RESPAWN_DYNAMIC_ESCORTNPC) && (cdata->spawnGroupData->flags & SPAWNGROUP_FLAG_ESCORTQUESTNPC))
+ me->SaveRespawnTime(me->GetRespawnDelay());
}
if (me->IsEngaged())
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
index 8e9d6827798..d945512a9bf 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
@@ -156,13 +156,10 @@ void FollowerAI::UpdateFollowerAI(uint32 /*uiDiff*/)
void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, uint32 quest)
{
- if (Map* map = me->GetMap())
+ if (CreatureData const* cdata = me->GetCreatureData())
{
- if (CreatureData const* cdata = me->GetCreatureData())
- {
- if (sWorld->getBoolConfig(CONFIG_RESPAWN_DYNAMIC_ESCORTNPC) && (cdata->spawnGroupData->flags & SPAWNGROUP_FLAG_ESCORTQUESTNPC))
- me->SaveRespawnTime(me->GetRespawnDelay());
- }
+ if (sWorld->getBoolConfig(CONFIG_RESPAWN_DYNAMIC_ESCORTNPC) && (cdata->spawnGroupData->flags & SPAWNGROUP_FLAG_ESCORTQUESTNPC))
+ me->SaveRespawnTime(me->GetRespawnDelay());
}
if (me->IsEngaged())