refactor(Core): update getFaction to GetFaction and setFaction to SetFaction (#8708)

This commit is contained in:
Malcrom
2021-11-01 13:04:32 -03:00
committed by GitHub
parent 3396a9da87
commit f106de8788
129 changed files with 418 additions and 444 deletions

View File

@@ -464,7 +464,7 @@ public:
summoned->AI()->AttackStart(me);
else
{
summoned->setFaction(me->getFaction());
summoned->SetFaction(me->GetFaction());
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
@@ -553,15 +553,15 @@ public:
if (!me->IsInCombat())
{
// Do not let the raid skip straight to Archimonde. Visible and hostile ONLY if Azagalor is finished.
if ((instance->GetData(DATA_AZGALOREVENT) < DONE) && (me->IsVisible() || (me->getFaction() != 35)))
if ((instance->GetData(DATA_AZGALOREVENT) < DONE) && (me->IsVisible() || (me->GetFaction() != FACTION_FRIENDLY)))
{
me->SetVisible(false);
me->setFaction(35);
me->SetFaction(FACTION_FRIENDLY);
}
if ((instance->GetData(DATA_AZGALOREVENT) >= DONE) && (!me->IsVisible() || (me->getFaction() == 35)))
if ((instance->GetData(DATA_AZGALOREVENT) >= DONE) && (!me->IsVisible() || (me->GetFaction() == FACTION_FRIENDLY)))
{
me->setFaction(1720);
me->SetFaction(FACTION_DRAGONKIN);
me->SetVisible(true);
}

View File

@@ -910,7 +910,7 @@ void hyjalAI::HideNearPos(float x, float y)
for (std::list<Creature*>::const_iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
{
(*itr)->SetVisible(false);
(*itr)->setFaction(35);//make them friendly so mobs won't attack them
(*itr)->SetFaction(FACTION_FRIENDLY); // make them friendly so mobs won't attack them
}
}
}
@@ -988,7 +988,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
if ((*itr) && (*itr)->IsAlive())
{
(*itr)->CastSpell(*itr, SPELL_TELEPORT_VISUAL, true);
(*itr)->setFaction(35);//make them friendly so mobs won't attack them
(*itr)->SetFaction(FACTION_FRIENDLY); // make them friendly so mobs won't attack them
(*itr)->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
}

View File

@@ -471,7 +471,7 @@ public:
if (trigger)
{
trigger->SetVisible(false);
trigger->setFaction(me->getFaction());
trigger->SetFaction(me->GetFaction());
trigger->SetDisableGravity(true);
trigger->CastSpell(me, SPELL_METEOR, true);
}

View File

@@ -45,8 +45,6 @@ enum Belnistrasz
EVENT_FIREBALL = 5,
EVENT_FROST_NOVA = 6,
FACTION_ESCORT = 250,
PATH_ESCORT = 871710,
POINT_REACH_IDOL = 17,
@@ -122,7 +120,7 @@ public:
eventInProgress = true;
Talk(SAY_QUEST_ACCEPTED);
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
me->setFaction(FACTION_ESCORT);
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_ACTIVE);
me->GetMotionMaster()->MovePath(PATH_ESCORT, false);
}
}

View File

@@ -105,7 +105,7 @@ public:
//Cast
me->HandleEmoteCommand(EMOTE_ONESHOT_SUBMERGE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->setFaction(35);
me->SetFaction(FACTION_FRIENDLY);
DoCast(me, SPELL_DIRTMOUND_PASSIVE);
Submerged = true;
@@ -129,7 +129,7 @@ public:
if (Submerged && Back_Timer <= diff)
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->setFaction(14);
me->SetFaction(FACTION_MONSTER);
DoCastVictim(SPELL_GROUND_RUPTURE);

View File

@@ -319,7 +319,7 @@ struct boss_twinemperorsAI : public ScriptedAI
if (c->isDead())
{
c->Respawn();
c->setFaction(7);
c->SetFaction(FACTION_CREATURE);
c->RemoveAllAuras();
}
if (c->IsWithinDistInMap(me, ABUSE_BUG_RANGE))
@@ -414,7 +414,7 @@ public:
void CastSpellOnBug(Creature* target) override
{
target->setFaction(14);
target->SetFaction(FACTION_MONSTER);
target->AI()->AttackStart(me->getThreatMgr().getHostilTarget());
target->AddAura(SPELL_MUTATE_BUG, target);
target->SetFullHealth();
@@ -503,7 +503,7 @@ public:
void CastSpellOnBug(Creature* target) override
{
target->setFaction(14);
target->SetFaction(FACTION_MONSTER);
target->AddAura(SPELL_EXPLODEBUG, target);
target->SetFullHealth();
}

View File

@@ -65,7 +65,7 @@ public:
void InitializeAI() override
{
startedFight = false;
me->setFaction(35);
me->SetFaction(FACTION_FRIENDLY);
postGossipStep = 0;
Text_Timer = 0;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
@@ -125,7 +125,7 @@ public:
Text_Timer = 5000;
break;
case 3:
me->setFaction(14);
me->SetFaction(FACTION_MONSTER);
Player* target = ObjectAccessor::GetPlayer(*me, PlayerGUID);
switchFactionIfAlive(NPC_RAVEN, target);
@@ -186,7 +186,7 @@ public:
{
if (crew->IsAlive())
{
crew->setFaction(14);
crew->SetFaction(FACTION_MONSTER);
if (target)
{
@@ -279,7 +279,7 @@ public:
crew->SetWalk(true);
crew->SetHomePosition(x, y, z, 4.78f);
crew->GetMotionMaster()->MovePoint(1, { x, y, z, 4.78f });
crew->setFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE);
crew->SetFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE);
switch (entry)
{
@@ -470,7 +470,7 @@ public:
{
if (me->IsAlive())
{
me->setFaction(35);
me->SetFaction(FACTION_FRIENDLY);
me->SetWalk(false);
me->GetMotionMaster()->MovePoint(0, { 1858.57f, 1146.35f, 14.745f, 3.85f });
me->SetHomePosition(1858.57f, 1146.35f, 14.745f, 3.85f);

View File

@@ -29,7 +29,6 @@ EndScriptData */
enum Muglash
{
FACTION_QUEST = 113,
SAY_MUG_START1 = 0,
SAY_MUG_START2 = 1,
SAY_MUG_BRAZIER = 2,
@@ -117,7 +116,7 @@ public:
if (quest->GetQuestId() == QUEST_VORSHA)
{
Talk(SAY_MUG_START1);
me->setFaction(FACTION_QUEST);
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
npc_escortAI::Start(true, false, player->GetGUID());
}
}

View File

@@ -356,7 +356,7 @@ public:
{
Talk(SAY_RIZZLE_FINAL);
me->SetUInt32Value(UNIT_NPC_FLAGS, 1);
me->setFaction(35);
me->SetFaction(FACTION_FRIENDLY);
me->GetMotionMaster()->MoveIdle();
me->RemoveAurasDueToSpell(SPELL_PERIODIC_DEPTH_CHARGE);
Reached = true;

View File

@@ -228,8 +228,7 @@ enum Magwin
EVENT_STAND = 3,
EVENT_TALK_END = 4,
EVENT_COWLEN_TALK = 5,
QUEST_A_CRY_FOR_HELP = 9528,
FACTION_QUEST = 113
QUEST_A_CRY_FOR_HELP = 9528
};
class npc_magwin : public CreatureScript
@@ -297,7 +296,7 @@ public:
{
Talk(SAY_START, player);
}
me->setFaction(FACTION_QUEST);
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
_events.ScheduleEvent(EVENT_START_ESCORT, 1000);
break;
case EVENT_START_ESCORT:

View File

@@ -176,8 +176,7 @@ enum Kerlonian
SPELL_SLEEP_VISUAL = 25148,
SPELL_AWAKEN = 17536,
QUEST_SLEEPER_AWAKENED = 5321,
NPC_LILADRIS = 11219, //attackers entries unknown
FACTION_KER_ESCORTEE = 113
NPC_LILADRIS = 11219 //attackers entries unknown
};
/// @todo make concept similar as "ringo" -escort. Find a way to run the scripted attacks, _if_ player are choosing road.
@@ -280,7 +279,7 @@ public:
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
creature->AI()->Talk(SAY_KER_START, player);
pKerlonianAI->StartFollow(player, FACTION_KER_ESCORTEE, quest);
pKerlonianAI->StartFollow(player, FACTION_ESCORTEE_N_NEUTRAL_PASSIVE, quest);
}
}
@@ -313,7 +312,6 @@ enum Remtravel
SAY_REM_REMEMBER = 11,
EMOTE_REM_END = 12,
FACTION_ESCORTEE = 10,
QUEST_ABSENT_MINDED_PT2 = 731,
NPC_GRAVEL_SCOUT = 2158,
NPC_GRAVEL_BONE = 2159,
@@ -412,7 +410,7 @@ public:
if (npc_escortAI* pEscortAI = CAST_AI(npc_prospector_remtravel::npc_prospector_remtravelAI, creature->AI()))
pEscortAI->Start(false, false, player->GetGUID());
creature->setFaction(FACTION_ESCORTEE);
creature->SetFaction(FACTION_ESCORTEE_A_NEUTRAL_PASSIVE);
}
return true;

View File

@@ -73,7 +73,7 @@ public:
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) override
{
if (quest->GetQuestId() == QUEST_BODYGUARD_FOR_HIRE)
creature->AI()->SetGUID(player->GetGUID(), player->getFaction());
creature->AI()->SetGUID(player->GetGUID(), player->GetFaction());
return true;
}
@@ -155,7 +155,7 @@ public:
{
if (field == 1 && data == 1)
if (Player* player = me->SelectNearestPlayer(50.0f))
SetGUID(player->GetGUID(), player->getFaction());
SetGUID(player->GetGUID(), player->GetFaction());
}
bool CheckCaravan()
@@ -256,7 +256,7 @@ public:
for (uint8 i = 0; i < MAX_CARAVAN_SUMMONS; ++i)
if (Creature* summon = ObjectAccessor::GetCreature(*me, summons[i]))
{
summon->setFaction(faction);
summon->SetFaction(faction);
if (remove)
summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
else
@@ -266,7 +266,7 @@ public:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
else
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
me->setFaction(faction);
me->SetFaction(faction);
}
void WaypointReached(uint32 waypointId) override

View File

@@ -204,7 +204,7 @@ public:
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
me->setFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE);
me->SetFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE);
me->GetMotionMaster()->MoveFollow(player, 3.f, M_PI);
_events.ScheduleEvent(EVENT_WANDERING_START, urand(40 * IN_MILLISECONDS, 70 * IN_MILLISECONDS));

View File

@@ -44,9 +44,6 @@ enum EternalBoard
{
QUEST_A_PAWN_ON_THE_ETERNAL_BOARD = 8519,
FACTION_HOSTILE = 14,
FACTION_FRIENDLY = 35,
C_ANACHRONOS = 15381,
C_FANDRAL_STAGHELM = 15382,
C_ARYGOS = 15380,
@@ -919,7 +916,7 @@ public:
Merithra->SetUInt32Value(UNIT_NPC_FLAGS, 0);
Merithra->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
Merithra->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15420);
Merithra->setFaction(35);
Merithra->SetFaction(FACTION_FRIENDLY);
}
if (Caelestrasz)
@@ -927,7 +924,7 @@ public:
Caelestrasz->SetUInt32Value(UNIT_NPC_FLAGS, 0);
Caelestrasz->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
Caelestrasz->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15419);
Caelestrasz->setFaction(35);
Caelestrasz->SetFaction(FACTION_FRIENDLY);
}
if (Arygos)
@@ -935,7 +932,7 @@ public:
Arygos->SetUInt32Value(UNIT_NPC_FLAGS, 0);
Arygos->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
Arygos->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15418);
Arygos->setFaction(35);
Arygos->SetFaction(FACTION_FRIENDLY);
}
if (Anachronos)

View File

@@ -152,7 +152,7 @@ public:
pEscortAI->Start(true, false, player->GetGUID());
creature->AI()->Talk(SAY_START);
creature->setFaction(113);
creature->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
return true;

View File

@@ -75,7 +75,7 @@ public:
{
SendItemTimer = 0;
SwitchFactionTimer = 10000;
me->setFaction(35);
me->SetFaction(FACTION_FRIENDLY);
isFriendly = true;
AquaJetTimer = 5000;
@@ -109,7 +109,7 @@ public:
{
if (SwitchFactionTimer <= diff)
{
me->setFaction(91);
me->SetFaction(FACTION_ELEMENTAL);
isFriendly = false;
}
else SwitchFactionTimer -= diff;

View File

@@ -91,8 +91,7 @@ enum Gilthares
SAY_GIL_FREED = 7,
QUEST_FREE_FROM_HOLD = 898,
AREA_MERCHANT_COAST = 391,
FACTION_ESCORTEE = 232 //guessed, possible not needed for this quest
AREA_MERCHANT_COAST = 391
};
class npc_gilthares : public CreatureScript
@@ -104,7 +103,7 @@ public:
{
if (quest->GetQuestId() == QUEST_FREE_FROM_HOLD)
{
creature->setFaction(FACTION_ESCORTEE);
creature->SetFaction(FACTION_ESCORTEE_H_NEUTRAL_ACTIVE); //guessed, possible not needed for this quest
creature->SetStandState(UNIT_STAND_STATE_STAND);
creature->AI()->Talk(SAY_GIL_START, player);
@@ -197,7 +196,7 @@ public:
{
npc_taskmaster_fizzuleAI(Creature* creature) : ScriptedAI(creature)
{
factionNorm = creature->getFaction();
factionNorm = creature->GetFaction();
}
uint32 factionNorm;
@@ -210,7 +209,7 @@ public:
IsFriend = false;
ResetTimer = 120000;
FlareCount = 0;
me->setFaction(factionNorm);
me->SetFaction(factionNorm);
}
void DoFriend()
@@ -222,7 +221,7 @@ public:
me->StopMoving();
me->GetMotionMaster()->MoveIdle();
me->setFaction(FACTION_FRIENDLY_F);
me->SetFaction(FACTION_FRIENDLY);
me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
}
@@ -263,7 +262,7 @@ public:
{
if (FlareCount >= 2)
{
if (me->getFaction() == FACTION_FRIENDLY_F)
if (me->GetFaction() == FACTION_FRIENDLY_F)
return;
DoFriend();
@@ -408,7 +407,7 @@ public:
Creature* creature = me->SummonCreature(NPC_AFFRAY_CHALLENGER, AffrayChallengerLoc[i], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000);
if (!creature)
continue;
creature->setFaction(35);
creature->SetFaction(FACTION_FRIENDLY);
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
@@ -450,7 +449,7 @@ public:
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
creature->setFaction(14);
creature->SetFaction(FACTION_MONSTER);
creature->AI()->AttackStart(pWarrior);
}
++Wave;
@@ -481,7 +480,7 @@ public:
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
creature->setFaction(14);
creature->SetFaction(FACTION_MONSTER);
creature->AI()->AttackStart(pWarrior);
}
WaveTimer = 2000;
@@ -511,7 +510,6 @@ enum Wizzlecrank
SAY_END = 6,
QUEST_ESCAPE = 863,
FACTION_RATCHET = 637,
NPC_PILOT_WIZZ = 3451,
NPC_MERCENARY = 3282,
};
@@ -644,7 +642,7 @@ public:
{
if (quest->GetQuestId() == QUEST_ESCAPE)
{
creature->setFaction(FACTION_RATCHET);
creature->SetFaction(FACTION_RATCHET);
creature->AI()->Talk(SAY_START);
if (npc_escortAI* pEscortAI = CAST_AI(npc_wizzlecrank_shredder::npc_wizzlecrank_shredderAI, creature->AI()))
pEscortAI->Start(true, false, player->GetGUID());

View File

@@ -50,7 +50,6 @@ enum Lakota
QUEST_FREE_AT_LAST = 4904,
NPC_GRIM_BANDIT = 10758,
FACTION_ESCORTEE_LAKO = 232, //guessed
ID_AMBUSH_1 = 0,
ID_AMBUSH_2 = 2,
@@ -77,7 +76,7 @@ public:
if (quest->GetQuestId() == QUEST_FREE_AT_LAST)
{
creature->AI()->Talk(SAY_LAKO_START, player);
creature->setFaction(FACTION_ESCORTEE_LAKO);
creature->SetFaction(FACTION_ESCORTEE_H_NEUTRAL_ACTIVE); //guessed
if (npc_lakota_windsongAI* pEscortAI = CAST_AI(npc_lakota_windsong::npc_lakota_windsongAI, creature->AI()))
pEscortAI->Start(false, false, player->GetGUID(), quest);
@@ -138,8 +137,7 @@ enum Packa
SAY_COMPLETE = 2,
QUEST_HOMEWARD = 4770,
NPC_WYVERN = 4107,
FACTION_ESCORTEE = 232 //guessed
NPC_WYVERN = 4107
};
Position const WyvernLoc[3] =
@@ -159,7 +157,7 @@ public:
if (quest->GetQuestId() == QUEST_HOMEWARD)
{
creature->AI()->Talk(SAY_START, player);
creature->setFaction(FACTION_ESCORTEE);
creature->SetFaction(FACTION_ESCORTEE_H_NEUTRAL_ACTIVE); // guessed
if (npc_paoka_swiftmountainAI* pEscortAI = CAST_AI(npc_paoka_swiftmountain::npc_paoka_swiftmountainAI, creature->AI()))
pEscortAI->Start(false, false, player->GetGUID(), quest);
@@ -212,7 +210,6 @@ public:
enum Plucky
{
FACTION_FRIENDLY = 35,
QUEST_SCOOP = 1950,
SPELL_PLUCKY_HUMAN = 9192,
SPELL_PLUCKY_CHICKEN = 9220
@@ -253,7 +250,7 @@ public:
struct npc_pluckyAI : public ScriptedAI
{
npc_pluckyAI(Creature* creature) : ScriptedAI(creature) { NormFaction = creature->getFaction(); }
npc_pluckyAI(Creature* creature) : ScriptedAI(creature) { NormFaction = creature->GetFaction(); }
uint32 NormFaction;
uint32 ResetTimer;
@@ -262,8 +259,8 @@ public:
{
ResetTimer = 120000;
if (me->getFaction() != NormFaction)
me->setFaction(NormFaction);
if (me->GetFaction() != NormFaction)
me->SetFaction(NormFaction);
if (me->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
@@ -277,7 +274,7 @@ public:
{
if (TextEmote == TEXT_EMOTE_BECKON)
{
me->setFaction(FACTION_FRIENDLY);
me->SetFaction(FACTION_FRIENDLY);
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
DoCast(me, SPELL_PLUCKY_HUMAN, false);
}
@@ -289,7 +286,7 @@ public:
return;
else
{
me->setFaction(FACTION_FRIENDLY);
me->SetFaction(FACTION_FRIENDLY);
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
DoCast(me, SPELL_PLUCKY_HUMAN, false);
me->HandleEmoteCommand(EMOTE_ONESHOT_WAVE);

View File

@@ -64,7 +64,7 @@ public:
creature->AI()->Talk(SAY_READY, player);
creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
// Change faction so mobs attack
creature->setFaction(113);
creature->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
}
return true;
}
@@ -164,8 +164,7 @@ enum Ringo
SPELL_REVIVE_RINGO = 15591,
QUEST_A_LITTLE_HELP = 4491,
NPC_SPRAGGLE = 9997,
FACTION_ESCORTEE = 113
NPC_SPRAGGLE = 9997
};
class npc_ringo : public CreatureScript
@@ -180,7 +179,7 @@ public:
if (npc_ringoAI* ringoAI = CAST_AI(npc_ringo::npc_ringoAI, creature->AI()))
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
ringoAI->StartFollow(player, FACTION_ESCORTEE, quest);
ringoAI->StartFollow(player, FACTION_ESCORTEE_N_NEUTRAL_PASSIVE, quest);
}
}

View File

@@ -297,7 +297,7 @@ public:
if (quest->GetQuestId() == QUEST_GUARDIANS_ALTAR)
{
creature->AI()->Talk(SAY_QUEST_START);
creature->setFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE);
creature->SetFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE);
if (npc_ranshallaAI* escortAI = dynamic_cast<npc_ranshallaAI*>(creature->AI()))
escortAI->Start(false, false, player->GetGUID(), quest);