예제 #1
0
 void HandleBugs(uint32 diff)
 {
     if (BugsTimer < diff || Abuse_Bug_Timer <= diff)
     {
         Creature* c = RespawnNearbyBugsAndGetOne();
         if (Abuse_Bug_Timer <= diff)
         {
             if (c)
             {
                 CastSpellOnBug(c);
                 Abuse_Bug_Timer = urand(10000, 17000);
             }
             else
             {
                 Abuse_Bug_Timer = 1000;
             }
         }
         else
         {
             Abuse_Bug_Timer -= diff;
         }
         BugsTimer = 2000;
     }
     else
     {
         BugsTimer -= diff;
         Abuse_Bug_Timer -= diff;
     }
 }
예제 #2
0
    void HandleBugs(uint32 diff)
    {
        if (BugsTimer < diff || Abuse_Bug_Timer < diff)
        {
            Creature *c = RespawnNearbyBugsAndGetOne(IAmVeklor() ? 15316 : 15317);
            if (Abuse_Bug_Timer < diff)
            {
                if (c)
                {
                    CastSpellOnBug(c);

                    if (m_creature->getVictim())
                    {
                        c->Attack(m_creature->getVictim(), false);
                        c->GetMotionMaster()->MoveChase(m_creature->getVictim());
                    }

                    Abuse_Bug_Timer = urand(10000, 17000);
                }
                else
                {
                    Abuse_Bug_Timer = 1000;
                }
            }
            else
            {
                Abuse_Bug_Timer -= diff;
            }
            BugsTimer = 2000;
        }
        else
        {
            BugsTimer -= diff;
            Abuse_Bug_Timer -= diff;
        }
    }