Jump to content
TrinityCore
Sign in to follow this  
Chaklun

Tentacle of the old ones don't cast

Recommended Posts

I added script in the core but https://www.wowhead.com/npc=58078 don't cast spell.

Code:

class npc_Tentacle_of_the_Old_Ones : public CreatureScript
{
public:
    npc_Tentacle_of_the_Old_Ones() : CreatureScript("npc_Tentacle_of_the_Old_Ones") { }

    struct npc_Tentacle_of_the_Old_OnesAI : CasterAI
    {
        npc_Tentacle_of_the_Old_OnesAI(Creature* creature) : CasterAI(creature) {}

        uint32 Mindflays_Timer;

        void InitializeAI()
        {
            CasterAI::InitializeAI();
            Unit* owner = me->GetOwner();
            if (!owner)
                return;

            me->SetReactState(REACT_AGGRESSIVE);
        }

        void UpdateAI(const uint32 diff)
        {
            if (!UpdateVictim())
                return;

            if (Mindflays_Timer <= diff)
            {
                DoCast(me->GetVictim(), 52586);
                Mindflays_Timer = 6000;
            }
            else Mindflays_Timer -= diff;
        }
        void EnterCombat(Unit* /*who*/)
        {
            DoCast(me->GetVictim(), 52586);
        }

    };

    CreatureAI* GetAI(Creature* creature) const
    {
        return new npc_Tentacle_of_the_Old_OnesAI(creature);
    }
};

P.S. I added script in DB.

Share this post


Link to post
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.   Paste as plain text instead

  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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...