diff --git a/src/naxx40Scripts/boss_four_horsemen_40.cpp b/src/naxx40Scripts/boss_four_horsemen_40.cpp index 09db2d2..20717e7 100644 --- a/src/naxx40Scripts/boss_four_horsemen_40.cpp +++ b/src/naxx40Scripts/boss_four_horsemen_40.cpp @@ -470,15 +470,42 @@ class spell_four_horsemen_consumption : public SpellScript { PrepareSpellScript(spell_four_horsemen_consumption); - void HandleDamageCalc(SpellEffIndex /*effIndex*/) + void CalculateDamage(SpellEffIndex /*effIndex*/) { - uint32 damage = GetCaster()->GetMap()->ToInstanceMap()->GetDifficulty() == REGULAR_DIFFICULTY ? 2750 : 4250; - SetHitDamage(damage); + Map* map = GetCaster()->GetMap(); + if (!map) + { + return; + } + int32 value = 0; + if (map->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL) // NAXX25 N + { + value = urand(4500, 4700); + } + else if (map->GetId() == 533) // NAXX10 N + { + if (map->GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL) + { + value = urand(3000, 3200); + } + else + { + value = urand(3960, 4840); // NAXX40 + } + } + else if (map->GetId() == 532) // Karazhan + { + value = urand(1110, 1310); + } + if (value) + { + SetEffectValue(value); + } } void Register() override { - OnEffectHitTarget += SpellEffectFn(spell_four_horsemen_consumption::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); + OnEffectLaunchTarget += SpellEffectFn(spell_four_horsemen_consumption::CalculateDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); } }; @@ -486,5 +513,5 @@ void AddSC_boss_four_horsemen_40() { new boss_four_horsemen_40(); new spell_four_horsemen_mark(); -// RegisterSpellScript(spell_four_horsemen_consumption); + RegisterSpellScript(spell_four_horsemen_consumption); }