fix(DB/SAI):Twilight Discipline and Twilight Thug scripts(talks an… (#8023)

Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
This commit is contained in:
Ragelezz
2021-11-05 06:51:13 +02:00
committed by GitHub
parent 79d40424f5
commit 10ec5a802d
2 changed files with 129 additions and 117 deletions
@@ -0,0 +1,12 @@
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1632248054324754400');
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2338) AND (`source_type` = 0) AND (`id` IN (2, 3));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(2338, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Twilight Disciple - On Aggro - Talk 0'),
(2338, 0, 3, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Twilight Disciple - On Death - Talk 1');
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2339) AND (`source_type` = 0) AND (`id` IN (3, 4));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(2339, 0, 3, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Twilight Thug - On Aggro - Talk 0'),
(2339, 0, 4, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Twilight Thug - On Death - Talk 1');
+117 -117
View File
@@ -28,31 +28,31 @@ npc_prospector_remtravel
EndContentData */ EndContentData */
#include "Player.h" #include "Player.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h" #include "ScriptedCreature.h"
#include "ScriptedEscortAI.h" #include "ScriptedEscortAI.h"
#include "ScriptedFollowerAI.h" #include "ScriptedFollowerAI.h"
#include "ScriptedGossip.h" #include "ScriptedGossip.h"
#include "ScriptMgr.h"
#include "SpellInfo.h" #include "SpellInfo.h"
// Ours // Ours
enum murkdeep enum murkdeep
{ {
NPC_GREYMIST_HUNTER = 2206, NPC_GREYMIST_HUNTER = 2206,
NPC_GREYMIST_WARRIOR = 2205, NPC_GREYMIST_WARRIOR = 2205,
NPC_GREYMIST_COASTRUNNER = 2202, NPC_GREYMIST_COASTRUNNER = 2202,
SPELL_SUNDER_ARMOR = 11971, SPELL_SUNDER_ARMOR = 11971,
SPELL_NET = 6533, SPELL_NET = 6533,
EVENT_SPELL_SUNDER_ARMOR = 2, EVENT_SPELL_SUNDER_ARMOR = 2,
EVENT_SPELL_NET = 3, EVENT_SPELL_NET = 3,
}; };
class npc_murkdeep : public CreatureScript class npc_murkdeep : public CreatureScript
{ {
public: public:
npc_murkdeep() : CreatureScript("npc_murkdeep") { } npc_murkdeep() : CreatureScript("npc_murkdeep") {}
CreatureAI* GetAI(Creature* creature) const override CreatureAI* GetAI(Creature* creature) const override
{ {
@@ -63,14 +63,14 @@ public:
{ {
npc_murkdeepAI(Creature* c) : ScriptedAI(c) {} npc_murkdeepAI(Creature* c) : ScriptedAI(c) {}
uint8 phase; uint8 phase;
uint32 spawnTimer; uint32 spawnTimer;
EventMap events; EventMap events;
void Reset() override void Reset() override
{ {
spawnTimer = 0; spawnTimer = 0;
phase = 0; phase = 0;
me->SetVisible(false); me->SetVisible(false);
me->SetReactState(REACT_PASSIVE); me->SetReactState(REACT_PASSIVE);
} }
@@ -90,48 +90,48 @@ public:
spawnTimer = 0; spawnTimer = 0;
switch (phase) switch (phase)
{ {
case 0: case 0:
if (!me->FindNearestCreature(NPC_GREYMIST_WARRIOR, 80.0f, true) && !me->FindNearestCreature(NPC_GREYMIST_HUNTER, 80.0f, true)) if (!me->FindNearestCreature(NPC_GREYMIST_WARRIOR, 80.0f, true) && !me->FindNearestCreature(NPC_GREYMIST_HUNTER, 80.0f, true))
{ {
Player* player = me->SelectNearestPlayer(100.0f); Player* player = me->SelectNearestPlayer(100.0f);
if (!player) if (!player)
return; return;
phase++; phase++;
for (int i = 0; i < 3; ++i) for (int i = 0; i < 3; ++i)
if (Creature* cr = me->SummonCreature(NPC_GREYMIST_COASTRUNNER, me->GetPositionX() + irand(-5, 5), me->GetPositionY() + irand(-5, 5), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) if (Creature* cr = me->SummonCreature(NPC_GREYMIST_COASTRUNNER, me->GetPositionX() + irand(-5, 5), me->GetPositionY() + irand(-5, 5), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
cr->AI()->AttackStart(player);
}
return;
case 1:
if (!me->FindNearestCreature(NPC_GREYMIST_COASTRUNNER, 80.0f))
{
Player* player = me->SelectNearestPlayer(100.0f);
if (!player)
return;
phase++;
for (int i = 0; i < 2; ++i)
if (Creature* cr = me->SummonCreature(NPC_GREYMIST_WARRIOR, me->GetPositionX() + irand(-5, 5), me->GetPositionY() + irand(-5, 5), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
cr->AI()->AttackStart(player);
}
return;
case 2:
if (!me->FindNearestCreature(NPC_GREYMIST_WARRIOR, 80.0f))
{
Player* player = me->SelectNearestPlayer(100.0f);
if (!player)
return;
phase++;
if (Creature* cr = me->SummonCreature(NPC_GREYMIST_HUNTER, me->GetPositionX() + irand(-5, 5), me->GetPositionY() + irand(-5, 5), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
cr->AI()->AttackStart(player); cr->AI()->AttackStart(player);
}
return;
case 1:
if (!me->FindNearestCreature(NPC_GREYMIST_COASTRUNNER, 80.0f))
{
Player* player = me->SelectNearestPlayer(100.0f);
if (!player)
return;
me->SetReactState(REACT_AGGRESSIVE); phase++;
me->SetVisible(true); for (int i = 0; i < 2; ++i)
AttackStart(player); if (Creature* cr = me->SummonCreature(NPC_GREYMIST_WARRIOR, me->GetPositionX() + irand(-5, 5), me->GetPositionY() + irand(-5, 5), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
} cr->AI()->AttackStart(player);
return; }
return;
case 2:
if (!me->FindNearestCreature(NPC_GREYMIST_WARRIOR, 80.0f))
{
Player* player = me->SelectNearestPlayer(100.0f);
if (!player)
return;
phase++;
if (Creature* cr = me->SummonCreature(NPC_GREYMIST_HUNTER, me->GetPositionX() + irand(-5, 5), me->GetPositionY() + irand(-5, 5), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
cr->AI()->AttackStart(player);
me->SetReactState(REACT_AGGRESSIVE);
me->SetVisible(true);
AttackStart(player);
}
return;
} }
} }
@@ -144,14 +144,14 @@ public:
events.Update(diff); events.Update(diff);
switch (events.ExecuteEvent()) switch (events.ExecuteEvent())
{ {
case EVENT_SPELL_SUNDER_ARMOR: case EVENT_SPELL_SUNDER_ARMOR:
me->CastSpell(me->GetVictim(), SPELL_SUNDER_ARMOR, false); me->CastSpell(me->GetVictim(), SPELL_SUNDER_ARMOR, false);
events.ScheduleEvent(EVENT_SPELL_SUNDER_ARMOR, 15000); events.ScheduleEvent(EVENT_SPELL_SUNDER_ARMOR, 15000);
break; break;
case EVENT_SPELL_NET: case EVENT_SPELL_NET:
me->CastSpell(me->GetVictim(), SPELL_NET, false); me->CastSpell(me->GetVictim(), SPELL_NET, false);
events.ScheduleEvent(EVENT_SPELL_NET, 25000); events.ScheduleEvent(EVENT_SPELL_NET, 25000);
break; break;
} }
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
@@ -183,11 +183,11 @@ enum Kerlonian
class npc_kerlonian : public CreatureScript class npc_kerlonian : public CreatureScript
{ {
public: public:
npc_kerlonian() : CreatureScript("npc_kerlonian") { } npc_kerlonian() : CreatureScript("npc_kerlonian") {}
struct npc_kerlonianAI : public FollowerAI struct npc_kerlonianAI : public FollowerAI
{ {
npc_kerlonianAI(Creature* creature) : FollowerAI(creature) { } npc_kerlonianAI(Creature* creature) : FollowerAI(creature) {}
uint32 FallAsleepTimer; uint32 FallAsleepTimer;
@@ -321,13 +321,13 @@ enum Remtravel
class npc_prospector_remtravel : public CreatureScript class npc_prospector_remtravel : public CreatureScript
{ {
public: public:
npc_prospector_remtravel() : CreatureScript("npc_prospector_remtravel") { } npc_prospector_remtravel() : CreatureScript("npc_prospector_remtravel") {}
struct npc_prospector_remtravelAI : public npc_escortAI struct npc_prospector_remtravelAI : public npc_escortAI
{ {
npc_prospector_remtravelAI(Creature* creature) : npc_escortAI(creature) { } npc_prospector_remtravelAI(Creature* creature) : npc_escortAI(creature) {}
void Reset() override { } void Reset() override {}
void EnterCombat(Unit* who) override void EnterCombat(Unit* who) override
{ {
@@ -337,8 +337,8 @@ public:
void JustSummoned(Creature* /*pSummoned*/) override void JustSummoned(Creature* /*pSummoned*/) override
{ {
//unsure if it should be any // unsure if it should be any
//pSummoned->AI()->AttackStart(me); // pSummoned->AI()->AttackStart(me);
} }
void WaypointReached(uint32 waypointId) override void WaypointReached(uint32 waypointId) override
@@ -347,57 +347,57 @@ public:
{ {
switch (waypointId) switch (waypointId)
{ {
case 0: case 0:
Talk(SAY_REM_START, player); Talk(SAY_REM_START, player);
break; break;
case 5: case 5:
Talk(SAY_REM_RAMP1_1, player); Talk(SAY_REM_RAMP1_1, player);
break; break;
case 6: case 6:
DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break; break;
case 9: case 9:
Talk(SAY_REM_RAMP1_2, player); Talk(SAY_REM_RAMP1_2, player);
break; break;
case 14: case 14:
//depend quest rewarded? // depend quest rewarded?
Talk(SAY_REM_BOOK, player); Talk(SAY_REM_BOOK, player);
break; break;
case 15: case 15:
Talk(SAY_REM_TENT1_1, player); Talk(SAY_REM_TENT1_1, player);
break; break;
case 16: case 16:
DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break; break;
case 17: case 17:
Talk(SAY_REM_TENT1_2, player); Talk(SAY_REM_TENT1_2, player);
break; break;
case 26: case 26:
Talk(SAY_REM_MOSS, player); Talk(SAY_REM_MOSS, player);
break; break;
case 27: case 27:
Talk(EMOTE_REM_MOSS, player); Talk(EMOTE_REM_MOSS, player);
break; break;
case 28: case 28:
Talk(SAY_REM_MOSS_PROGRESS, player); Talk(SAY_REM_MOSS_PROGRESS, player);
break; break;
case 29: case 29:
DoSpawnCreature(NPC_GRAVEL_SCOUT, -15.0f, 3.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); DoSpawnCreature(NPC_GRAVEL_SCOUT, -15.0f, 3.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_GRAVEL_BONE, -15.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); DoSpawnCreature(NPC_GRAVEL_BONE, -15.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_GRAVEL_GEO, -15.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); DoSpawnCreature(NPC_GRAVEL_GEO, -15.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break; break;
case 31: case 31:
Talk(SAY_REM_PROGRESS, player); Talk(SAY_REM_PROGRESS, player);
break; break;
case 41: case 41:
Talk(SAY_REM_REMEMBER, player); Talk(SAY_REM_REMEMBER, player);
break; break;
case 42: case 42:
Talk(EMOTE_REM_END, player); Talk(EMOTE_REM_END, player);
player->GroupEventHappens(QUEST_ABSENT_MINDED_PT2, me); player->GroupEventHappens(QUEST_ABSENT_MINDED_PT2, me);
break; break;
} }
} }
} }