Esempio n. 1
0
 void StartAttack(Unit* u, bool force = false)
 {
     if (GetBotCommandState() == COMMAND_ATTACK && !force) return;
     Aggro(u);
     SetBotCommandState(COMMAND_ATTACK);
     GetInPosition(force, true);
 }
Esempio n. 2
0
 void CheckBlink(uint32 diff)
 {
     if (GetBotCommandState() == COMMAND_STAY || me->IsMounted()) return;
     if (!BLINK || Blink_cd > diff || me->getLevel() < 20 || IsCasting()) return;
     if (!me->IsInCombat() && me->GetExactDist(master) > std::max(float(master->GetBotFollowDist()), 35.f) &&
         me->HasInArc(M_PI*0.75f, master))
     {
         temptimer = GC_Timer;
         if (doCast(me, BLINK))
         {
             Blink_cd = 13000;
             GC_Timer = temptimer;
         }
         return;
     }
     if (!me->getAttackers().empty() && me->GetExactDist(master) > 15)
     {
         if (Unit* op = me->SelectNearestTarget(7))
         {
             if (op->GetVictim() == me)
             {
                 me->SetFacingTo(me->GetAngle(master));
                 temptimer = GC_Timer;
                 if (doCast(me, BLINK))
                 {
                     Blink_cd = 13000;
                     GC_Timer = temptimer;
                 }
             }
         }
     }
 }
Esempio n. 3
0
 void CheckBlink(uint32 diff)
 {
     if (GetBotCommandState() == COMMAND_STAY || me->IsMounted()) return;
     if (Blink_cd > diff || me->getLevel() < 20 || IsCasting()) return;
     if (me->GetExactDist(master) > std::max(float(master->GetBotFollowDist()), 25.f)/* && me->IsWithinLOSInMap(master)*/)
     {
         me->SetFacingTo(me->GetAngle(master));
         if (doCast(me, BLINK))
         {
             Blink_cd = 15000 - me->getLevel()/4 * 100; //13 sec with improved
             GC_Timer = 500;
         }
         return;
     }
     if (!me->getAttackers().empty() && me->GetExactDist(master) > 15)
     {
         if (Unit* op = me->SelectNearestTarget(10))
         {
             if (op->GetVictim() == me)
             {
                 me->SetFacingTo(me->GetAngle(master));
                 if (doCast(me, BLINK))
                 {
                     Blink_cd = 15000 - me->getLevel()/4 * 100; //13 sec with improved
                     GC_Timer = 500;
                 }
             }
         }
     }
 }
Esempio n. 4
0
 void StartAttack(Unit* u, bool force = false)
 {
     if (GetBotCommandState() == COMMAND_ATTACK && !force) return;
     Aggro(u);
     GetInPosition(force, true);
     SetBotCommandState(COMMAND_ATTACK);
     fear_cd = std::max<uint32>(fear_cd, 1000);
 }