Script/Quest: Apply Heat and Stir.
Enjoy one of the most frustrating quests in Northrend!
This commit is contained in:
1 parent
7835c9bd64
commit
d68a119d5d
2 files changed
+164
No files matched your search
@@ -2611,6 +2611,146 @@ class spell_q12414_hand_over_reins : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
enum ApplyHeatAndStir
|
||||
{
|
||||
SPELL_SPURTS_AND_SMOKE = 38594,
|
||||
SPELL_FAILED_MIX_1 = 43376,
|
||||
SPELL_FAILED_MIX_2 = 43378,
|
||||
SPELL_FAILED_MIX_3 = 43970,
|
||||
SPELL_SUCCESSFUL_MIX = 43377,
|
||||
|
||||
CREATURE_GENERIC_TRIGGER_LAB = 24042,
|
||||
|
||||
TALK_0 = 0,
|
||||
TALK_1 = 1
|
||||
};
|
||||
|
||||
class spell_q11306_mixing_blood : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_q11306_mixing_blood() : SpellScriptLoader("spell_q11306_mixing_blood") { }
|
||||
|
||||
class spell_q11306_mixing_blood_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q11306_mixing_blood_SpellScript);
|
||||
|
||||
void HandleEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Creature* trigger = caster->FindNearestCreature(CREATURE_GENERIC_TRIGGER_LAB, 100.0f))
|
||||
trigger->AI()->DoCastSelf(SPELL_SPURTS_AND_SMOKE);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHit += SpellEffectFn(spell_q11306_mixing_blood_SpellScript::HandleEffect, EFFECT_1, SPELL_EFFECT_SEND_EVENT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_q11306_mixing_blood_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_q11306_mixing_vrykul_blood : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_q11306_mixing_vrykul_blood() : SpellScriptLoader("spell_q11306_mixing_vrykul_blood") { }
|
||||
|
||||
class spell_q11306_mixing_vrykul_blood_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q11306_mixing_vrykul_blood_SpellScript);
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
uint8 chance = urand(0, 99);
|
||||
uint32 spellId = 0;
|
||||
|
||||
// 90% chance of getting one out of three failure effects
|
||||
if (chance < 30)
|
||||
spellId = SPELL_FAILED_MIX_1;
|
||||
else if (chance < 60)
|
||||
spellId = SPELL_FAILED_MIX_2;
|
||||
else if (chance < 90)
|
||||
spellId = SPELL_FAILED_MIX_3;
|
||||
else // 10% chance of successful cast
|
||||
spellId = SPELL_SUCCESSFUL_MIX;
|
||||
|
||||
caster->CastSpell(caster, spellId, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_q11306_mixing_vrykul_blood_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_q11306_mixing_vrykul_blood_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_q11306_failed_mix_43376 : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_q11306_failed_mix_43376() : SpellScriptLoader("spell_q11306_failed_mix_43376") { }
|
||||
|
||||
class spell_q11306_failed_mix_43376_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q11306_failed_mix_43376_SpellScript);
|
||||
|
||||
void HandleEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Creature* trigger = caster->FindNearestCreature(CREATURE_GENERIC_TRIGGER_LAB, 100.0f))
|
||||
trigger->AI()->Talk(TALK_0, caster);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHit += SpellEffectFn(spell_q11306_failed_mix_43376_SpellScript::HandleEffect, EFFECT_1, SPELL_EFFECT_SEND_EVENT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_q11306_failed_mix_43376_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_q11306_failed_mix_43378 : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_q11306_failed_mix_43378() : SpellScriptLoader("spell_q11306_failed_mix_43378") { }
|
||||
|
||||
class spell_q11306_failed_mix_43378_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q11306_failed_mix_43378_SpellScript);
|
||||
|
||||
void HandleEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Creature* trigger = caster->FindNearestCreature(CREATURE_GENERIC_TRIGGER_LAB, 100.0f))
|
||||
trigger->AI()->Talk(TALK_1, caster);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHit += SpellEffectFn(spell_q11306_failed_mix_43378_SpellScript::HandleEffect, EFFECT_2, SPELL_EFFECT_SEND_EVENT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_q11306_failed_mix_43378_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_quest_spell_scripts()
|
||||
{
|
||||
new spell_q55_sacred_cleansing();
|
||||
@@ -2675,4 +2815,8 @@ void AddSC_quest_spell_scripts()
|
||||
new spell_q28813_set_health_random();
|
||||
new spell_q13665_q13790_bested_trigger();
|
||||
new spell_q12414_hand_over_reins();
|
||||
new spell_q11306_mixing_blood();
|
||||
new spell_q11306_mixing_vrykul_blood();
|
||||
new spell_q11306_failed_mix_43376();
|
||||
new spell_q11306_failed_mix_43378();
|
||||
}
|
||||
Reference in new issue
Block a user