Skip to content

Commit

Permalink
[spell_script] Prevent scourge strike 28265 from being executed on pl…
Browse files Browse the repository at this point in the history
…ayer/playercontrolled
  • Loading branch information
AnonXS authored and killerwife committed Dec 20, 2021
1 parent df2aab0 commit 4f33dda
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sql/scriptdev2/spell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
(26767,'spell_cthun_tentacles_summon'),
(26769,'spell_cthun_periodic_eye_trigger'),
(28282,'spell_ashbringer_item'),
(28441,'spell_ab_effect_000');
(28441,'spell_ab_effect_000'),
(28265,'spell_scourge_strike');

-- TBC
INSERT INTO spell_scripts(Id, ScriptName) VALUES
Expand Down
12 changes: 12 additions & 0 deletions src/game/AI/ScriptDevAI/scripts/world/spell_scripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,17 @@ struct IncreasedHealingDoneDummy : public AuraScript
}
};

struct spell_scourge_strike : public SpellScript
{
bool OnCheckTarget(const Spell* /*spell*/, Unit* target, SpellEffectIndex /*eff*/) const override
{
if (target->IsPlayer() || (target->IsPlayerControlled()))
return false;

return true;
}
};

void AddSC_spell_scripts()
{
Script* pNewScript = new Script;
Expand Down Expand Up @@ -1409,6 +1420,7 @@ void AddSC_spell_scripts()
RegisterSpellScript<spell_effect_summon_no_follow_movement>("spell_effect_summon_no_follow_movement");
RegisterAuraScript<SpellHasteHealerTrinket>("spell_spell_haste_healer_trinket");
RegisterAuraScript<IncreasedHealingDoneDummy>("spell_increased_healing_done_dummy");
RegisterSpellScript<spell_scourge_strike>("spell_scourge_strike");

// wotlk section
RegisterSpellScript<Replenishment>("spell_replenishment");
Expand Down

0 comments on commit 4f33dda

Please sign in to comment.