aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authoroffl <11556157+offl@users.noreply.github.com>2025-09-09 12:03:05 +0300
committerGitHub <noreply@github.com>2025-09-09 11:03:05 +0200
commite8b921886f08fe6eb63ec74d4dd7bb0df9d3e43f (patch)
tree6c4bb491088903fdbcf98cd592fbc2b1f3ffb55e /src/server
parenteb05494f128c98cb3bfb9c98ca2d8534fbed14d5 (diff)
Scripts/Quest: Update & convert to SAI 'The Escape' (#31160)
Diffstat (limited to 'src/server')
-rw-r--r--src/server/scripts/Kalimdor/zone_the_barrens.cpp152
1 files changed, 0 insertions, 152 deletions
diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp
index 3874e7c688c..798ee849699 100644
--- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp
+++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp
@@ -466,161 +466,9 @@ public:
};
-/*#####
-## npc_wizzlecrank_shredder
-#####*/
-
-enum Wizzlecrank
-{
- SAY_MERCENARY = 0,
- SAY_START = 0,
- SAY_STARTUP1 = 1,
- SAY_STARTUP2 = 2,
- SAY_PROGRESS_1 = 3,
- SAY_PROGRESS_2 = 4,
- SAY_PROGRESS_3 = 5,
- SAY_END = 6,
-
- QUEST_ESCAPE = 863,
- NPC_PILOT_WIZZ = 3451,
- NPC_MERCENARY = 3282,
-};
-
-class npc_wizzlecrank_shredder : public CreatureScript
-{
-public:
- npc_wizzlecrank_shredder() : CreatureScript("npc_wizzlecrank_shredder") { }
-
- struct npc_wizzlecrank_shredderAI : public EscortAI
- {
- npc_wizzlecrank_shredderAI(Creature* creature) : EscortAI(creature)
- {
- IsPostEvent = false;
- PostEventTimer = 1000;
- PostEventCount = 0;
- me->SetReactState(REACT_DEFENSIVE);
- }
-
- bool IsPostEvent;
- uint32 PostEventTimer;
- uint32 PostEventCount;
-
- void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
- {
- switch (waypointId)
- {
- case 0:
- Talk(SAY_STARTUP1);
- break;
- case 9:
- SetRun(false);
- break;
- case 17:
- if (Creature* temp = me->SummonCreature(NPC_MERCENARY, 1128.489f, -3037.611f, 92.701f, 1.472f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2min))
- {
- temp->AI()->Talk(SAY_MERCENARY);
- me->SummonCreature(NPC_MERCENARY, 1160.172f, -2980.168f, 97.313f, 3.690f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2min);
- }
- break;
- case 24:
- IsPostEvent = true;
- break;
- }
- }
-
- void WaypointStarted(uint32 PointId, uint32 /*pathId*/) override
- {
- Player* player = GetPlayerForEscort();
-
- if (!player)
- return;
-
- switch (PointId)
- {
- case 9:
- Talk(SAY_STARTUP2, player);
- break;
- case 18:
- Talk(SAY_PROGRESS_1, player);
- SetRun();
- break;
- }
- }
-
- void JustSummoned(Creature* summoned) override
- {
- if (summoned->GetEntry() == NPC_PILOT_WIZZ)
- me->SetStandState(UNIT_STAND_STATE_DEAD);
-
- if (summoned->GetEntry() == NPC_MERCENARY)
- summoned->AI()->AttackStart(me);
- }
-
- void UpdateEscortAI(uint32 Diff) override
- {
- if (UpdateVictim())
- {
- DoMeleeAttackIfReady();
- return;
- }
-
- if (!IsPostEvent)
- return;
-
- if (PostEventTimer > Diff)
- {
- PostEventTimer -= Diff;
- return;
- }
-
- switch (PostEventCount)
- {
- case 0:
- Talk(SAY_PROGRESS_2);
- break;
- case 1:
- Talk(SAY_PROGRESS_3);
- break;
- case 2:
- Talk(SAY_END);
- break;
- case 3:
- if (Player* player = GetPlayerForEscort())
- {
- player->GroupEventHappens(QUEST_ESCAPE, me);
- me->DespawnOrUnsummon(5min);
- me->SummonCreature(NPC_PILOT_WIZZ, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 3min);
- }
- break;
- }
-
- ++PostEventCount;
- PostEventTimer = 5000;
- }
-
- void OnQuestAccept(Player* player, Quest const* quest) override
- {
- if (quest->GetQuestId() == QUEST_ESCAPE)
- {
- me->SetFaction(FACTION_RATCHET);
- Talk(SAY_START);
- SetDespawnAtEnd(false);
- Start(true, false, player->GetGUID());
- }
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_wizzlecrank_shredderAI(creature);
- }
-
-};
-
void AddSC_the_barrens()
{
new npc_gilthares();
new npc_taskmaster_fizzule();
new npc_twiggy_flathead();
- new npc_wizzlecrank_shredder();
}