diff options
author | offl <offl@users.noreply.github.com> | 2020-09-12 22:18:32 +0300 |
---|---|---|
committer | offl <offl@users.noreply.github.com> | 2020-09-12 22:18:32 +0300 |
commit | 8c303e4f979cff5c34f228054cea4e81bb70c11c (patch) | |
tree | 5cd2e0d5280a24ec3202953b714fd5c4d36853b8 /src | |
parent | 090e3da96b101bb29aa0691e5856bd27ff06b0cd (diff) |
DB/Quest: Convert & update Homing Robot chickens to SAI
Closes #25239
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/EasternKingdoms/zone_hinterlands.cpp | 103 | ||||
-rw-r--r-- | src/server/scripts/Kalimdor/zone_feralas.cpp | 116 | ||||
-rw-r--r-- | src/server/scripts/Kalimdor/zone_tanaris.cpp | 92 |
3 files changed, 3 insertions, 308 deletions
diff --git a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp index bfe0851a5af..33fa4724221 100644 --- a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp @@ -18,12 +18,11 @@ /* ScriptData SDName: Hinterlands SD%Complete: 100 -SDComment: Quest support: 863, 2742 +SDComment: Quest support: 2742 SDCategory: The Hinterlands EndScriptData */ /* ContentData -npc_oox09hl npc_rinji EndContentData */ @@ -34,105 +33,6 @@ EndContentData */ #include "ScriptedEscortAI.h" /*###### -## npc_oox09hl -######*/ - -enum OOX -{ - SAY_OOX_START = 0, - SAY_OOX_AGGRO = 1, - SAY_OOX_AMBUSH = 2, - SAY_OOX_AMBUSH_REPLY = 3, - SAY_OOX_END = 4, - QUEST_RESQUE_OOX_09 = 836, - NPC_MARAUDING_OWL = 7808, - NPC_VILE_AMBUSHER = 7809 -}; - -class npc_oox09hl : public CreatureScript -{ -public: - npc_oox09hl() : CreatureScript("npc_oox09hl") { } - - struct npc_oox09hlAI : public EscortAI - { - npc_oox09hlAI(Creature* creature) : EscortAI(creature) { } - - void Reset() override { } - - void JustEngagedWith(Unit* who) override - { - if (who->GetEntry() == NPC_MARAUDING_OWL || who->GetEntry() == NPC_VILE_AMBUSHER) - return; - - Talk(SAY_OOX_AGGRO); - } - - void JustSummoned(Creature* summoned) override - { - summoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()); - } - - void OnQuestAccept(Player* player, Quest const* quest) override - { - if (quest->GetQuestId() == QUEST_RESQUE_OOX_09) - { - me->SetStandState(UNIT_STAND_STATE_STAND); - me->SetFaction(player->GetTeam() == ALLIANCE ? FACTION_ESCORTEE_A_PASSIVE : FACTION_ESCORTEE_H_PASSIVE); - Talk(SAY_OOX_START, player); - EscortAI::Start(false, false, player->GetGUID(), quest); - } - } - - void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override - { - switch (waypointId) - { - case 26: - Talk(SAY_OOX_AMBUSH); - break; - case 43: - Talk(SAY_OOX_AMBUSH); - break; - case 64: - Talk(SAY_OOX_END); - if (Player* player = GetPlayerForEscort()) - player->GroupEventHappens(QUEST_RESQUE_OOX_09, me); - break; - } - } - - void WaypointStarted(uint32 pointId, uint32 /*pathId*/) override - { - switch (pointId) - { - case 27: - for (uint8 i = 0; i < 3; ++i) - { - const Position src = {147.927444f, -3851.513428f, 130.893f, 0}; - Position dst = me->GetRandomPoint(src, 7.0f); - DoSummon(NPC_MARAUDING_OWL, dst, 25s, TEMPSUMMON_CORPSE_TIMED_DESPAWN); - } - break; - case 44: - for (uint8 i = 0; i < 3; ++i) - { - const Position src = {-141.151581f, -4291.213867f, 120.130f, 0}; - Position dst = me->GetRandomPoint(src, 7.0f); - me->SummonCreature(NPC_VILE_AMBUSHER, dst, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 25s); - } - break; - } - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_oox09hlAI(creature); - } -}; - -/*###### ## npc_rinji ######*/ @@ -324,6 +224,5 @@ public: void AddSC_hinterlands() { - new npc_oox09hl(); new npc_rinji(); } diff --git a/src/server/scripts/Kalimdor/zone_feralas.cpp b/src/server/scripts/Kalimdor/zone_feralas.cpp index 8af8057c3f5..2754c3e1725 100644 --- a/src/server/scripts/Kalimdor/zone_feralas.cpp +++ b/src/server/scripts/Kalimdor/zone_feralas.cpp @@ -18,12 +18,11 @@ /* ScriptData SDName: Feralas SD%Complete: 100 -SDComment: Quest support: 2767, 2987 +SDComment: Quest support: 2987 SDCategory: Feralas EndScriptData */ /* ContentData -npc_oox22fe spell_gordunni_trap EndContentData */ @@ -37,114 +36,6 @@ EndContentData */ #include "WorldSession.h" /*###### -## npc_oox22fe -######*/ - -enum OOX -{ - SAY_OOX_START = 0, - SAY_OOX_AGGRO = 1, - SAY_OOX_AMBUSH = 2, - SAY_OOX_END = 3, - - NPC_YETI = 7848, - NPC_GORILLA = 5260, - NPC_WOODPAW_REAVER = 5255, - NPC_WOODPAW_BRUTE = 5253, - NPC_WOODPAW_ALPHA = 5258, - NPC_WOODPAW_MYSTIC = 5254, - - QUEST_RESCUE_OOX22FE = 2767 -}; - -class npc_oox22fe : public CreatureScript -{ -public: - npc_oox22fe() : CreatureScript("npc_oox22fe") { } - - struct npc_oox22feAI : public EscortAI - { - npc_oox22feAI(Creature* creature) : EscortAI(creature) { } - - void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override - { - switch (waypointId) - { - // First Ambush(3 Yetis) - case 11: - Talk(SAY_OOX_AMBUSH); - me->SummonCreature(NPC_YETI, -4841.01f, 1593.91f, 73.42f, 3.98f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10s); - me->SummonCreature(NPC_YETI, -4837.61f, 1568.58f, 78.21f, 3.13f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10s); - me->SummonCreature(NPC_YETI, -4841.89f, 1569.95f, 76.53f, 0.68f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10s); - break; - //Second Ambush(3 Gorillas) - case 21: - Talk(SAY_OOX_AMBUSH); - me->SummonCreature(NPC_GORILLA, -4595.81f, 2005.99f, 53.08f, 3.74f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10s); - me->SummonCreature(NPC_GORILLA, -4597.53f, 2008.31f, 52.70f, 3.78f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10s); - me->SummonCreature(NPC_GORILLA, -4599.37f, 2010.59f, 52.77f, 3.84f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10s); - break; - //Third Ambush(4 Gnolls) - case 30: - Talk(SAY_OOX_AMBUSH); - me->SummonCreature(NPC_WOODPAW_REAVER, -4425.14f, 2075.87f, 47.77f, 3.77f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10s); - me->SummonCreature(NPC_WOODPAW_BRUTE, -4426.68f, 2077.98f, 47.57f, 3.77f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10s); - me->SummonCreature(NPC_WOODPAW_MYSTIC, -4428.33f, 2080.24f, 47.43f, 3.87f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10s); - me->SummonCreature(NPC_WOODPAW_ALPHA, -4430.04f, 2075.54f, 46.83f, 3.81f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10s); - break; - case 37: - Talk(SAY_OOX_END); - // Award quest credit - if (Player* player = GetPlayerForEscort()) - player->GroupEventHappens(QUEST_RESCUE_OOX22FE, me); - break; - } - } - - void Reset() override - { - if (!HasEscortState(STATE_ESCORT_ESCORTING)) - me->SetStandState(UNIT_STAND_STATE_DEAD); - } - - void JustEngagedWith(Unit* /*who*/) override - { - //For an small probability the npc says something when he get aggro - if (urand(0, 9) > 7) - Talk(SAY_OOX_AGGRO); - } - - void JustSummoned(Creature* summoned) override - { - summoned->AI()->AttackStart(me); - } - - void OnQuestAccept(Player* player, Quest const* quest) override - { - if (quest->GetQuestId() == QUEST_RESCUE_OOX22FE) - { - Talk(SAY_OOX_START); - //change that the npc is not lying dead on the ground - me->SetStandState(UNIT_STAND_STATE_STAND); - - if (player->GetTeam() == ALLIANCE) - me->SetFaction(FACTION_ESCORTEE_A_PASSIVE); - - if (player->GetTeam() == HORDE) - me->SetFaction(FACTION_ESCORTEE_H_PASSIVE); - - Start(true, false, player->GetGUID()); - } - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_oox22feAI(creature); - } -}; - -/*###### ## spell_gordunni_trap ######*/ @@ -181,12 +72,7 @@ class spell_gordunni_trap : public SpellScriptLoader } }; -/*###### -## AddSC -######*/ - void AddSC_feralas() { - new npc_oox22fe(); new spell_gordunni_trap(); } diff --git a/src/server/scripts/Kalimdor/zone_tanaris.cpp b/src/server/scripts/Kalimdor/zone_tanaris.cpp index 656c37bfd50..144bc19932a 100644 --- a/src/server/scripts/Kalimdor/zone_tanaris.cpp +++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp @@ -18,13 +18,12 @@ /* ScriptData SDName: Tanaris SD%Complete: 80 -SDComment: Quest support: 648, 1560, 4005, 10277 +SDComment: Quest support: 1560, 4005, 10277 SDCategory: Tanaris EndScriptData */ /* ContentData npc_custodian_of_time -npc_OOX17 npc_tooga EndContentData */ @@ -173,94 +172,6 @@ public: }; -/*###### -## npc_OOX17 -######*/ - -enum Npc00X17 -{ - SAY_OOX_START = 0, - SAY_OOX_AGGRO = 1, - SAY_OOX_AMBUSH = 2, - SAY_OOX17_AMBUSH_REPLY = 0, - SAY_OOX_END = 3, - - Q_OOX17 = 648, - SPAWN_FIRST = 7803, - SPAWN_SECOND_1 = 5617, - SPAWN_SECOND_2 = 7805 -}; - -class npc_OOX17 : public CreatureScript -{ -public: - npc_OOX17() : CreatureScript("npc_OOX17") { } - - struct npc_OOX17AI : public EscortAI - { - npc_OOX17AI(Creature* creature) : EscortAI(creature) { } - - void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override - { - if (Player* player = GetPlayerForEscort()) - { - switch (waypointId) - { - case 23: - me->SummonCreature(SPAWN_FIRST, -8350.96f, -4445.79f, 10.10f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25s); - me->SummonCreature(SPAWN_FIRST, -8355.96f, -4447.79f, 10.10f, 6.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25s); - me->SummonCreature(SPAWN_FIRST, -8353.96f, -4442.79f, 10.10f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25s); - Talk(SAY_OOX_AMBUSH); - break; - case 56: - me->SummonCreature(SPAWN_SECOND_1, -7510.07f, -4795.50f, 9.35f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25s); - me->SummonCreature(SPAWN_SECOND_2, -7515.07f, -4797.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25s); - me->SummonCreature(SPAWN_SECOND_2, -7518.07f, -4792.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25s); - Talk(SAY_OOX_AMBUSH); - if (Creature* scoff = me->FindNearestCreature(SPAWN_SECOND_2, 30)) - scoff->AI()->Talk(SAY_OOX17_AMBUSH_REPLY); - break; - case 86: - Talk(SAY_OOX_END); - player->GroupEventHappens(Q_OOX17, me); - break; - } - } - } - - void Reset() override { } - - void JustEngagedWith(Unit* /*who*/) override - { - Talk(SAY_OOX_AGGRO); - } - - void JustSummoned(Creature* summoned) override - { - summoned->AI()->AttackStart(me); - } - - void OnQuestAccept(Player* player, Quest const* quest) override - { - if (quest->GetQuestId() == Q_OOX17) - { - me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE); - me->SetFullHealth(); - me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - me->SetImmuneToPC(false); - Talk(SAY_OOX_START); - - Start(true, false, player->GetGUID()); - } - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_OOX17AI(creature); - } -}; - /*#### # npc_tooga ####*/ @@ -425,6 +336,5 @@ public: void AddSC_tanaris() { new npc_custodian_of_time(); - new npc_OOX17(); new npc_tooga(); } |