aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_06_25_07_world_creature_text.sql13
-rw-r--r--sql/updates/world/2013_06_30_09_world_misc.sql44
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h7
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp23
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp15
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp79
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp103
7 files changed, 227 insertions, 57 deletions
diff --git a/sql/updates/world/2013_06_25_07_world_creature_text.sql b/sql/updates/world/2013_06_25_07_world_creature_text.sql
index ad52bbac254..dc7ec7f563e 100644
--- a/sql/updates/world/2013_06_25_07_world_creature_text.sql
+++ b/sql/updates/world/2013_06_25_07_world_creature_text.sql
@@ -1,6 +1,6 @@
-- Text for Lord Victor Nefarius from sniff
SET @VICTOR := 10162;
-DELETE FROM `creature_text` WHERE `entry` IN (@VICTOR,@REND);
+DELETE FROM `creature_text` WHERE `entry` IN (@VICTOR);
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
-- Lord Victor Nefarius texts UBRS
(@VICTOR,0,0,"Excellent... it would appear as if the meddlesome insects have arrived just in time to feed my legion. Welcome, mortals!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'),
@@ -12,9 +12,10 @@ INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`pr
(@VICTOR,6,0,"Use the freezing breath, imbecile!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'),
(@VICTOR,7,0,"THIS CANNOT BE!!! Rend, deal with these insects.",14,0,100,0,0,0,'Lord Victor Nefarius (UBRS)'),
(@VICTOR,8,0,"The Warchief shall make quick work of you, mortals. Prepare yourselves!",14,0,100,25,0,0,'Lord Victor Nefarius (UBRS)'),
-(@VICTOR,9,0,"Your victory shall be short lived. The days of both the Alliance and Horde are coming to an end! The next time we meet shall be the last.",14,0,100,5,0,0,'Lord Victor Nefarius (UBRS)'),
-(@VICTOR,10,0,"The mortals have fallen! The new age of the Blackrock legion is at hand!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,9,0,"Taste in my power!",14,0,100,0,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,10,0,"Your victory shall be short lived. The days of both the Alliance and Horde are coming to an end! The next time we meet shall be the last.",14,0,100,5,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,11,0,"The mortals have fallen! The new age of the Blackrock legion is at hand!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'),
-- Lord Victor Nefarius texts BWL
-(@VICTOR,11,0,"In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say...",14,0,100,1,0,0,'Lord Victor Nefarius SAY_GAMESBEGIN_1 (BWL)'),
-(@VICTOR,12,0,"Let the games begin!",14,0,100,22,0,8280,'Lord Victor Nefarius SAY_GAMESBEGIN_2 (BWL)'),
-(@VICTOR,13,0,"Ah, the heroes. You are persistent, aren't you. Your allied attempted to match his power against mine, and had to pay the price. Now he shall serve me, by slaughtering you. Get up, little red wyrm...and destroy them!",14,0,100,23,0,8279,'Lord Victor Nefarius SAY_VAEL_INTRO (BWL)');
+(@VICTOR,12,0,"In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say...",14,0,100,1,0,0,'Lord Victor Nefarius SAY_GAMESBEGIN_1 (BWL)'),
+(@VICTOR,13,0,"Let the games begin!",14,0,100,22,0,8280,'Lord Victor Nefarius SAY_GAMESBEGIN_2 (BWL)'),
+(@VICTOR,14,0,"Ah, the heroes. You are persistent, aren't you. Your allied attempted to match his power against mine, and had to pay the price. Now he shall serve me, by slaughtering you. Get up, little red wyrm...and destroy them!",14,0,100,23,0,8279,'Lord Victor Nefarius SAY_VAEL_INTRO (BWL)');
diff --git a/sql/updates/world/2013_06_30_09_world_misc.sql b/sql/updates/world/2013_06_30_09_world_misc.sql
new file mode 100644
index 00000000000..10708ed06b3
--- /dev/null
+++ b/sql/updates/world/2013_06_30_09_world_misc.sql
@@ -0,0 +1,44 @@
+UPDATE `creature_template` SET `resistance2`=1000 WHERE `entry` IN (9816);
+UPDATE `creature_template` SET `mechanic_immune_mask`=617299803 WHERE `entry` IN (10339);
+UPDATE `creature_template` SET `spell1`=0, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry` IN (9816,10339,10429);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=16337 AND `ConditionValue2`=10429;
+UPDATE `creature_template` SET `unit_flags`=32832 WHERE `entry` IN (10317,10318);
+
+-- Pathing for Warchief Rend Blackhand Entry: 10429
+SET @PATH := 1379680;
+DELETE FROM `waypoint_data` WHERE `id` IN (@PATH);
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,165.4778,-452.2761,121.9753,0,0,1,0,100,0),
+(@PATH,2,165.5801,-457.3273,121.9753,0,0,1,0,100,0),
+(@PATH,3,165.5504,-465.8904,116.8073,0,0,1,0,100,0),
+(@PATH,4,165.3594,-470.635,116.8296,0,0,1,0,100,0),
+(@PATH,5,168.4351,-473.7489,116.8424,0,0,1,0,100,0),
+(@PATH,6,179.0059,-473.894,116.8424,0,52000,1,0,100,0),
+(@PATH,7,216.6058,-430.4544,110.9169,0,0,1,0,100,0),
+(@PATH,8,216.5664,-412.0932,110.9822,0,0,1,0,100,0),
+(@PATH,9,217.1734,-401.2561,111.0617,0,0,1,0,100,0),
+(@PATH,10,216.5286,-397.7477,111.0883,0,0,1,0,100,0),
+(@PATH,11,214.8428,-395.8612,111.1051,0,0,1,0,100,0),
+(@PATH,12,213.5363,-395.6153,111.1093,0,0,1,0,100,0);
+
+-- Text for Lord Victor Nefarius from sniff
+SET @VICTOR := 10162;
+DELETE FROM `creature_text` WHERE `entry` IN (@VICTOR);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+-- Lord Victor Nefarius texts UBRS
+(@VICTOR,0,0,"Excellent... it would appear as if the meddlesome insects have arrived just in time to feed my legion. Welcome, mortals!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,1,0,"Let not even a drop of their blood remain upon the arena floor, my children. Feast on their souls!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,2,0,"Foolsss... Kill the one in the dress!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,3,0,"Inconceivable!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,4,0,"Your efforts will prove fruitless. None shall stand in our way!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,5,0,"Do not force my hand, children! I shall use your hides to line my boots.",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,6,0,"Use the freezing breath, imbecile!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,7,0,"THIS CANNOT BE!!! Rend, deal with these insects.",14,0,100,0,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,8,0,"The Warchief shall make quick work of you, mortals. Prepare yourselves!",14,0,100,25,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,9,0,"Taste in my power!",14,0,100,0,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,10,0,"Your victory shall be short lived. The days of both the Alliance and Horde are coming to an end! The next time we meet shall be the last.",14,0,100,5,0,0,'Lord Victor Nefarius (UBRS)'),
+(@VICTOR,11,0,"The mortals have fallen! The new age of the Blackrock legion is at hand!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'),
+-- Lord Victor Nefarius texts BWL
+(@VICTOR,12,0,"In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say...",14,0,100,1,0,0,'Lord Victor Nefarius SAY_GAMESBEGIN_1 (BWL)'),
+(@VICTOR,13,0,"Let the games begin!",14,0,100,22,0,8280,'Lord Victor Nefarius SAY_GAMESBEGIN_2 (BWL)'),
+(@VICTOR,14,0,"Ah, the heroes. You are persistent, aren't you. Your allied attempted to match his power against mine, and had to pay the price. Now he shall serve me, by slaughtering you. Get up, little red wyrm...and destroy them!",14,0,100,23,0,8279,'Lord Victor Nefarius SAY_VAEL_INTRO (BWL)');
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h
index ccd96ef81d2..f9201944cfe 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h
@@ -69,8 +69,7 @@ enum CreaturesIds
NPC_BLACKHAND_SUMMONER = 9818,
NPC_BLACKHAND_VETERAN = 9819,
NPC_BLACKHAND_INCARCERATOR = 10316,
- NPC_LORD_VICTOR_NEFARIUS = 10162,
- NPC_REND_BLACKHAND = 10429
+ NPC_LORD_VICTOR_NEFARIUS = 10162
};
enum AdditionalData
@@ -111,7 +110,9 @@ enum GameObjectsIds
GO_EMBERSEER_RUNE_6 = 175271,
GO_EMBERSEER_RUNE_7 = 175272,
// For Gyth event
- GO_DR_PORTCULLIS = 175185
+ GO_DR_PORTCULLIS = 175185,
+ GO_PORTCULLIS_ACTIVE = 164726,
+ GO_PORTCULLIS_TOBOSSROOMS = 175186
};
#endif
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp
index 3c79a08487c..f20798d64fb 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp
@@ -42,7 +42,8 @@ enum Events
EVENT_FREEZE = 2,
EVENT_FLAME_BREATH = 3,
EVENT_KNOCK_AWAY = 4,
- EVENT_SUMMONED = 5,
+ EVENT_SUMMONED_1 = 5,
+ EVENT_SUMMONED_2 = 6
};
class boss_gyth : public CreatureScript
@@ -58,7 +59,6 @@ public:
void Reset()
{
- _Reset();
SummonedRend = false;
if (instance->GetBossState(DATA_GYTH) == IN_PROGRESS)
{
@@ -79,7 +79,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- _JustDied();
+ instance->SetBossState(DATA_GYTH, DONE);
}
void SetData(uint32 /*type*/, uint32 data)
@@ -87,7 +87,7 @@ public:
switch (data)
{
case 1:
- events.ScheduleEvent(EVENT_SUMMONED, 1000);
+ events.ScheduleEvent(EVENT_SUMMONED_1, 1000);
break;
default:
break;
@@ -99,7 +99,7 @@ public:
if (!SummonedRend && HealthBelowPct(5))
{
- DoCast(me, SPELL_SUMMON_REND); // Rend will despawn on Gyth death. Core issue with summoned npc's all despawning after summoner dies.
+ DoCast(me, SPELL_SUMMON_REND);
me->RemoveAura(SPELL_REND_MOUNTS);
SummonedRend = true;
}
@@ -112,13 +112,18 @@ public:
{
switch (eventId)
{
- case EVENT_SUMMONED:
+ case EVENT_SUMMONED_1:
me->AddAura(SPELL_REND_MOUNTS, me);
- me->GetMotionMaster()->MovePath(GYTH_PATH_1, false);
- if (GameObject* portcullis = me->FindNearestGameObject(GO_DR_PORTCULLIS, 25.0f))
+ if (GameObject* portcullis = me->FindNearestGameObject(GO_DR_PORTCULLIS, 40.0f))
portcullis->UseDoorOrButton();
if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 75.0f, true))
- victor->GetMotionMaster()->MovePath(NEFARIUS_PATH_2, false);
+ victor->AI()->SetData(1, 1);
+ events.ScheduleEvent(EVENT_SUMMONED_2, 2000);
+ break;
+ case EVENT_SUMMONED_2:
+ me->GetMotionMaster()->MovePath(GYTH_PATH_1, false);
+ break;
+ default:
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp
index b989e03a8a1..eca24289945 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp
@@ -176,15 +176,16 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- events.ScheduleEvent(EVENT_WHIRLWIND, 13000);
- events.ScheduleEvent(EVENT_CLEAVE, 15000);
- events.ScheduleEvent(EVENT_MORTAL_STRIKE, 17000);
+ events.ScheduleEvent(EVENT_WHIRLWIND, urand (13000, 15000));
+ events.ScheduleEvent(EVENT_CLEAVE, urand (15000, 17000));
+ events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand (17000, 19000));
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
- // Do data set on victor
+ if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 75.0f, true))
+ victor->AI()->SetData(1, 2);
}
void SetData(uint32 type, uint32 data)
@@ -348,8 +349,6 @@ public:
victor->GetMotionMaster()->MovePath(NEFARIUS_PATH_1, true);
break;
case EVENT_PATH_REND:
- // path to gyth and spawn gyth.
- // after despawn gyth fight will start
me->GetMotionMaster()->MovePath(REND_PATH_1, false);
break;
case EVENT_TELEPORT_1:
@@ -419,11 +418,11 @@ public:
break;
case EVENT_CLEAVE:
DoCastVictim(SPELL_CLEAVE);
- events.ScheduleEvent(EVENT_CLEAVE, 10000);
+ events.ScheduleEvent(EVENT_CLEAVE, urand(10000, 14000));
break;
case EVENT_MORTAL_STRIKE:
DoCastVictim(SPELL_MORTAL_STRIKE);
- events.ScheduleEvent(EVENT_MORTAL_STRIKE, 16000);
+ events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand(14000, 16000));
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
index ab462319450..e5fd69c735e 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
@@ -46,24 +46,27 @@ public:
instance_blackrock_spireMapScript(InstanceMap* map) : InstanceScript(map)
{
SetBossNumber(EncounterCount);
- HighlordOmokk = 0;
- ShadowHunterVoshgajin = 0;
- WarMasterVoone = 0;
- MotherSmolderweb = 0;
- UrokDoomhowl = 0;
- QuartermasterZigris = 0;
- GizrultheSlavener = 0;
- Halycon = 0;
- OverlordWyrmthalak = 0;
- PyroguardEmberseer = 0;
- WarchiefRendBlackhand = 0;
- Gyth = 0;
- TheBeast = 0;
- GeneralDrakkisath = 0;
- go_emberseerin = 0;
- go_doors = 0;
- go_emberseerout = 0;
- go_blackrockaltar = 0;
+ HighlordOmokk = 0;
+ ShadowHunterVoshgajin = 0;
+ WarMasterVoone = 0;
+ MotherSmolderweb = 0;
+ UrokDoomhowl = 0;
+ QuartermasterZigris = 0;
+ GizrultheSlavener = 0;
+ Halycon = 0;
+ OverlordWyrmthalak = 0;
+ PyroguardEmberseer = 0;
+ WarchiefRendBlackhand = 0;
+ Gyth = 0;
+ LordVictorNefarius = 0;
+ TheBeast = 0;
+ GeneralDrakkisath = 0;
+ go_emberseerin = 0;
+ go_doors = 0;
+ go_emberseerout = 0;
+ go_blackrockaltar = 0;
+ go_portcullis_active = 0;
+ go_portcullis_tobossrooms = 0;
}
void OnCreatureCreate(Creature* creature)
@@ -91,19 +94,21 @@ public:
case NPC_GIZRUL_THE_SLAVENER:
GizrultheSlavener = creature->GetGUID();
break;
- case NPC_HALYCON:
+ case NPC_HALYCON:
Halycon = creature->GetGUID();
break;
- case NPC_OVERLORD_WYRMTHALAK:
+ case NPC_OVERLORD_WYRMTHALAK:
OverlordWyrmthalak = creature->GetGUID();
break;
- case NPC_PYROGAURD_EMBERSEER:
+ case NPC_PYROGAURD_EMBERSEER:
PyroguardEmberseer = creature->GetGUID();
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
creature->DisappearAndDie();
break;
- case NPC_WARCHIEF_REND_BLACKHAND:
+ case NPC_WARCHIEF_REND_BLACKHAND:
WarchiefRendBlackhand = creature->GetGUID();
+ if (GetBossState(DATA_GYTH) == DONE)
+ creature->DisappearAndDie();
break;
case NPC_GYTH:
Gyth = creature->GetGUID();
@@ -114,9 +119,10 @@ public:
case NPC_GENERAL_DRAKKISATH:
GeneralDrakkisath = creature->GetGUID();
break;
- case NPC_BLACKHAND_DREADWEAVER:
- case NPC_BLACKHAND_SUMMONER:
- case NPC_BLACKHAND_VETERAN:
+ case NPC_LORD_VICTOR_NEFARIUS:
+ LordVictorNefarius = creature->GetGUID();
+ if (GetBossState(DATA_GYTH) == DONE)
+ creature->DisappearAndDie();
break;
}
}
@@ -213,6 +219,18 @@ public:
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
HandleGameObject(0, false, go);
break;
+ case GO_PORTCULLIS_ACTIVE:
+ go_portcullis_active = go->GetGUID();
+ if (GetBossState(DATA_GYTH) == DONE)
+ HandleGameObject(0, true, go);
+ break;
+ case GO_PORTCULLIS_TOBOSSROOMS:
+ go_portcullis_tobossrooms = go->GetGUID();
+ if (GetBossState(DATA_GYTH) == DONE)
+ HandleGameObject(0, true, go);
+ break;
+ default:
+ break;
}
}
@@ -374,6 +392,12 @@ public:
case GO_EMBERSEER_RUNE_7:
return go_emberseerrunes[6];
break;
+ case GO_PORTCULLIS_ACTIVE:
+ return go_portcullis_active;
+ break;
+ case GO_PORTCULLIS_TOBOSSROOMS:
+ return go_portcullis_tobossrooms;
+ break;
}
return 0;
}
@@ -554,6 +578,7 @@ public:
uint64 PyroguardEmberseer;
uint64 WarchiefRendBlackhand;
uint64 Gyth;
+ uint64 LordVictorNefarius;
uint64 TheBeast;
uint64 GeneralDrakkisath;
uint64 go_emberseerin;
@@ -563,6 +588,8 @@ public:
uint64 go_roomrunes[7];
uint64 go_emberseerrunes[7];
uint64 runecreaturelist[7][5];
+ uint64 go_portcullis_active;
+ uint64 go_portcullis_tobossrooms;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const
@@ -612,7 +639,7 @@ public:
if (!instance)
return false;
- if (Creature* rend = player->FindNearestCreature(NPC_REND_BLACKHAND, 50.0f))
+ if (Creature* rend = player->FindNearestCreature(NPC_WARCHIEF_REND_BLACKHAND, 50.0f))
{
rend->AI()->SetData(AREATRIGGER, AREATRIGGER_BLACKROCK_STADIUM);
return true;
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp
index fde21c63840..6f90f61f420 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp
@@ -34,14 +34,28 @@ enum Events
EVENT_VEILOFSHADOW = 6,
EVENT_CLEAVE = 7,
EVENT_TAILLASH = 8,
- EVENT_CLASSCALL = 9
+ EVENT_CLASSCALL = 9,
+ // UBRS
+ EVENT_CHAOS_1 = 10,
+ EVENT_CHAOS_2 = 11,
+ EVENT_PATH_2 = 12,
+ EVENT_PATH_3 = 13,
+ EVENT_SUCCESS_1 = 14,
+ EVENT_SUCCESS_2 = 15,
+ EVENT_SUCCESS_3 = 16,
};
enum Says
{
- SAY_GAMESBEGIN_1 = 11,
- SAY_GAMESBEGIN_2 = 12,
- // SAY_VAEL_INTRO = 13, Not used - when he corrupts Vaelastrasz
+ // Nefarius
+ // UBRS
+ SAY_CHAOS_SPELL = 9,
+ SAY_SUCCESS = 10,
+ SAY_FAILURE = 11,
+ // BWL
+ SAY_GAMESBEGIN_1 = 12,
+ SAY_GAMESBEGIN_2 = 13,
+ // SAY_VAEL_INTRO = 14, Not used - when he corrupts Vaelastrasz
// Nefarian
SAY_RANDOM = 0,
@@ -67,6 +81,18 @@ enum Gossip
GOSSIP_OPTION_ID = 0
};
+enum Paths
+{
+ NEFARIUS_PATH_2 = 1379671,
+ NEFARIUS_PATH_3 = 1379672
+};
+
+enum GameObjects
+{
+ GO_PORTCULLIS_ACTIVE = 164726,
+ GO_PORTCULLIS_TOBOSSROOMS = 175186
+};
+
enum Creatures
{
NPC_BRONZE_DRAKANOID = 14263,
@@ -75,7 +101,9 @@ enum Creatures
NPC_GREEN_DRAKANOID = 14262,
NPC_BLACK_DRAKANOID = 14265,
NPC_CHROMATIC_DRAKANOID = 14302,
- NPC_BONE_CONSTRUCT = 14605
+ NPC_BONE_CONSTRUCT = 14605,
+ // UBRS
+ NPC_GYTH = 10339
};
enum Spells
@@ -192,8 +220,73 @@ public:
void JustSummoned(Creature* /*summon*/) {}
+ void SetData(uint32 type, uint32 data)
+ {
+ if (instance && type == 1 && data == 1)
+ {
+ me->StopMoving();
+ events.ScheduleEvent(EVENT_PATH_2, 9000);
+ }
+
+ if (instance && type == 1 && data == 2)
+ {
+ events.ScheduleEvent(EVENT_SUCCESS_1, 5000);
+ }
+ }
+
void UpdateAI(uint32 diff)
{
+ if (!UpdateVictim())
+ {
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_PATH_2:
+ me->GetMotionMaster()->MovePath(NEFARIUS_PATH_2, false);
+ events.ScheduleEvent(EVENT_CHAOS_1, 7000);
+ break;
+ case EVENT_CHAOS_1:
+ if (Creature* gyth = me->FindNearestCreature(NPC_GYTH, 75.0f, true))
+ {
+ me->SetFacingToObject(gyth);
+ Talk(SAY_CHAOS_SPELL);
+ }
+ events.ScheduleEvent(EVENT_CHAOS_2, 2000);
+ break;
+ case EVENT_CHAOS_2:
+ DoCast(SPELL_CHROMATIC_CHAOS);
+ me->SetFacingTo(1.570796f);
+ break;
+ case EVENT_SUCCESS_1:
+ if (Unit* player = me->SelectNearestPlayer(60.0f))
+ {
+ me->SetInFront(player);
+ me->SendMovementFlagUpdate();
+ Talk(SAY_SUCCESS);
+ if (GameObject* portcullis1 = me->FindNearestGameObject(GO_PORTCULLIS_ACTIVE, 65.0f))
+ portcullis1->SetGoState(GO_STATE_ACTIVE);
+ if (GameObject* portcullis2 = me->FindNearestGameObject(GO_PORTCULLIS_TOBOSSROOMS, 80.0f))
+ portcullis2->SetGoState(GO_STATE_ACTIVE);
+ }
+ events.ScheduleEvent(EVENT_SUCCESS_2, 4000);
+ break;
+ case EVENT_SUCCESS_2:
+ DoCast(me, SPELL_VAELASTRASZZ_SPAWN);
+ me->DespawnOrUnsummon(1000);
+ break;
+ case EVENT_PATH_3:
+ me->GetMotionMaster()->MovePath(NEFARIUS_PATH_3, false);
+ break;
+ default:
+ break;
+ }
+ }
+ return;
+ }
+
// Only do this if we haven't spawned nefarian yet
if (UpdateVictim() && SpawnedAdds <= 42)
{