Skip to content

Commit b189f77

Browse files
authored
More BWL code cleanup (vmangos#2988)
1 parent 9988684 commit b189f77

10 files changed

Lines changed: 449 additions & 432 deletions

File tree

src/scripts/eastern_kingdoms/burning_steppes/blackwing_lair/boss_broodlord_lashlayer.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,10 @@
1414
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1515
*/
1616

17-
/* ScriptData
18-
SDName: Boss_Broodlord_Lashlayer
19-
SD%Complete: 100
20-
SDComment:
21-
SDCategory: Blackwing Lair
22-
EndScriptData */
23-
2417
#include "scriptPCH.h"
2518
#include "blackwing_lair.h"
2619

27-
enum
20+
enum Broodlord : uint32
2821
{
2922
SAY_AGGRO = 9967,
3023
SAY_LEASH = 9968,
@@ -64,7 +57,7 @@ struct boss_broodlordAI : public ScriptedAI
6457

6558
void Reset() override
6659
{
67-
m_uiCleaveTimer = 8000; // These times are probably wrong
60+
m_uiCleaveTimer = 8000; // These times are probably wrong
6861
m_uiBlastWaveTimer = 20000;
6962
m_uiMortalStrikeTimer = 25000;
7063
m_uiKnockAwayTimer = urand(20000, 25000);

src/scripts/eastern_kingdoms/burning_steppes/blackwing_lair/boss_chromaggus.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,10 @@
1414
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1515
*/
1616

17-
/* ScriptData
18-
SDName: Boss_Chromaggus
19-
SD%Complete: 95
20-
SDComment: Chromatic Mutation disabled due to lack of core support
21-
SDCategory: Blackwing Lair
22-
EndScriptData */
23-
2417
#include "scriptPCH.h"
2518
#include "blackwing_lair.h"
2619

27-
enum
20+
enum Chromaggus : uint32
2821
{
2922
EMOTE_GENERIC_FRENZY_KILL = 7797,
3023
EMOTE_SHIMMER = 9793,

src/scripts/eastern_kingdoms/burning_steppes/blackwing_lair/boss_ebonroc.cpp

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,15 @@
1414
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1515
*/
1616

17-
/* ScriptData
18-
SDName: Boss_Ebonroc
19-
SD%Complete: 90
20-
SDComment: Thrash is missing
21-
SDCategory: Blackwing Lair
22-
EndScriptData */
23-
2417
#include "scriptPCH.h"
2518
#include "blackwing_lair.h"
2619

27-
enum
20+
enum Ebonroc : uint32
2821
{
29-
SPELL_SHADOW_FLAME = 22539,
30-
SPELL_WING_BUFFET = 23339,
31-
SPELL_SHADOW_OF_EBONROC = 23340,
32-
SPELL_THRASH = 3391, // TODO missing
22+
SPELL_SHADOW_FLAME = 22539,
23+
SPELL_WING_BUFFET = 23339,
24+
SPELL_SHADOW_OF_EBONROC = 23340,
25+
SPELL_THRASH = 3391,
3326
};
3427

3528
struct boss_ebonrocAI : public ScriptedAI

src/scripts/eastern_kingdoms/burning_steppes/blackwing_lair/boss_firemaw.cpp

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,15 @@
1414
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1515
*/
1616

17-
/* ScriptData
18-
SDName: Boss_Firemaw
19-
SD%Complete: 80
20-
SDComment: Thrash missing
21-
SDCategory: Blackwing Lair
22-
EndScriptData */
23-
2417
#include "scriptPCH.h"
2518
#include "blackwing_lair.h"
2619

27-
enum
20+
enum Firemaw : uint32
2821
{
29-
SPELL_SHADOW_FLAME = 22539,
30-
SPELL_WING_BUFFET = 23339,
31-
SPELL_FLAME_BUFFET = 23341,
32-
SPELL_THRASH = 3391,
22+
SPELL_SHADOW_FLAME = 22539,
23+
SPELL_WING_BUFFET = 23339,
24+
SPELL_FLAME_BUFFET = 23341,
25+
SPELL_THRASH = 3391,
3326
};
3427

3528
struct boss_firemawAI : public ScriptedAI
@@ -49,7 +42,7 @@ struct boss_firemawAI : public ScriptedAI
4942
void Reset() override
5043
{
5144
m_uiShadowFlameTimer = 16000;
52-
m_uiWingBuffetTimer = 30000;
45+
m_uiWingBuffetTimer = 30000;
5346
m_uiFlameBuffetTimer = 2000;
5447
}
5548

@@ -116,8 +109,13 @@ struct boss_firemawAI : public ScriptedAI
116109
else
117110
m_uiFlameBuffetTimer -= uiDiff;
118111

119-
if (m_creature->IsAttackReady() && !urand(0, 2))
120-
DoCastSpellIfCan(m_creature, SPELL_THRASH);
112+
if (m_creature->IsAttackReady() && m_creature->IsNonMeleeSpellCasted(true))
113+
{
114+
if (!urand(0, 2))
115+
{
116+
DoCastSpellIfCan(m_creature, SPELL_THRASH);
117+
}
118+
}
121119

122120
DoMeleeAttackIfReady();
123121
}

src/scripts/eastern_kingdoms/burning_steppes/blackwing_lair/boss_flamegor.cpp

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,17 @@
1414
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1515
*/
1616

17-
/* ScriptData
18-
SDName: Boss_Flamegor
19-
SD%Complete: 90
20-
SDComment: Thrash is missing
21-
SDCategory: Blackwing Lair
22-
EndScriptData */
23-
2417
#include "scriptPCH.h"
2518
#include "blackwing_lair.h"
2619

27-
enum
20+
enum Flamegor : uint32
2821
{
29-
EMOTE_GENERIC_FRENZY = 1191,
22+
EMOTE_GENERIC_FRENZY = 1191,
3023

31-
SPELL_SHADOW_FLAME = 22539,
32-
SPELL_WING_BUFFET = 23339,
33-
SPELL_FRENZY = 23342, // This spell periodically triggers fire nova
34-
SPELL_THRASH = 3391, // TODO missing
24+
SPELL_SHADOW_FLAME = 22539,
25+
SPELL_WING_BUFFET = 23339,
26+
SPELL_FRENZY = 23342, // This spell periodically triggers fire nova
27+
SPELL_THRASH = 3391,
3528
};
3629

3730
struct boss_flamegorAI : public ScriptedAI
@@ -50,9 +43,9 @@ struct boss_flamegorAI : public ScriptedAI
5043

5144
void Reset() override
5245
{
53-
m_uiShadowFlameTimer = 16000; // These times are probably wrong
54-
m_uiWingBuffetTimer = 30000;
55-
m_uiFrenzyTimer = 10000;
46+
m_uiShadowFlameTimer = 16000; // These times are probably wrong
47+
m_uiWingBuffetTimer = 30000;
48+
m_uiFrenzyTimer = 10000;
5649
}
5750

5851
void Aggro(Unit* /*pWho*/) override

0 commit comments

Comments
 (0)