aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/3233_world_scripts_naxx.sql28
-rw-r--r--src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp129
-rw-r--r--src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp7
-rw-r--r--src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp4
4 files changed, 81 insertions, 87 deletions
diff --git a/sql/updates/3233_world_scripts_naxx.sql b/sql/updates/3233_world_scripts_naxx.sql
index d84a4462537..8b8140c17fe 100644
--- a/sql/updates/3233_world_scripts_naxx.sql
+++ b/sql/updates/3233_world_scripts_naxx.sql
@@ -1,5 +1,7 @@
-DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (-28169);
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (-28169,28732,54097);
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+( 28732,-28798, 1, 'Widow\'s Embrace - Frenzy'),
+( 54097,-54100, 1, 'Widow\'s Embrace - Frenzy (H)'),
(-28169, 28206, 0, 'Mutating Injection - Mutagen Explosion'),
(-28169, 28240, 0, 'Mutating Injection - Poison Cloud');
@@ -26,19 +28,33 @@ DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (29912);
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `quest_id`, `cast_flags`) VALUES
(29912, 55479, 0, 1); # Obedience Crystal - Force Obedience
-DELETE FROM `spell_script_target` WHERE `entry` IN (55479);
+DELETE FROM `spell_script_target` WHERE `entry` IN
+(28732,54097,55479,
+27892,27893,27928,27929,27935,27936);
INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
-(55479, 1, 16803); # Force Obedience - Death Knight Understudy
+(28732, 1, 15953), # Widow's Embrace
+(54097, 1, 15953), # Widow's Embrace
+(55479, 1, 16803), # Force Obedience - Death Knight Understudy
+# (29105, 1, 16803), # Hopeless - Death Knight Understudy
+(27892, 1, 16060), # To Anchor 1 - Gothik
+(27893, 1, 16060), # To Anchor 2 - Gothik
+(27928, 1, 16060), # To Anchor 1 - Gothik
+(27929, 1, 16060), # To Anchor 2 - Gothik
+(27935, 1, 16060), # To Anchor 1 - Gothik
+(27936, 1, 16060); # To Anchor 2 - Gothik
+
INSERT INTO creature_template (entry, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8) VALUES
-(16803, 0, 0, 0, 61696, 29060, 29061, 0, 0), # Death Knight Understudy
-(29941, 0, 0, 0, 61696, 29060, 29061, 0, 0), # Death Knight Understudy (H)
(16573, 15284, 28991, 28969, 34970, 28864, 0, 0, 0), # Crypt Guard
(29256, 15284, 28991, 56098, 34970, 28864, 0, 0, 0), # Crypt Guard (H)
+(16506, 54095, 28732, 0, 0, 0, 0, 0, 0), # Naxxramas Worshipper
+(29274, 54096, 54097, 0, 0, 0, 0, 0, 0), # Naxxramas Worshipper (H)
(16984, 15496, 0, 0, 0, 0, 0, 0, 0), # Plagued Warrior
(29632, 15496, 0, 0, 0, 0, 0, 0, 0), # Plagued Warrior (H)
(16290, 28156, 0, 0, 0, 0, 0, 0, 0), # Fallout Slime
-(29388, 54367, 0, 0, 0, 0, 0, 0, 0) # Fallout Slime (H)
+(29388, 54367, 0, 0, 0, 0, 0, 0, 0), # Fallout Slime (H)
+(16803, 0, 0, 0, 61696, 29060, 29061, 0, 0), # Death Knight Understudy
+(29941, 0, 0, 0, 61696, 29060, 29061, 0, 0) # Death Knight Understudy (H)
ON DUPLICATE KEY UPDATE
spell1 = VALUES(spell1),
spell2 = VALUES(spell2),
diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp
index 5ec67a8920b..9ee594b02b5 100644
--- a/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp
+++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp
@@ -1,4 +1,6 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+/*
+ * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -14,83 +16,63 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* ScriptData
-SDName: Boss_Faerlina
-SD%Complete: 50
-SDComment:
-SDCategory: Naxxramas
-EndScriptData */
-
#include "precompiled.h"
+#include "def_naxxramas.h"
-#define SAY_GREET -1533009
-#define SAY_AGGRO1 -1533010
-#define SAY_AGGRO2 -1533011
-#define SAY_AGGRO3 -1533012
-#define SAY_AGGRO4 -1533013
-#define SAY_SLAY1 -1533014
-#define SAY_SLAY2 -1533015
-#define SAY_DEATH -1533016
+#define SAY_GREET -1533009
+#define SAY_AGGRO RAND(-1533010,-1533011,-1533012,-1533013)
+#define SAY_SLAY RAND(-1533014,-1533015)
+#define SAY_DEATH -1533016
//#define SOUND_RANDOM_AGGRO 8955 //soundId containing the 4 aggro sounds, we not using this
-#define SPELL_POSIONBOLT_VOLLEY 28796
-#define H_SPELL_POSIONBOLT_VOLLEY 54098
-#define SPELL_ENRAGE 28798
-#define H_SPELL_ENRAGE 54100
-#define SPELL_RAINOFFIRE 28794 //Not sure if targeted AoEs work if casted directly upon a player
+#define SPELL_POSION_BOLT_VOLLEY HEROIC(28796,54098)
+#define SPELL_RAIN_OF_FIRE HEROIC(28794,54099)
+#define SPELL_FRENZY HEROIC(28798,54100)
+#define SPELL_WIDOWS_EMBRACE HEROIC(28732,54097)
-struct TRINITY_DLL_DECL boss_faerlinaAI : public ScriptedAI
+enum Events
{
- boss_faerlinaAI(Creature *c) : ScriptedAI(c) {}
+ EVENT_POSION = 1,
+ EVENT_FIRE,
+ EVENT_FRENZY,
+};
- uint32 PoisonBoltVolley_Timer;
- uint32 RainOfFire_Timer;
- uint32 Enrage_Timer;
- bool HasTaunted;
+struct TRINITY_DLL_DECL boss_faerlinaAI : public BossAI
+{
+ boss_faerlinaAI(Creature *c) : BossAI(c, BOSS_FAERLINA), greet(false) {}
- void Reset()
- {
- PoisonBoltVolley_Timer = 8000;
- RainOfFire_Timer = 16000;
- Enrage_Timer = 60000;
- HasTaunted = false;
- }
+ bool greet;
void EnterCombat(Unit *who)
{
- switch (rand()%4)
- {
- case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
- case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
- case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
- case 3: DoScriptText(SAY_AGGRO4, m_creature); break;
- }
+ _EnterCombat();
+ DoScriptText(SAY_AGGRO, me);
+ events.ScheduleEvent(EVENT_POSION, 10000 + rand()%15000);
+ events.ScheduleEvent(EVENT_FIRE, 5000 + rand()%15000);
+ events.ScheduleEvent(EVENT_FRENZY, 60000 + rand()%20000);
}
void MoveInLineOfSight(Unit *who)
{
- if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f))
- {
- DoScriptText(SAY_GREET, m_creature);
- HasTaunted = true;
-
+ if(!greet)
+ {
+ DoScriptText(SAY_GREET, me);
+ greet = true;
}
- ScriptedAI::MoveInLineOfSight(who);
+ BossAI::MoveInLineOfSight(who);
}
void KilledUnit(Unit* victim)
{
- switch (rand()%2)
- {
- case 0: DoScriptText(SAY_SLAY1, m_creature); break;
- case 1: DoScriptText(SAY_SLAY2, m_creature); break;
- }
+ if(!(rand()%3))
+ DoScriptText(SAY_SLAY, me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ _JustDied();
+ DoScriptText(SAY_DEATH, me);
}
void UpdateAI(const uint32 diff)
@@ -98,31 +80,33 @@ struct TRINITY_DLL_DECL boss_faerlinaAI : public ScriptedAI
if (!UpdateVictim())
return;
- //PoisonBoltVolley_Timer
- if (PoisonBoltVolley_Timer < diff)
- {
- DoCast(m_creature->getVictim(),SPELL_POSIONBOLT_VOLLEY);
- PoisonBoltVolley_Timer = 11000;
- }else PoisonBoltVolley_Timer -= diff;
+ events.Update(diff);
- //RainOfFire_Timer
- if (RainOfFire_Timer < diff)
+ while(uint32 eventId = events.ExecuteEvent())
{
- if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
- DoCast(target,SPELL_RAINOFFIRE);
- RainOfFire_Timer = 16000;
- }else RainOfFire_Timer -= diff;
-
- //Enrage_Timer
- if (Enrage_Timer < diff)
- {
- DoCast(m_creature,SPELL_ENRAGE);
- Enrage_Timer = 61000;
- }else Enrage_Timer -= diff;
+ switch(eventId)
+ {
+ case EVENT_POSION:
+ if(!me->HasAura(SPELL_WIDOWS_EMBRACE))
+ DoCastAOE(SPELL_POSION_BOLT_VOLLEY);
+ events.ScheduleEvent(EVENT_POSION, 10000 + rand()%15000);
+ return;
+ case EVENT_FIRE:
+ if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_RAIN_OF_FIRE);
+ events.ScheduleEvent(EVENT_FIRE, 5000 + rand()%15000);
+ return;
+ case EVENT_FRENZY:
+ DoCast(me,SPELL_FRENZY);
+ events.ScheduleEvent(EVENT_FRENZY, 60000 + rand()%20000);
+ return;
+ }
+ }
DoMeleeAttackIfReady();
}
};
+
CreatureAI* GetAI_boss_faerlina(Creature *_Creature)
{
return new boss_faerlinaAI (_Creature);
@@ -136,4 +120,3 @@ void AddSC_boss_faerlina()
newscript->GetAI = &GetAI_boss_faerlina;
newscript->RegisterSelf();
}
-
diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp
index a05685264d6..7886fad94cc 100644
--- a/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp
+++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp
@@ -39,12 +39,6 @@ struct TRINITY_DLL_DECL boss_patchwerkAI : public BossAI
bool Enraged;
- void Reset()
- {
- _Reset();
- Enraged = false;
- }
-
void KilledUnit(Unit* Victim)
{
if(!(rand()%5))
@@ -60,6 +54,7 @@ struct TRINITY_DLL_DECL boss_patchwerkAI : public BossAI
void EnterCombat(Unit *who)
{
_EnterCombat();
+ Enraged = false;
DoScriptText(SAY_AGGRO, me);
events.ScheduleEvent(EVENT_HATEFUL, 1200);
events.ScheduleEvent(EVENT_BERSERK, 360000);
diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp
index 120220172cd..67fcaee7de3 100644
--- a/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp
+++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp
@@ -42,7 +42,7 @@
#define SPELL_UNBALANCING_STRIKE 26613
#define SPELL_DISRUPTING_SHOUT HEROIC(29107,55543)
#define SPELL_JAGGED_KNIFE 55550
-#define SPELL_HOPELESS 29105
+#define SPELL_HOPELESS 29125
enum Events
{
@@ -66,7 +66,7 @@ struct TRINITY_DLL_DECL boss_razuviousAI : public BossAI
{
_JustDied();
DoPlaySoundToSet(me, SOUND_DEATH);
- me->CastSpell(me, SPELL_HOPELESS, true);
+ me->CastSpell(me, SPELL_HOPELESS, true); // TODO: this may affect other creatures
}
void EnterCombat(Unit *who)