Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //20375 - Seal of Command - Triggerspell distinction
- class spell_pal_seal_of_command : public SpellScriptLoader
- {
- public:
- spell_pal_seal_of_command() : SpellScriptLoader("spell_pal_seal_of_command") { }
- class spell_pal_seal_of_command_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_pal_seal_of_command_AuraScript);
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- // Check if spells are there?
- // TODO: Use Enums!!
- return ValidateSpellInfo({
- 20375,
- 69403,
- 20424});
- }
- bool CheckProc(ProcEventInfo& eventInfo)
- {
- return eventInfo.GetProcTarget() != nullptr;
- }
- void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
- {
- PreventDefaultAction();
- Unit* victim = eventInfo.GetProcTarget();
- SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
- // Cast Singletarget Proc on AOE Melees Hammer of Righteousness and Divine Storm
- if (!spellInfo || (spellInfo->Id != 53385 && spellInfo->Id != 53595))
- GetTarget()->CastSpell(victim, 20424);
- else
- GetTarget()->CastSpell(victim, 69403);
- }
- void Register() override
- {
- DoCheckProc += AuraCheckProcFn(spell_pal_seal_of_command_AuraScript::CheckProc);
- OnEffectProc += AuraEffectProcFn(spell_pal_seal_of_command_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
- }
- };
- AuraScript* GetAuraScript() const override
- {
- return new spell_pal_seal_of_command_AuraScript();
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement