void AttackStart(Unit *who) { if (caster) AttackStartCaster(who, 20); else BossAI::AttackStart(who); }
void AttackStart(Unit* victim) override { Creature* gormok = _instance->GetCreature(DATA_GORMOK_THE_IMPALER); if (!_mountedOnPlayer && (!gormok || !gormok->IsAlive())) AttackStartCaster(victim, 30.0f); else ScriptedAI::AttackStart(victim); }
void StoryAI::AttackStart(Unit* victim) { if (_spellQueue.empty() && init) { if (victim && me->Attack(victim, true)) me->GetMotionMaster()->MoveChase(victim); } else AttackStartCaster(victim, 30.0f); }
void SimpleCharmedPlayerAI::UpdateAI(const uint32 /*diff*/) { Creature* charmer = me->GetCharmer() ? me->GetCharmer()->ToCreature() : nullptr; if (!charmer) return; //kill self if charm aura has infinite duration if (charmer->IsInEvadeMode()) { Player::AuraEffectList const& auras = me->GetAuraEffectsByType(SPELL_AURA_MOD_CHARM); for (Player::AuraEffectList::const_iterator iter = auras.begin(); iter != auras.end(); ++iter) if ((*iter)->GetCasterGUID() == charmer->GetGUID() && (*iter)->GetBase()->IsPermanent()) { me->KillSelf(); return; } } if (charmer->IsInCombat()) { Unit* target = me->GetVictim(); if (!target || !charmer->IsValidAttackTarget(target) || target->HasBreakableByDamageCrowdControlAura()) { target = SelectAttackTarget(); if (!target) return; if (IsRangedAttacker()) AttackStartCaster(target, 28.0f); else AttackStart(target); } DoAutoAttackIfReady(); } else { me->AttackStop(); me->CastStop(); me->StopMoving(); me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveFollow(charmer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); } }
void AttackStart(Unit* victim) { AttackStartCaster(victim, 10);//keep back & toss bombs/shoot }
void AttackStart(Unit* who) { AttackStartCaster(who, 20.0f); }