AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
boss_onyxia.cpp File Reference
#include "CreatureScript.h"
#include "PathGenerator.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "onyxias_lair.h"
#include <algorithm>
#include <array>

Go to the source code of this file.

Classes

struct  OnyxiaMove
 
struct  boss_onyxia
 
struct  npc_onyxian_lair_guard
 
struct  npc_onyxian_whelp
 
class  spell_onyxia_disturb_lava_fissure
 

Enumerations

enum  Spells {
  SPELL_WINGBUFFET = 18500 ,
  SPELL_FLAMEBREATH = 18435 ,
  SPELL_CLEAVE = 68868 ,
  SPELL_TAILSWEEP = 68867 ,
  SPELL_FIREBALL = 18392 ,
  SPELL_BELLOWINGROAR = 18431 ,
  SPELL_DEEP_BREATH_TIMER = 68800 ,
  SPELL_SUMMON_LAIR_GUARD = 68968 ,
  SPELL_OLG_BLASTNOVA = 68958 ,
  SPELL_OLG_IGNITEWEAPON = 68959 ,
  SPELL_ROOKERY_WHELP_SPAWN_IN = 15750 ,
  SPELL_TELEPORT_SELF = 42527 ,
  SPELL_BREATH_N_TO_S = 17086 ,
  SPELL_BREATH_S_TO_N = 18351 ,
  SPELL_BREATH_E_TO_W = 18576 ,
  SPELL_BREATH_W_TO_E = 18609 ,
  SPELL_BREATH_NE_TO_SW = 18564 ,
  SPELL_BREATH_SE_TO_NW = 18584 ,
  SPELL_BREATH_SW_TO_NE = 18596 ,
  SPELL_BREATH_NW_TO_SE = 18617 ,
  SPELL_HEATED_GROUND = 22191
}
 
enum  Events {
  EVENT_SPELL_WINGBUFFET = 1 ,
  EVENT_SPELL_FLAMEBREATH = 2 ,
  EVENT_SPELL_TAILSWEEP = 3 ,
  EVENT_SPELL_CLEAVE = 4 ,
  EVENT_START_PHASE_2 = 5 ,
  EVENT_AIR_PHASE_ACTION = 6 ,
  EVENT_DEEP_BREATH_TIMER = 7 ,
  EVENT_SPELL_BREATH = 11 ,
  EVENT_START_PHASE_3 = 12 ,
  EVENT_PHASE_3_ATTACK = 13 ,
  EVENT_SPELL_BELLOWINGROAR = 14 ,
  EVENT_SUMMON_LAIR_GUARD = 16 ,
  EVENT_OLG_SPELL_BLASTNOVA = 18 ,
  EVENT_OLG_SPELL_IGNITEWEAPON = 19 ,
  EVENT_LIFTOFF = 31 ,
  EVENT_FLY_S_TO_N = 32
}
 
enum  Phases {
  PHASE_NONE ,
  PHASE_GROUNDED ,
  PHASE_AIRPHASE ,
  PHASE_LANDED
}
 
enum  Waypoints : uint8 {
  WP_GROUND_SOUTH = 0 ,
  WP_SOUTH = 1 ,
  WP_NORTH = 5 ,
  WP_SOUTH_EAST = 8
}
 
enum  Points {
  POINT_GROUND_SOUTH = 10 ,
  POINT_TAKEOFF = 11 ,
  POINT_LAND = 13
}
 
enum  TaskGroups { GROUP_WHELP_RESPAWN = 1 }
 
enum  Yells {
  SAY_AGGRO = 0 ,
  SAY_KILL = 1 ,
  SAY_PHASE_2_TRANS = 2 ,
  SAY_PHASE_3_TRANS = 3 ,
  EMOTE_BREATH = 4 ,
  SAY_EVADE = 5
}
 

Functions

void AddSC_boss_onyxia ()
 

Variables

static OnyxiaMove const OnyxiaMoveData []
 
Position const LairGuardTriggerPos = { -134.40698f, -213.74207f, -70.19801f, 0.01745329f }
 
static Position const WhelpSpawnPoints []
 
static Position const WhelpLiftoffOnlyPoint = { -107.17814f, -232.05528f, -93.999115f, 6.248279f }
 
static constexpr std::array< uint32, 11 > LavaFissuresAboveFloor
 

Enumeration Type Documentation

◆ Events

enum Events
Enumerator
EVENT_SPELL_WINGBUFFET 
EVENT_SPELL_FLAMEBREATH 
EVENT_SPELL_TAILSWEEP 
EVENT_SPELL_CLEAVE 
EVENT_START_PHASE_2 
EVENT_AIR_PHASE_ACTION 
EVENT_DEEP_BREATH_TIMER 
EVENT_SPELL_BREATH 
EVENT_START_PHASE_3 
EVENT_PHASE_3_ATTACK 
EVENT_SPELL_BELLOWINGROAR 
EVENT_SUMMON_LAIR_GUARD 
EVENT_OLG_SPELL_BLASTNOVA 
EVENT_OLG_SPELL_IGNITEWEAPON 
EVENT_LIFTOFF 
EVENT_FLY_S_TO_N 
61{
76
77 EVENT_LIFTOFF = 31,
79};
@ EVENT_SPELL_CLEAVE
Definition boss_onyxia.cpp:65
@ EVENT_SPELL_BELLOWINGROAR
Definition boss_onyxia.cpp:72
@ EVENT_SPELL_BREATH
Definition boss_onyxia.cpp:69
@ EVENT_START_PHASE_3
Definition boss_onyxia.cpp:70
@ EVENT_DEEP_BREATH_TIMER
Definition boss_onyxia.cpp:68
@ EVENT_START_PHASE_2
Definition boss_onyxia.cpp:66
@ EVENT_SPELL_WINGBUFFET
Definition boss_onyxia.cpp:62
@ EVENT_FLY_S_TO_N
Definition boss_onyxia.cpp:78
@ EVENT_OLG_SPELL_IGNITEWEAPON
Definition boss_onyxia.cpp:75
@ EVENT_SPELL_TAILSWEEP
Definition boss_onyxia.cpp:64
@ EVENT_LIFTOFF
Definition boss_onyxia.cpp:77
@ EVENT_OLG_SPELL_BLASTNOVA
Definition boss_onyxia.cpp:74
@ EVENT_SPELL_FLAMEBREATH
Definition boss_onyxia.cpp:63
@ EVENT_SUMMON_LAIR_GUARD
Definition boss_onyxia.cpp:73
@ EVENT_PHASE_3_ATTACK
Definition boss_onyxia.cpp:71
@ EVENT_AIR_PHASE_ACTION
Definition boss_onyxia.cpp:67

◆ Phases

enum Phases
Enumerator
PHASE_NONE 
PHASE_GROUNDED 
PHASE_AIRPHASE 
PHASE_LANDED 
82{
84 PHASE_GROUNDED, // Phase 1
85 PHASE_AIRPHASE, // Phase 2 - Airphase - 60% health
86 PHASE_LANDED // Phase 3 - Landed after Airphase - 40% health
87};
@ PHASE_AIRPHASE
Definition boss_onyxia.cpp:85
@ PHASE_LANDED
Definition boss_onyxia.cpp:86
@ PHASE_NONE
Definition boss_onyxia.cpp:83
@ PHASE_GROUNDED
Definition boss_onyxia.cpp:84

◆ Points

enum Points
Enumerator
POINT_GROUND_SOUTH 
POINT_TAKEOFF 
POINT_LAND 
99{
101 POINT_TAKEOFF = 11,
102 POINT_LAND = 13
103};
@ POINT_TAKEOFF
Definition boss_onyxia.cpp:101
@ POINT_LAND
Definition boss_onyxia.cpp:102
@ POINT_GROUND_SOUTH
Definition boss_onyxia.cpp:100

◆ Spells

enum Spells
Enumerator
SPELL_WINGBUFFET 
SPELL_FLAMEBREATH 
SPELL_CLEAVE 
SPELL_TAILSWEEP 
SPELL_FIREBALL 
SPELL_BELLOWINGROAR 
SPELL_DEEP_BREATH_TIMER 
SPELL_SUMMON_LAIR_GUARD 
SPELL_OLG_BLASTNOVA 
SPELL_OLG_IGNITEWEAPON 
SPELL_ROOKERY_WHELP_SPAWN_IN 
SPELL_TELEPORT_SELF 
SPELL_BREATH_N_TO_S 
SPELL_BREATH_S_TO_N 
SPELL_BREATH_E_TO_W 
SPELL_BREATH_W_TO_E 
SPELL_BREATH_NE_TO_SW 
SPELL_BREATH_SE_TO_NW 
SPELL_BREATH_SW_TO_NE 
SPELL_BREATH_NW_TO_SE 
SPELL_HEATED_GROUND 
30{
31 SPELL_WINGBUFFET = 18500,
32 SPELL_FLAMEBREATH = 18435,
33 SPELL_CLEAVE = 68868,
34 SPELL_TAILSWEEP = 68867,
35 SPELL_FIREBALL = 18392,
36 SPELL_BELLOWINGROAR = 18431,
38
40
41 SPELL_OLG_BLASTNOVA = 68958,
43
45 SPELL_TELEPORT_SELF = 42527,
46
47 SPELL_BREATH_N_TO_S = 17086,
48 SPELL_BREATH_S_TO_N = 18351,
49 SPELL_BREATH_E_TO_W = 18576,
50 SPELL_BREATH_W_TO_E = 18609,
55
56 // Each patch triggers the next one, up to 22202
57 SPELL_HEATED_GROUND = 22191,
58};
@ SPELL_CLEAVE
Definition boss_onyxia.cpp:33
@ SPELL_BREATH_N_TO_S
Definition boss_onyxia.cpp:47
@ SPELL_OLG_BLASTNOVA
Definition boss_onyxia.cpp:41
@ SPELL_BREATH_NE_TO_SW
Definition boss_onyxia.cpp:51
@ SPELL_BELLOWINGROAR
Definition boss_onyxia.cpp:36
@ SPELL_BREATH_SE_TO_NW
Definition boss_onyxia.cpp:52
@ SPELL_FLAMEBREATH
Definition boss_onyxia.cpp:32
@ SPELL_TELEPORT_SELF
Definition boss_onyxia.cpp:45
@ SPELL_HEATED_GROUND
Definition boss_onyxia.cpp:57
@ SPELL_FIREBALL
Definition boss_onyxia.cpp:35
@ SPELL_SUMMON_LAIR_GUARD
Definition boss_onyxia.cpp:39
@ SPELL_ROOKERY_WHELP_SPAWN_IN
Definition boss_onyxia.cpp:44
@ SPELL_TAILSWEEP
Definition boss_onyxia.cpp:34
@ SPELL_BREATH_SW_TO_NE
Definition boss_onyxia.cpp:53
@ SPELL_BREATH_NW_TO_SE
Definition boss_onyxia.cpp:54
@ SPELL_OLG_IGNITEWEAPON
Definition boss_onyxia.cpp:42
@ SPELL_BREATH_S_TO_N
Definition boss_onyxia.cpp:48
@ SPELL_DEEP_BREATH_TIMER
Definition boss_onyxia.cpp:37
@ SPELL_BREATH_E_TO_W
Definition boss_onyxia.cpp:49
@ SPELL_BREATH_W_TO_E
Definition boss_onyxia.cpp:50
@ SPELL_WINGBUFFET
Definition boss_onyxia.cpp:31

◆ TaskGroups

enum TaskGroups
Enumerator
GROUP_WHELP_RESPAWN 
131{
133};
@ GROUP_WHELP_RESPAWN
Definition boss_onyxia.cpp:132

◆ Waypoints

enum Waypoints : uint8
Enumerator
WP_GROUND_SOUTH 
WP_SOUTH 
WP_NORTH 
WP_SOUTH_EAST 
91{
93 WP_SOUTH = 1,
94 WP_NORTH = 5,
96};
@ WP_NORTH
Definition boss_onyxia.cpp:94
@ WP_GROUND_SOUTH
Definition boss_onyxia.cpp:92
@ WP_SOUTH
Definition boss_onyxia.cpp:93
@ WP_SOUTH_EAST
Definition boss_onyxia.cpp:95

◆ Yells

enum Yells
Enumerator
SAY_AGGRO 
SAY_KILL 
SAY_PHASE_2_TRANS 
SAY_PHASE_3_TRANS 
EMOTE_BREATH 
SAY_EVADE 
154{
155 SAY_AGGRO = 0,
156 SAY_KILL = 1,
159 EMOTE_BREATH = 4,
160 SAY_EVADE = 5
161};
@ SAY_AGGRO
Definition boss_onyxia.cpp:155
@ SAY_PHASE_2_TRANS
Definition boss_onyxia.cpp:157
@ EMOTE_BREATH
Definition boss_onyxia.cpp:159
@ SAY_KILL
Definition boss_onyxia.cpp:156
@ SAY_PHASE_3_TRANS
Definition boss_onyxia.cpp:158
@ SAY_EVADE
Definition boss_onyxia.cpp:160

Function Documentation

◆ AddSC_boss_onyxia()

void AddSC_boss_onyxia ( )
828{
833}
#define RegisterSpellScript(spell_script)
Definition SpellScriptLoader.h:88
Definition boss_onyxia.cpp:773
#define RegisterOnyxiasLairCreatureAI(ai_name)
Definition onyxias_lair.h:74
Definition boss_onyxia.cpp:164
Definition boss_onyxia.cpp:635
Definition boss_onyxia.cpp:690

References RegisterOnyxiasLairCreatureAI, and RegisterSpellScript.

Referenced by AddKalimdorScripts().

Variable Documentation

◆ LairGuardTriggerPos

Position const LairGuardTriggerPos = { -134.40698f, -213.74207f, -70.19801f, 0.01745329f }
128{ -134.40698f, -213.74207f, -70.19801f, 0.01745329f };

Referenced by boss_onyxia::UpdateAI().

◆ LavaFissuresAboveFloor

constexpr std::array<uint32, 11> LavaFissuresAboveFloor
staticconstexpr
Initial value:
=
{
176811, 176814, 176821, 176824, 176827, 176829, 176830, 176839, 176841, 176908, 176921
}
766{
767 176811, 176814, 176821, 176824, 176827, 176829, 176830, 176839, 176841, 176908, 176921
768};

Referenced by spell_onyxia_disturb_lava_fissure::FilterFissures().

◆ OnyxiaMoveData

OnyxiaMove const OnyxiaMoveData[]
static
Initial value:
=
{
{0, 0, 0, -66.3589f, -215.928f, -84.23904f, 0.0f},
{1, 5, SPELL_BREATH_S_TO_N, -75.387505f, -215.21892f, -58.02298f, 0.0075448f},
{2, 6, SPELL_BREATH_SW_TO_NE, -64.04101f, -188.51236f, -59.439896f, 5.549744f},
{3, 7, SPELL_BREATH_W_TO_E, -15.713689f, -181.3027f, -62.038284f, 4.2037554f},
{4, 8, SPELL_BREATH_NW_TO_SE, 11.944992f, -180.16212f, -60.27321f, 3.9242017f},
{5, 1, SPELL_BREATH_N_TO_S, 25.16067f, -216.08244f, -58.92215f, 3.2004213f},
{6, 2, SPELL_BREATH_NE_TO_SW, 12.422047f, -242.43831f, -60.561646f, 2.6292219f},
{7, 3, SPELL_BREATH_E_TO_W, -14.978153f, -245.48346f, -60.375755f, 2.0324559f},
{8, 4, SPELL_BREATH_SE_TO_NW, -63.786427f, -235.2712f, -60.19681f, 0.5779157f},
}
114{
115 {0, 0, 0, -66.3589f, -215.928f, -84.23904f, 0.0f}, // south ground
116 {1, 5, SPELL_BREATH_S_TO_N, -75.387505f, -215.21892f, -58.02298f, 0.0075448f}, // south
117 {2, 6, SPELL_BREATH_SW_TO_NE, -64.04101f, -188.51236f, -59.439896f, 5.549744f}, // south-west
118 {3, 7, SPELL_BREATH_W_TO_E, -15.713689f, -181.3027f, -62.038284f, 4.2037554f}, // west
119 {4, 8, SPELL_BREATH_NW_TO_SE, 11.944992f, -180.16212f, -60.27321f, 3.9242017f}, // north-west
120 {5, 1, SPELL_BREATH_N_TO_S, 25.16067f, -216.08244f, -58.92215f, 3.2004213f}, // north
121 {6, 2, SPELL_BREATH_NE_TO_SW, 12.422047f, -242.43831f, -60.561646f, 2.6292219f}, // north-east
122 {7, 3, SPELL_BREATH_E_TO_W, -14.978153f, -245.48346f, -60.375755f, 2.0324559f}, // east
123 {8, 4, SPELL_BREATH_SE_TO_NW, -63.786427f, -235.2712f, -60.19681f, 0.5779157f}, // south-east
124};

Referenced by boss_onyxia::MovementInform(), boss_onyxia::MoveToWaypoint(), boss_onyxia::OnSpellCast(), and boss_onyxia::UpdateAI().

◆ WhelpLiftoffOnlyPoint

Position const WhelpLiftoffOnlyPoint = { -107.17814f, -232.05528f, -93.999115f, 6.248279f }
static
151{ -107.17814f, -232.05528f, -93.999115f, 6.248279f };

Referenced by boss_onyxia::UpdateAI().

◆ WhelpSpawnPoints

Position const WhelpSpawnPoints[]
static
Initial value:
=
{
{ -102.75786f, -198.85912f, -93.76155f, 5.131268f },
{ -107.54872f, -198.04468f, -93.883644f, 4.433136f },
{ -112.76325f, -196.49747f, -92.722244f, 0.261799f },
{ -117.191f, -196.107f, -92.73233f, 0.034907f },
{ -99.41064f, -198.543f, -93.59504f, 5.864306f },
{ -104.5892f, -233.16988f, -94.13f, 6.248279f },
{ -107.39845f, -230.61523f, -93.882454f, 1.448623f },
{ -110.02973f, -233.42484f, -93.29275f, 4.694936f },
{ -113.6534f, -231.24023f, -92.559586f, 2.565634f },
{ -115.66789f, -234.56912f, -92.65229f, 0.663225f }
}
137{
138 { -102.75786f, -198.85912f, -93.76155f, 5.131268f },
139 { -107.54872f, -198.04468f, -93.883644f, 4.433136f },
140 { -112.76325f, -196.49747f, -92.722244f, 0.261799f },
141 { -117.191f, -196.107f, -92.73233f, 0.034907f },
142 { -99.41064f, -198.543f, -93.59504f, 5.864306f },
143 { -104.5892f, -233.16988f, -94.13f, 6.248279f },
144 { -107.39845f, -230.61523f, -93.882454f, 1.448623f },
145 { -110.02973f, -233.42484f, -93.29275f, 4.694936f },
146 { -113.6534f, -231.24023f, -92.559586f, 2.565634f },
147 { -115.66789f, -234.56912f, -92.65229f, 0.663225f }
148};

Referenced by boss_onyxia::SummonPointWhelp(), and boss_onyxia::UpdateAI().