mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-13 23:43:44 +00:00
fix(Core/Scripts): Fix the wrong run in npc_escortAI (#23293)
Co-authored-by: 天鹭 <18535853+PkllonG@users.noreply.github.com>
This commit is contained in:
@@ -359,6 +359,7 @@ public:
|
||||
case 0:
|
||||
Talk(SAY_TEXT5);
|
||||
HandleGameObject(DATA_ARENA4, false);
|
||||
me->SetWalk(true);
|
||||
Start(false);
|
||||
eventTimer = 0;
|
||||
break;
|
||||
@@ -604,7 +605,10 @@ public:
|
||||
creature->CastSpell(creature, SPELL_DRUNKEN_RAGE, false);
|
||||
|
||||
if (npc_escortAI* escortAI = CAST_AI(npc_rocknot::npc_rocknotAI, creature->AI()))
|
||||
{
|
||||
creature->SetWalk(true);
|
||||
escortAI->Start(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -170,6 +170,7 @@ public:
|
||||
if (m_uiEventId == EVENT_OZ)
|
||||
instance->SetData(DATA_OPERA_OZ_DEATHCOUNT, IN_PROGRESS);
|
||||
|
||||
me->SetWalk(true);
|
||||
Start(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -980,6 +980,7 @@ public:
|
||||
{
|
||||
carGUID = who->GetVehicleBase()->GetGUID();
|
||||
InitWaypoint();
|
||||
me->SetWalk(true);
|
||||
Start(false, who->GetGUID());
|
||||
SetDespawnAtFar(false);
|
||||
}
|
||||
@@ -998,7 +999,7 @@ public:
|
||||
car->SetFaction(FACTION_FRIENDLY);
|
||||
}
|
||||
Talk(SAY_SCARLET_MINER_0);
|
||||
SetRun(true);
|
||||
me->SetWalk(false);
|
||||
IntroTimer = 4000;
|
||||
IntroPhase = 1;
|
||||
break;
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
break;
|
||||
case 11:
|
||||
Talk(SAY_PROGRESS_6, player);
|
||||
SetRun(true);
|
||||
me->SetWalk(false);
|
||||
break;
|
||||
case 19:
|
||||
Talk(SAY_PROGRESS_7, player);
|
||||
@@ -106,7 +106,8 @@ public:
|
||||
if (quest->GetQuestId() == QUEST_SUNKEN_TREASURE)
|
||||
{
|
||||
Talk(SAY_PROGRESS_1, player);
|
||||
npc_escortAI::Start(false, player->GetGUID(), quest);
|
||||
me->SetWalk(true);
|
||||
Start(false, player->GetGUID(), quest);
|
||||
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,8 @@ struct npc_ranger_lilatha : public npc_escortAI
|
||||
if (quest->GetQuestId() == QUEST_ESCAPE_FROM_THE_CATACOMBS)
|
||||
{
|
||||
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
|
||||
npc_escortAI::Start(true, player->GetGUID());
|
||||
me->SetWalk(true);
|
||||
Start(true, player->GetGUID());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -132,7 +132,8 @@ public:
|
||||
if (GameObject* go = me->FindNearestGameObject(GO_RINJI_CAGE, INTERACTION_DISTANCE))
|
||||
go->UseDoorOrButton();
|
||||
|
||||
npc_escortAI::Start(false, player->GetGUID(), quest);
|
||||
me->SetWalk(true);
|
||||
Start(false, player->GetGUID(), quest);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +157,7 @@ public:
|
||||
case 17:
|
||||
Talk(SAY_RIN_COMPLETE, player);
|
||||
player->GroupEventHappens(QUEST_RINJI_TRAPPED, me);
|
||||
SetRun(true);
|
||||
me->SetWalk(false);
|
||||
postEventCount = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,8 @@ public:
|
||||
if (quest->GetQuestId() == QUEST_MISSING_IN_ACTION)
|
||||
{
|
||||
Talk(SAY_CORPORAL_1, player);
|
||||
npc_escortAI::Start(true, player->GetGUID(), quest);
|
||||
me->SetWalk(true);
|
||||
Start(true, player->GetGUID(), quest);
|
||||
me->SetImmuneToNPC(false);
|
||||
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_ACTIVE);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,10 @@ public:
|
||||
creature->AI()->Talk(SAY_QUESTACCEPT, player);
|
||||
|
||||
if (npc_escortAI* pEscortAI = CAST_AI(npc_deathstalker_erland::npc_deathstalker_erlandAI, creature->AI()))
|
||||
{
|
||||
creature->SetWalk(true);
|
||||
pEscortAI->Start(true, player->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -406,6 +406,7 @@ public:
|
||||
{
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
{
|
||||
pLescovar->SetWalk(true);
|
||||
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, pLescovar->AI())->Start(false, player->GetGUID());
|
||||
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, pLescovar->AI())->SetMaxPlayerDistance(200.0f);
|
||||
}
|
||||
@@ -448,6 +449,7 @@ public:
|
||||
{
|
||||
if (Creature* pSpybot = creature->FindNearestCreature(NPC_TYRION_SPYBOT, 5.0f, true))
|
||||
{
|
||||
pSpybot->SetWalk(true);
|
||||
CAST_AI(npc_tyrion_spybot::npc_tyrion_spybotAI, pSpybot->AI())->Start(false, player->GetGUID());
|
||||
CAST_AI(npc_tyrion_spybot::npc_tyrion_spybotAI, pSpybot->AI())->SetMaxPlayerDistance(200.0f);
|
||||
}
|
||||
|
||||
@@ -916,7 +916,6 @@ public:
|
||||
|
||||
if (auto ai = CAST_AI(npc_varian_wrynn::npc_varian_wrynnAI, creature->AI()))
|
||||
{
|
||||
creature->SetWalk(false);
|
||||
ai->Start(true, player->GetGUID());
|
||||
if (Creature* jaina = GetClosestCreatureWithEntry(creature, NPC_JAINA, 50.0f))
|
||||
ai->jainaGUID = jaina->GetGUID();
|
||||
|
||||
@@ -56,7 +56,6 @@ public:
|
||||
if (quest->GetQuestId() == QUEST_TOME_VALOR)
|
||||
{
|
||||
creature->AI()->Talk(SAY_DS_START);
|
||||
creature->SetWalk(false);
|
||||
if (npc_escortAI* pEscortAI = CAST_AI(npc_daphne_stilwell::npc_daphne_stilwellAI, creature->AI()))
|
||||
pEscortAI->Start(true, player->GetGUID());
|
||||
}
|
||||
@@ -117,7 +116,7 @@ public:
|
||||
me->SummonCreature(NPC_DEFIAS_RAIDER, -11438.14f, 1607.6f, 70.94f, 4.38f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
|
||||
break;
|
||||
case 10:
|
||||
SetRun(false);
|
||||
me->SetWalk(true);
|
||||
break;
|
||||
case 11:
|
||||
Talk(SAY_DS_PROLOGUE);
|
||||
|
||||
@@ -138,7 +138,10 @@ public:
|
||||
pSlim->CastSpell(pSlim, SPELL_STEALTH, true);
|
||||
|
||||
if (npc_tapoke_slim_jahn::npc_tapoke_slim_jahnAI* pEscortAI = CAST_AI(npc_tapoke_slim_jahn::npc_tapoke_slim_jahnAI, pSlim->AI()))
|
||||
{
|
||||
pSlim->SetWalk(true);
|
||||
pEscortAI->Start(false, player->GetGUID(), quest);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user