mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
*Update Naxx scripts.
--HG-- branch : trunk
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user