void MoveInLineOfSight(Unit *who) { if (who->GetEntry() == MOB_ZOMBIE && me->IsWithinDistInMap(who, 7)) { SetGazeOn(who); // TODO: use a script text me->MonsterTextEmote(EMOTE_NEARBY, 0, true); } else BossAI::MoveInLineOfSight(who); }
void MoveInLineOfSight(Unit *who) { if (who->GetEntry() == MOB_ZOMBIE && me->IsWithinDistInMap(who, 20)) { SetGazeOn(who); me->MonsterTextEmote(" spots a nearby zombie to devour!", 0, true); } else BossAI::MoveInLineOfSight(who); }
void MoveInLineOfSight(Unit* who) { if(who->GetEntry() == MOB_ZOMBIE && me->IsWithinDistInMap(who, 7)) { SetGazeOn(who); AttackGluth(who->ToCreature()); me->MonsterTextEmote(EMOTE_NEARBY, 0, true); } else BossAI::MoveInLineOfSight(who); }
void MoveInLineOfSight(Unit* who) { if (who->GetEntry() == NPC_ZOMBIE && me->IsWithinDistInMap(who, 7)) { SetGazeOn(who); Talk(EMOTE_NEARBY); } else BossAI::MoveInLineOfSight(who); }
void MoveInLineOfSight(Unit* who) override { if (who->GetEntry() == NPC_ZOMBIE && me->IsWithinDistInMap(who, 7)) { SetGazeOn(who); /// @todo use a script text me->MonsterTextEmote(EMOTE_NEARBY, NULL, true); } else BossAI::MoveInLineOfSight(who); }
void MoveInLineOfSight(Unit* who) override { if (who->GetEntry() == NPC_ZOMBIE && me->IsWithinDistInMap(who, 7)) { SetGazeOn(who); /// @todo use a script text //me->TextEmote(EMOTE_NEARBY, nullptr, true); me->Kill(who); me->ModifyHealth(me->CountPctFromMaxHealth(5)); } else BossAI::MoveInLineOfSight(who); }
void MoveInLineOfSight(Unit* who) override { if (who->GetEntry() == NPC_ZOMBIE && me->IsWithinDistInMap(who, 7)) { SetGazeOn(who); Talk(EMOTE_ZOMBIE); me->Kill(who); me->ModifyHealth(me->CountPctFromMaxHealth(5)); } else BossAI::MoveInLineOfSight(who); }
void UpdateAI(uint32 diff) { if (_initialSelection) { _initialSelection = false; // Find victim of Summon Gargoyle spell std::list<Unit*> targets; Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(me, me, 50); Trinity::UnitListSearcher<Trinity::AnyUnfriendlyUnitInObjectRangeCheck> searcher(me, targets, u_check); me->VisitNearbyObject(50, searcher); for (std::list<Unit*>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter) if ((*iter)->GetAura(SPELL_DK_SUMMON_GARGOYLE_1, me->GetOwnerGUID())) { (*iter)->RemoveAura(SPELL_DK_SUMMON_GARGOYLE_1, me->GetOwnerGUID()); SetGazeOn(*iter); _targetGUID = (*iter)->GetGUID(); break; } } if (_despawnTimer > 4000) { _despawnTimer -= diff; if (!UpdateVictimWithGaze()) { MySelectNextTarget(); return; } _initialCastTimer += diff; _selectionTimer += diff; if (_selectionTimer >= 1000) { MySelectNextTarget(); _selectionTimer = 0; } if (_initialCastTimer >= 2000 && !me->HasUnitState(UNIT_STATE_CASTING|UNIT_STATE_LOST_CONTROL) && me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_CONTROLLED) == NULL_MOTION_TYPE) me->CastSpell(me->GetVictim(), 51963, false); } else { if (!_despawning) FlyAway(); if (_despawnTimer > diff) _despawnTimer -= diff; else me->DespawnOrUnsummon(); } }
void MySelectNextTarget() { Unit* owner = me->GetOwner(); if (owner && owner->GetTypeId() == TYPEID_PLAYER && (!me->GetVictim() || me->GetVictim()->IsImmunedToSpell(sSpellMgr->GetSpellInfo(51963)) || !me->IsValidAttackTarget(me->GetVictim()) || !owner->CanSeeOrDetect(me->GetVictim()))) { Unit* selection = owner->ToPlayer()->GetSelectedUnit(); if (selection && selection != me->GetVictim() && me->IsValidAttackTarget(selection)) { me->GetMotionMaster()->Clear(false); SetGazeOn(selection); } else if (!me->GetVictim() || !owner->CanSeeOrDetect(me->GetVictim())) { me->CombatStop(true); me->GetMotionMaster()->Clear(false); me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, 0.0f); RemoveTargetAura(); } } }