Jump to content
TrinityCore

soul shards aura


timsar
 Share

Recommended Posts

soul shards aura must generate up to 3 soul for warlock

if soul is over 3 it'll decrease soul shards to 3 but below 3 not work(must generate soul shard to 3)

i wrote this script but could not hook aura

it just work if i use .cast 246985 in game.

can you please help me how to hook this aura?

 

SPELL_WARLOCK_SOUL_SHARDS                        =247054,

 

// 246985 - Soul Shards

class spell_warl_soul_shards : public SpellScriptLoader
{
public:
    spell_warl_soul_shards() : SpellScriptLoader("spell_warl_soul_shards") { }

    class spell_warl_soul_shards_AuraScript : public AuraScript
    {
        PrepareAuraScript(spell_warl_soul_shards_AuraScript);

        bool Validate(SpellInfo const* /*spellInfo*/) override
        {
            return ValidateSpellInfo({ SPELL_WARLOCK_SOUL_SHARDS });
        }
        void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
        {
            PreventDefaultAction();
            GetCaster()->CastSpell(GetCaster(), SPELL_WARLOCK_SOUL_SHARDS, true);
            
        }
        void Register() override
        {
            OnEffectApply += AuraEffectApplyFn(spell_warl_soul_shards_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);           
        }
    };

    AuraScript* GetAuraScript() const override
    {
        return new spell_warl_soul_shards_AuraScript();
    }
};

Edited by timsar
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...