mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
fix(Scripts/DB): Quest OOX 09 - 17 - 2FE (#7792)
This commit is contained in:
committed by
GitHub
parent
9dca6381f7
commit
bb343b482e
@@ -7,12 +7,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 */
|
||||
|
||||
@@ -21,109 +20,6 @@ EndContentData */
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "ScriptMgr.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,
|
||||
FACTION_ESCORTEE_A = 774,
|
||||
FACTION_ESCORTEE_H = 775
|
||||
};
|
||||
|
||||
class npc_oox09hl : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_oox09hl() : CreatureScript("npc_oox09hl") { }
|
||||
|
||||
struct npc_oox09hlAI : public npc_escortAI
|
||||
{
|
||||
npc_oox09hlAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
|
||||
void Reset() override { }
|
||||
|
||||
void EnterCombat(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 sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_RESQUE_OOX_09)
|
||||
{
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
me->setFaction(player->GetTeamId() == TEAM_ALLIANCE ? FACTION_ESCORTEE_A : FACTION_ESCORTEE_H);
|
||||
Talk(SAY_OOX_START, player);
|
||||
npc_escortAI::Start(false, false, player->GetGUID(), quest);
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId) 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 WaypointStart(uint32 pointId) 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, dst);
|
||||
DoSummon(NPC_MARAUDING_OWL, dst, 25000, 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, dst);
|
||||
me->SummonCreature(NPC_VILE_AMBUSHER, dst, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 25000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_oox09hlAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_rinji
|
||||
######*/
|
||||
@@ -319,6 +215,5 @@ public:
|
||||
|
||||
void AddSC_hinterlands()
|
||||
{
|
||||
new npc_oox09hl();
|
||||
new npc_rinji();
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/* ScriptData
|
||||
SDName: Feralas
|
||||
SD%Complete: 100
|
||||
SDComment: Quest support: 3520, 2767, Special vendor Gregan Brewspewer
|
||||
SDComment: Quest support: 3520 Special vendor Gregan Brewspewer
|
||||
SDCategory: Feralas
|
||||
EndScriptData */
|
||||
|
||||
@@ -18,118 +18,6 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellScript.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,
|
||||
FACTION_ESCORTEE_A = 774,
|
||||
FACTION_ESCORTEE_H = 775
|
||||
};
|
||||
|
||||
class npc_oox22fe : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_oox22fe() : CreatureScript("npc_oox22fe") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_RESCUE_OOX22FE)
|
||||
{
|
||||
creature->AI()->Talk(SAY_OOX_START);
|
||||
//change that the npc is not lying dead on the ground
|
||||
creature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
|
||||
if (player->GetTeamId() == TEAM_ALLIANCE)
|
||||
creature->setFaction(FACTION_ESCORTEE_A);
|
||||
|
||||
if (player->GetTeamId() == TEAM_HORDE)
|
||||
creature->setFaction(FACTION_ESCORTEE_H);
|
||||
|
||||
if (npc_escortAI* pEscortAI = CAST_AI(npc_oox22fe::npc_oox22feAI, creature->AI()))
|
||||
pEscortAI->Start(true, false, player->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_oox22feAI(creature);
|
||||
}
|
||||
|
||||
struct npc_oox22feAI : public npc_escortAI
|
||||
{
|
||||
npc_oox22feAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
|
||||
void WaypointReached(uint32 waypointId) 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, 10000);
|
||||
me->SummonCreature(NPC_YETI, -4837.61f, 1568.58f, 78.21f, 3.13f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
me->SummonCreature(NPC_YETI, -4841.89f, 1569.95f, 76.53f, 0.68f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
break;
|
||||
//Second Ambush(3 Gorillas)
|
||||
case 21:
|
||||
Talk(SAY_OOX_AMBUSH);
|
||||
me->SummonCreature(NPC_GORILLA, -4652.76f, 1956.69f, 67.99f, 3.74f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
me->SummonCreature(NPC_GORILLA, -4654.73f, 1959.71f, 47.66f, 3.78f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
me->SummonCreature(NPC_GORILLA, -4657.01f, 1963.19f, 67.48f, 3.84f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
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, 10000);
|
||||
me->SummonCreature(NPC_WOODPAW_BRUTE, -4426.68f, 2077.98f, 47.57f, 3.77f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
me->SummonCreature(NPC_WOODPAW_MYSTIC, -4428.33f, 2080.24f, 47.43f, 3.87f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
me->SummonCreature(NPC_WOODPAW_ALPHA, -4430.04f, 2075.54f, 46.83f, 3.81f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
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 EnterCombat(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);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
enum GordunniTrap
|
||||
{
|
||||
GO_GORDUNNI_DIRT_MOUND = 144064,
|
||||
@@ -166,12 +54,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## AddSC
|
||||
######*/
|
||||
|
||||
void AddSC_feralas()
|
||||
{
|
||||
new npc_oox22fe();
|
||||
new spell_gordunni_trap();
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/* ScriptData
|
||||
SDName: Tanaris
|
||||
SD%Complete: 80
|
||||
SDComment: Quest support: 648, 1560, 2954, 4005, 10277, 10279(Special flight path). Noggenfogger vendor
|
||||
SDComment: Quest support: 1560, 2954, 4005, 10277, 10279(Special flight path). Noggenfogger vendor
|
||||
SDCategory: Tanaris
|
||||
EndScriptData */
|
||||
|
||||
@@ -16,7 +16,6 @@ npc_aquementas
|
||||
npc_custodian_of_time
|
||||
npc_steward_of_time
|
||||
npc_stone_watcher_of_norgannon
|
||||
npc_OOX17
|
||||
npc_tooga
|
||||
EndContentData */
|
||||
|
||||
@@ -378,96 +377,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") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == Q_OOX17)
|
||||
{
|
||||
creature->setFaction(113);
|
||||
creature->SetFullHealth();
|
||||
creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
creature->AI()->Talk(SAY_OOX_START);
|
||||
|
||||
if (npc_escortAI* pEscortAI = CAST_AI(npc_OOX17::npc_OOX17AI, creature->AI()))
|
||||
pEscortAI->Start(true, false, player->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_OOX17AI(creature);
|
||||
}
|
||||
|
||||
struct npc_OOX17AI : public npc_escortAI
|
||||
{
|
||||
npc_OOX17AI(Creature* creature) : npc_escortAI(creature) { }
|
||||
|
||||
void WaypointReached(uint32 waypointId) 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, 25000);
|
||||
me->SummonCreature(SPAWN_FIRST, -8355.96f, -4447.79f, 10.10f, 6.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(SPAWN_FIRST, -8353.96f, -4442.79f, 10.10f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
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, 25000);
|
||||
me->SummonCreature(SPAWN_SECOND_2, -7515.07f, -4797.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(SPAWN_SECOND_2, -7518.07f, -4792.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
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 EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
Talk(SAY_OOX_AGGRO);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
summoned->AI()->AttackStart(me);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/*####
|
||||
# npc_tooga
|
||||
####*/
|
||||
@@ -636,6 +545,5 @@ void AddSC_tanaris()
|
||||
new npc_custodian_of_time();
|
||||
new npc_steward_of_time();
|
||||
new npc_stone_watcher_of_norgannon();
|
||||
new npc_OOX17();
|
||||
new npc_tooga();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user