mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Spell Script for quests Among the Champions and The Grand Melee
Solves issues with the credit spells hitting the mount instead of the player itself.
This commit is contained in:
@@ -2453,6 +2453,35 @@ class spell_q12414_hand_over_reins : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 13790 13793 13811 13814 - Among the Champions
|
||||
// 13665 13745 13750 13756 13761 13767 13772 13777 13782 13787 - The Grand Melee
|
||||
class spell_q13665_q13790_bested_trigger : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_q13665_q13790_bested_trigger() : SpellScriptLoader("spell_q13665_q13790_bested_trigger") { }
|
||||
|
||||
class spell_q13665_q13790_bested_trigger_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q13665_q13790_bested_trigger_SpellScript);
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* target = GetHitUnit()->GetCharmerOrOwnerOrSelf();
|
||||
target->CastSpell(target, uint32(GetEffectValue()));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_q13665_q13790_bested_trigger_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_q13665_q13790_bested_trigger_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_quest_spell_scripts()
|
||||
{
|
||||
new spell_q55_sacred_cleansing();
|
||||
@@ -2512,4 +2541,5 @@ void AddSC_quest_spell_scripts()
|
||||
new spell_q14100_q14111_make_player_destroy_totems();
|
||||
new spell_q10929_fumping();
|
||||
new spell_q12414_hand_over_reins();
|
||||
new spell_q13665_q13790_bested_trigger();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user