Skip to content

Commit e54b8c9

Browse files
committed
Scripts/Shattered Halls: Update Omrogg
1 parent 4ccebff commit e54b8c9

2 files changed

Lines changed: 34 additions & 13 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
--
2+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_omrogg_beatdown';
3+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
4+
(30618, 'spell_omrogg_beatdown');

src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ struct boss_warbringer_omrogg : public BossAI
108108
void JustEngagedWith(Unit* who) override
109109
{
110110
BossAI::JustEngagedWith(who);
111+
111112
events.ScheduleEvent(EVENT_FEAR, 20s, 30s);
112113
events.ScheduleEvent(EVENT_THUNDERCLAP, 15s, 25s);
113114
events.ScheduleEvent(EVENT_BEATDOWN, 25s, 30s);
@@ -119,18 +120,10 @@ struct boss_warbringer_omrogg : public BossAI
119120

120121
void OnSpellCast(SpellInfo const* spell) override
121122
{
122-
/// @todo: Threat reset and AttackStart should be in spell script
123+
// Apparently this and all other are handled by GameEvents since this spell sends GameEvent
123124
if (spell->Id == SPELL_BEATDOWN)
124-
{
125-
ResetThreatList();
126-
127-
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
128-
AttackStart(target);
129-
130-
// Apparently this and all other are handled by GameEvents since this spell sends GameEvent
131125
if (Creature* leftHead = instance->GetCreature(DATA_LEFT_HEAD))
132126
leftHead->AI()->DoAction(RAND(ACTION_ATTACK_1, ACTION_ATTACK_2, ACTION_ATTACK_3, ACTION_ATTACK_4));
133-
}
134127

135128
if (spell->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_BURNING_MAUL, me))
136129
Talk(EMOTE_ROAR);
@@ -401,8 +394,6 @@ struct npc_omrogg_heads : public ScriptedAI
401394
InstanceScript* _instance;
402395
};
403396

404-
/// @todo: This requires additional research. Is it handled correctly? Isn't it too over-powered?
405-
// That's a lot of damage if all melee attacks are successful so we cast it not always for now. No ProcCategoryRecovery for both spells
406397
// 30598, 36056 - Burning Maul
407398
class spell_omrogg_burning_maul : public AuraScript
408399
{
@@ -427,8 +418,10 @@ class spell_omrogg_burning_maul : public AuraScript
427418

428419
void OnProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
429420
{
430-
if (roll_chance_i(50))
431-
GetTarget()->CastSpell(GetTarget(), SPELL_BLAST_WAVE);
421+
/// @todo: This requires additional research. Is it handled correctly? Isn't it too over-powered?
422+
/// That's a lot of damage if all melee attacks are successful so we cast it not always for now. No ProcCategoryRecovery for both spells
423+
if (roll_chance_i(30))
424+
GetTarget()->CastSpell(nullptr, SPELL_BLAST_WAVE);
432425
}
433426

434427
void Register() override
@@ -439,9 +432,33 @@ class spell_omrogg_burning_maul : public AuraScript
439432
}
440433
};
441434

435+
// 30618 - Beatdown
436+
class spell_omrogg_beatdown : public SpellScript
437+
{
438+
PrepareSpellScript(spell_omrogg_beatdown);
439+
440+
void HandleAfterCast()
441+
{
442+
if (Creature* creature = GetCaster()->ToCreature())
443+
{
444+
creature->GetThreatManager().ResetAllThreat();
445+
446+
if (creature->GetAI())
447+
if (Unit* target = creature->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, true))
448+
creature->AI()->AttackStart(target);
449+
}
450+
}
451+
452+
void Register() override
453+
{
454+
AfterCast += SpellCastFn(spell_omrogg_beatdown::HandleAfterCast);
455+
}
456+
};
457+
442458
void AddSC_boss_warbringer_omrogg()
443459
{
444460
RegisterShatteredHallsCreatureAI(boss_warbringer_omrogg);
445461
RegisterShatteredHallsCreatureAI(npc_omrogg_heads);
446462
RegisterSpellScript(spell_omrogg_burning_maul);
463+
RegisterSpellScript(spell_omrogg_beatdown);
447464
}

0 commit comments

Comments
 (0)