void UpdateAI(uint32 diff) override
 {
     if (_nextMovement)
     {
         me->GetMotionMaster()->MovePoint(_nextMovement + 1, _initialPath[_nextMovement], true);
         _nextMovement = 0;
     }
     _UpdateAI(diff);
 }
Пример #2
0
        void UpdateAI(uint32 diff) override
        {
            if (!UpdateVictim())
                return;

            if (!_gateIsOpen && !isOnSameSide(me->GetVictim()))
            { // reset threat, then try to find someone on same side as us to attack
                if (Player* newTarget = FindEligibleTarget(me, _gateIsOpen))
                {
                    me->RemoveAurasByType(SPELL_AURA_MOD_TAUNT);
                    me->getThreatManager().resetAllAggro();
                    me->AddThreat(newTarget, 1.0f);
                    AttackStart(newTarget);
                }
                else
                    EnterEvadeMode(EVADE_REASON_NO_HOSTILES);
            }

            _UpdateAI(diff);
        }