Jump to content

Need Help on Script


Recommended Posts

Please help me out with this script i dont know whats wrong with it When i write it in vs it tells me No instance of constructor matches the argument list

class spell_mage_temporal_shield_trigger : public SpellScriptLoader
{
public:
    spell_mage_temporal_shield_trigger() : SpellScriptLoader("spell_mage_temporal_shield_trigger") {}
    class spell_mage_temporal_shield_trigger_AuraScript : public AuraScript
    {//this script will be added to 115610 for triggering 115611
        PrepareAuraScript(spell_mage_temporal_shield_trigger);
        void HandleAfterEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
        {
            TC_LOG_INFO("misc", "Aura Effect has just been applied on target!");
            Unit* caster = GetTarget();
            if (caster->HasAura(115610) && caster->MeleeDamageBonusTaken || caster->HasAura(115610) && caster->SpellDamageBonusTaken)
                caster->CastSpell(caster, 115611, true);
        }
        void Register() OVERRIDE
        {
            AfterEffectApply += AuraEffectApplyFn(spell_mage_temporal_shield_trigger_AuraScript::HandleAfterEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
        }
            AuraScript* GetAuraScript() const OVERRIDE
        {
            return new spell_mage_temporal_shield_trigger_AuraScript();
        }

Link to comment
Share on other sites

Please help me out with this script i dont know whats wrong with it When i write it in vs it tells me No instance of constructor matches the argument list

class spell_mage_temporal_shield_trigger : public SpellScriptLoader
{
public:
    spell_mage_temporal_shield_trigger() : SpellScriptLoader("spell_mage_temporal_shield_trigger") {}
    class spell_mage_temporal_shield_trigger_AuraScript : public AuraScript
    {//this script will be added to 115610 for triggering 115611
        PrepareAuraScript(spell_mage_temporal_shield_trigger);
        void HandleAfterEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
        {
            TC_LOG_INFO("misc", "Aura Effect has just been applied on target!");
            Unit* caster = GetTarget();
            if (caster->HasAura(115610) && caster->MeleeDamageBonusTaken || caster->HasAura(115610) && caster->SpellDamageBonusTaken)
                caster->CastSpell(caster, 115611, true);
        }
        void Register() OVERRIDE
        {
            AfterEffectApply += AuraEffectApplyFn(spell_mage_temporal_shield_trigger_AuraScript::HandleAfterEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
        }
            AuraScript* GetAuraScript() const OVERRIDE
        {
            return new spell_mage_temporal_shield_trigger_AuraScript();
        }

Please help me out with this script i dont know whats wrong with it When i write it in vs it tells me No instance of constructor matches the argument list

class spell_mage_temporal_shield_trigger : public SpellScriptLoader
{
public:
    spell_mage_temporal_shield_trigger() : SpellScriptLoader("spell_mage_temporal_shield_trigger") {}
    class spell_mage_temporal_shield_trigger_AuraScript : public AuraScript
    {//this script will be added to 115610 for triggering 115611
        PrepareAuraScript(spell_mage_temporal_shield_trigger);
        void HandleAfterEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
        {
            TC_LOG_INFO("misc", "Aura Effect has just been applied on target!");
            Unit* caster = GetTarget();
            if (caster->HasAura(115610) && caster->MeleeDamageBonusTaken || caster->HasAura(115610) && caster->SpellDamageBonusTaken)
                caster->CastSpell(caster, 115611, true);
        }
        void Register() OVERRIDE
        {
            AfterEffectApply += AuraEffectApplyFn(spell_mage_temporal_shield_trigger_AuraScript::HandleAfterEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
        }
            AuraScript* GetAuraScript() const OVERRIDE
        {
            return new spell_mage_temporal_shield_trigger_AuraScript();
        }

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.