122 meleeContext.Repeat();
129 me->resetAttackTimer();
130 DoCastVictim(spellInfo->Id);
131 meleeContext.Repeat();
140 bool healing =
false;
217 DoCast(temp, me->GetEntry() == NPC_ALDOR_VINDICATOR ? SPELL_BANISHED_SHATTRATH_S : SPELL_BANISHED_SHATTRATH_A);
218 ObjectGuid playerGUID = temp->GetGUID();
219 banishContext.Schedule(Seconds(9), [this, playerGUID](TaskContext )
221 if (Unit* temp = ObjectAccessor::GetUnit(*me, playerGUID))
223 temp->CastSpell(temp, SPELL_EXILE, true);
224 temp->CastSpell(temp, SPELL_BANISH_TELEPORT, true);
@ SELECT_TARGET_ANY_FRIEND
@ SELECT_TARGET_ANY_ENEMY
std::chrono::seconds Seconds
Seconds shorthand typedef.
std::chrono::minutes Minutes
Minutes shorthand typedef.
#define NOMINAL_MELEE_RANGE
bool roll_chance_i(int chance)
if(posix_memalign(&__mallocedMemory, __align, __size)) return NULL
#define RegisterCreatureAI(ai_name)
bool IsInEvadeMode() const
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
TaskScheduler & Update(success_t const &callback=EmptyCallback)
TaskScheduler & SetValidator(P &&predicate)
Sets a validator which is asked if tasks are allowed to be executed.
void DoMeleeAttackIfReady()
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
bool IsWithinMeleeRange(Unit const *obj) const
bool HealthBelowPct(int32 pct) const
bool HasUnitState(const uint32 f) const
void HandleEmoteCommand(Emote emoteId)
void AttackerStateUpdate(Unit *victim, WeaponAttackType attType=BASE_ATTACK, bool extra=false)
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
void resetAttackTimer(WeaponAttackType type=BASE_ATTACK)
bool IsFriendlyTo(WorldObject const *target) const
@ NPC_STORMWIND_CITY_GUARD
@ NPC_CENARION_HOLD_INFANTRY
@ NPC_STORMWIND_CITY_PATROLLER
@ SPELL_BANISHED_SHATTRATH_S
@ SPELL_BANISHED_SHATTRATH_A
SpellInfo const * SelectSpell(Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
void UpdateAI(uint32 diff) override
void DoReplyToTextEmote(uint32 emote)
npc_guard_generic(Creature *creature)
TaskScheduler _combatScheduler
void ReceiveEmote(Player *player, uint32 textEmote) override
void JustEngagedWith(Unit *who) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
npc_guard_shattrath_faction(Creature *creature)