aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Northrend
diff options
context:
space:
mode:
authoroffl <11556157+offl@users.noreply.github.com>2022-06-04 23:56:37 +0300
committerGitHub <noreply@github.com>2022-06-04 23:56:37 +0300
commit861ec6a5b9a1e579e3cc3e415898fe7a2a28cf62 (patch)
treee8c541032e0ac475709122bb5d52968c3fbfde6d /src/server/scripts/Northrend
parenta7fe0494bf6d6737b0a874ceddac0e2c089a7ce8 (diff)
Scripts/Quest: Rework 'The Way to His Heart...' & make SAI's StopFollow work again (#28001)
Diffstat (limited to 'src/server/scripts/Northrend')
-rw-r--r--src/server/scripts/Northrend/zone_howling_fjord.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/zone_howling_fjord.cpp b/src/server/scripts/Northrend/zone_howling_fjord.cpp
index fd063b3f7c4..9bdd11e9cbe 100644
--- a/src/server/scripts/Northrend/zone_howling_fjord.cpp
+++ b/src/server/scripts/Northrend/zone_howling_fjord.cpp
@@ -515,6 +515,50 @@ class spell_fjord_the_way_to_his_heart_anuniaq_net : public SpellScript
}
};
+// 44455 - The Way to His Heart...: Character Script Effect Reverse Cast
+class spell_fjord_the_way_to_his_heart_reverse_cast : public SpellScript
+{
+ PrepareSpellScript(spell_fjord_the_way_to_his_heart_reverse_cast);
+
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetCaster(), uint32(GetEffectValue()), true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_fjord_the_way_to_his_heart_reverse_cast::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 44462 - The Way to His Heart...: Cast Quest Complete on Master
+class spell_fjord_the_way_to_his_heart_quest_complete : public SpellScript
+{
+ PrepareSpellScript(spell_fjord_the_way_to_his_heart_quest_complete);
+
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (TempSummon* casterSummon = GetCaster()->ToTempSummon())
+ if (Unit* summoner = casterSummon->GetSummonerUnit())
+ summoner->CastSpell(summoner, uint32(GetEffectValue()), true);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_fjord_the_way_to_his_heart_quest_complete::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
void AddSC_howling_fjord()
{
RegisterCreatureAI(npc_daegarn);
@@ -527,4 +571,6 @@ void AddSC_howling_fjord()
RegisterSpellScript(spell_fjord_the_cleansing_mirror_image_script_effect);
RegisterSpellScript(spell_fjord_the_cleansing_on_death_cast_on_master);
RegisterSpellScript(spell_fjord_the_way_to_his_heart_anuniaq_net);
+ RegisterSpellScript(spell_fjord_the_way_to_his_heart_reverse_cast);
+ RegisterSpellScript(spell_fjord_the_way_to_his_heart_quest_complete);
}