137 for (
uint8 i = 1; i <= 3; ++i)
139 std::list<TempSummon*> adds;
319 if (
Creature* summoner = meSummon->GetSummonerCreatureBase())
325 std::list<Creature*> others;
331 other->AI()->AttackStart(who);
335 if (
Creature* summoner = meSummon->GetSummonerCreatureBase())
381 if (
Creature* summoner = meSummon->GetSummonerCreatureBase())
415 if (krikthir && krikthir->
IsAlive())
480 if (krikthir && krikthir->
IsAlive())
545 if (krikthir && krikthir->
IsAlive())
754 gatewatcher->AI()->JustSummoned(
me);
770 gatewatcher->AI()->JustSummoned(
me);
788 if (
Unit* summoner = meSummon->GetSummonerUnit())
799 auto it = targetList.begin();
800 while (it != targetList.end())
803 if (creature->IsAlive() && !creature->IsInCombat())
808 it = targetList.erase(it);
816 if (!targetList.empty())
824 targetList.push_back(target);
893 if (watcher->IsAlive())
std::chrono::seconds Seconds
Seconds shorthand typedef.
Milliseconds randtime(Milliseconds min, Milliseconds max)
#define RegisterSpellScript(spell_script)
@ TARGET_UNIT_SRC_AREA_ENTRY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ AURA_EFFECT_HANDLE_REAL
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectRemoveFn(F, I, N, M)
#define RegisterAzjolNerubCreatureAI(ai_name)
@ ACTION_GATEWATCHER_GREET
void AddSC_boss_krik_thir()
@ SPELL_SUBBOSS_AGGRO_TRIGGER
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > OnEffectRemove
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
virtual void MoveInLineOfSight(Unit *)
virtual void JustEngagedWith(Unit *)
virtual void JustDied(Unit *)
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
virtual void JustAppeared()
void SetCombatPulseDelay(uint32 delay)
float GetAttackDistance(Unit const *player) const
bool HasReactState(ReactStates state) const
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
bool CanStartAttack(Unit const *u, bool force) const
void Repeat(Milliseconds time)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
void CancelEvent(uint32 eventId)
void RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Creature * GetCreature(uint32 type)
EncounterState GetBossState(uint32 id) const
static Creature * ToCreature(Object *o)
static Unit * ToUnit(Object *o)
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void DoZoneInCombat(uint32 entry=0)
virtual void DoAction(int32)
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
virtual void InitializeAI()
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
Unit * getAttackerForHelper() const
TempSummon * ToTempSummon()
bool HealthBelowPct(int32 pct) const
bool HasUnitState(const uint32 f) const
InstanceScript * GetInstanceScript() const
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
bool isInBack(WorldObject const *target, float arc=float(M_PI)) const
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
virtual uint32 GetData(uint32) const
virtual void SetData(uint32, uint32)
achievement_watch_him_die()
bool OnCheck(Player *, Unit *target) override
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
void HandleTargets(std::list< WorldObject * > &targetList)
bool Validate(SpellInfo const *) override
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
void JustAppeared() override
void EnterEvadeMode(EvadeReason) override
void MoveInLineOfSight(Unit *who) override
void UpdateAI(uint32 diff) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void KilledUnit(Unit *victim) override
void JustDied(Unit *) override
void JustEngagedWith(Unit *who) override
void SpellHitTarget(WorldObject *, SpellInfo const *spellInfo) override
void DoAction(int32 action) override
boss_krik_thir(Creature *creature)
void UpdateAI(uint32 diff) override
npc_anub_ar_shadowcaster(Creature *creature)
void _JustEngagedWith() override
void _JustEngagedWith() override
npc_anub_ar_skirmisher(Creature *creature)
void UpdateAI(uint32 diff) override
void SpellHitTarget(WorldObject *target, SpellInfo const *spellInfo) override
void _JustEngagedWith() override
void UpdateAI(uint32 diff) override
npc_anub_ar_warrior(Creature *creature)
void JustEngagedWith(Unit *who) override
InstanceScript * _instance
void EnterEvadeMode(EvadeReason why) override
npc_gatewatcher_petAI(Creature *creature, bool isWatcher)
void SetData(uint32 data, uint32 value) override
virtual void _JustEngagedWith()=0
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void MoveInLineOfSight(Unit *who) override
uint32 GetData(uint32 data) const override
npc_gatewatcher_web_wrap(Creature *creature)
void JustDied(Unit *) override
void InitializeAI() override
void JustDied(Unit *killer) override
npc_skittering_infector(Creature *creature)
npc_skittering_swarmer(Creature *creature)
void InitializeAI() override
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override
void _JustEngagedWith() override
npc_watcher_gashra(Creature *creature)
void JustDied(Unit *) override
npc_watcher_narjil(Creature *creature)
void _JustEngagedWith() override
void UpdateAI(uint32 diff) override
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override
npc_watcher_silthik(Creature *creature)
void _JustEngagedWith() override