Skip to content

Commit

Permalink
Small updates for raid encounters
Browse files Browse the repository at this point in the history
* Fix initial Brood Affliction timer (Chromaggus)
* Add missing emote (Chromaggus)
* Clarify name of an enum and make use of it (Ragnaros)
* Add missing additional spells for Chromatic Mutation (Chromaggus)
* Code clean-up for a few spell effects
  • Loading branch information
cala committed Nov 7, 2017
1 parent 596d307 commit 11a2123
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 33 deletions.
Expand Up @@ -27,6 +27,7 @@ EndScriptData */
enum
{
EMOTE_GENERIC_FRENZY_KILL = -1000001,
EMOTE_GENERIC_FRENZY = -1000002,
EMOTE_SHIMMER = -1469003,

SPELL_BREATH_SELECTION = 23195,
Expand Down Expand Up @@ -71,7 +72,7 @@ struct boss_chromaggusAI : public ScriptedAI
m_uiBreathLeftTimer = 30000; // Left breath is 30 seconds
m_uiBreathRightTimer = 60000; // Right is 1 minute so that we can alternate
}
m_uiAfflictionTimer = 10000;
m_uiAfflictionTimer = 7 * IN_MILLISECONDS;
m_uiFrenzyTimer = 15000;
m_bEnraged = false;
}
Expand Down Expand Up @@ -133,7 +134,7 @@ struct boss_chromaggusAI : public ScriptedAI
if (m_uiAfflictionTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_BROOD_AFFLICTION) == CAST_OK)
m_uiAfflictionTimer = 7000;
m_uiAfflictionTimer = 7 * IN_MILLISECONDS;
}
else
m_uiAfflictionTimer -= uiDiff;
Expand All @@ -154,6 +155,7 @@ struct boss_chromaggusAI : public ScriptedAI
if (!m_bEnraged && m_creature->GetHealthPercent() < 20.0f)
{
DoCastSpellIfCan(m_creature, SPELL_ENRAGE);
DoScriptText(EMOTE_GENERIC_FRENZY, m_creature);
m_bEnraged = true;
}

Expand Down
Expand Up @@ -47,7 +47,7 @@ enum
SPELL_LAVA_BURST = 21908, // Randomly trigger one of spells 21886, 21900 - 21907 which summons Go 178088
SPELL_SUMMON_SONS_FLAME = 21108, // Trigger the eight spells summoning the Son of Flame adds

MAX_ADDS_IN_SUBMERGE = 8,
NB_ADDS_IN_SUBMERGE = 8,
NPC_SON_OF_FLAME = 12143,
NPC_FLAME_OF_RAGNAROS = 13148,
};
Expand Down Expand Up @@ -301,7 +301,7 @@ struct boss_ragnarosAI : public Scripted_NoMovementAI

// Summon 8 elementals around the boss
if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_SONS_FLAME) == CAST_OK)
m_uiAddCount = 8;
m_uiAddCount = NB_ADDS_IN_SUBMERGE;

return;
}
Expand Down
37 changes: 8 additions & 29 deletions src/game/Spells/SpellEffects.cpp
Expand Up @@ -1223,15 +1223,8 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
// until there are 15 appliance of the chosen brood affliction

// Brood Affliction selection
uint32 spellAfflict = 0;
switch (urand(0, 4))
{
case 0: spellAfflict = 23153; break; // Brood Affliction: Blue
case 1: spellAfflict = 23154; break; // Brood Affliction: Black
case 2: spellAfflict = 23155; break; // Brood Affliction: Red
case 3: spellAfflict = 23170; break; // Brood Affliction: Bronze
case 4: spellAfflict = 23169; break; // Brood Affliction: Green
}
uint32 afflictions[] = { 23153, 23154, 23155, 23170, 23169 }; // Blue / Black / Red / Bronze / Green
uint32 spellAfflict = afflictions[urand(0, 4)];

// Get the fifteen (potentially duplicate) targets from threat list
GuidVector vGuids;
Expand Down Expand Up @@ -1273,6 +1266,8 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
{
unit->RemoveAllAuras();
m_caster->CastSpell(unit, 23174, TRIGGERED_OLD_TRIGGERED);
unit->CastSpell(unit, 23175, TRIGGERED_OLD_TRIGGERED);
unit->CastSpell(unit, 23177, TRIGGERED_OLD_TRIGGERED);
}
}
return;
Expand All @@ -1287,28 +1282,12 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
uint8 leftBreath = (rightBreath + urand(1, 4)) % 5;

// Sending left breath to instance script
uint32 breathSpellId = 0;
switch (leftBreath)
{
case 0: breathSpellId = 23317; break;
case 1: breathSpellId = 23318; break;
case 2: breathSpellId = 23319; break;
case 3: breathSpellId = 23320; break;
case 4: breathSpellId = 23321; break;
}
m_caster->CastSpell(m_caster, breathSpellId, TRIGGERED_OLD_TRIGGERED);
uint32 leftBreaths[] = { 23317, 23318, 23319, 23320, 23321 };
m_caster->CastSpell(m_caster, leftBreaths[leftBreath], TRIGGERED_OLD_TRIGGERED);

// Sending right breath to instance script
breathSpellId = 0;
switch (rightBreath)
{
case 0: breathSpellId = 23322; break;
case 1: breathSpellId = 23323; break;
case 2: breathSpellId = 23324; break;
case 3: breathSpellId = 23325; break;
case 4: breathSpellId = 23326; break;
}
m_caster->CastSpell(m_caster, breathSpellId, TRIGGERED_OLD_TRIGGERED);
uint32 rightBreaths[] = { 23322, 23323, 23324, 23325, 23326 };
m_caster->CastSpell(m_caster, rightBreaths[rightBreath], TRIGGERED_OLD_TRIGGERED);

return;
}
Expand Down

0 comments on commit 11a2123

Please sign in to comment.