DB/Quest: Update 'Leave Nothing to Chance'

This commit is contained in:
offl
2022-02-27 21:08:37 +02:00
parent 45d6cd42b7
commit 70ebac6cf4
2 changed files with 45 additions and 48 deletions

View File

@@ -898,53 +898,6 @@ class spell_q14076_14092_pound_drum : public SpellScript
}
};
enum LeaveNothingToChance
{
NPC_UPPER_MINE_SHAFT = 27436,
NPC_LOWER_MINE_SHAFT = 27437,
SPELL_UPPER_MINE_SHAFT_CREDIT = 48744,
SPELL_LOWER_MINE_SHAFT_CREDIT = 48745,
};
// 48742 - Wintergarde Mine Explosion
class spell_q12277_wintergarde_mine_explosion : public SpellScript
{
PrepareSpellScript(spell_q12277_wintergarde_mine_explosion);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Creature* unitTarget = GetHitCreature())
{
if (Unit* caster = GetCaster())
{
if (caster->GetTypeId() == TYPEID_UNIT)
{
if (Unit* owner = caster->GetOwner())
{
switch (unitTarget->GetEntry())
{
case NPC_UPPER_MINE_SHAFT:
caster->CastSpell(owner, SPELL_UPPER_MINE_SHAFT_CREDIT, true);
break;
case NPC_LOWER_MINE_SHAFT:
caster->CastSpell(owner, SPELL_LOWER_MINE_SHAFT_CREDIT, true);
break;
default:
break;
}
}
}
}
}
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_q12277_wintergarde_mine_explosion::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
enum FocusOnTheBeach
{
SPELL_BUNNY_CREDIT_BEAM = 47390,
@@ -2311,7 +2264,6 @@ void AddSC_quest_spell_scripts()
RegisterSpellScript(spell_q14112_14145_chum_the_water);
RegisterSpellScript(spell_q9452_cast_net);
RegisterSpellScript(spell_q14076_14092_pound_drum);
RegisterSpellScript(spell_q12277_wintergarde_mine_explosion);
RegisterSpellScript(spell_q12066_bunny_kill_credit);
RegisterSpellScript(spell_q12735_song_of_cleansing);
RegisterSpellScript(spell_q12372_cast_from_gossip_trigger);