Jump to content
TrinityCore

Tentacle of the old ones don't cast


Chaklun
 Share

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.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...