180 switch (spellInfo->
Id)
221 if (hatcherR || hatcherL)
296 std::vector<Creature*> triggers;
307 std::vector<Creature*> bombs;
506 janalai->AI()->JustSummoned(
me);
614 index = tick / 10 + 1;
636 targets.remove_if([caster](
WorldObject const* target)
638 return !caster->IsWithinDist(target, 50.0f);
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
#define RegisterSpellScript(spell_script)
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
void GetCreatureListWithOptionsInGrid(Container &container, WorldObject *source, float maxSearchRange, FindCreatureOptions const &options)
Creature * GetClosestCreatureWithOptions(WorldObject *source, float maxSearchRange, FindCreatureOptions const &options)
@ SPELL_EFFECT_APPLY_AURA
@ TARGET_UNIT_SRC_AREA_ENTRY
@ SPELL_AURA_PERIODIC_DUMMY
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
@ SPELL_FLAME_BREATH_GROUND
@ SPELL_SUMMON_FIRE_BOMB_25
@ SPELL_SUMMON_FIRE_BOMB_15
@ SPELL_SUMMON_ALL_PLAYERS_2
@ SPELL_FIRE_BOMB_MISSILE
@ SPELL_SUMMON_ALL_PLAYERS
@ SPELL_FIRE_BOMB_INITIAL
@ SPELL_SUMMON_FIRE_BOMB_10
@ SPELL_SUMMON_FIRE_BOMB_20
@ SPELL_SUMMON_FIRE_BOMB_30
@ SPELL_SUMMON_FIRE_BOMB_05
@ SPELL_TELEPORT_TO_CENTER
static constexpr std::string_view EggsStringIdL
static constexpr Position UpstairsPointL
static constexpr Position HatchEggsPointR
void AddSC_boss_janalai()
static constexpr std::array< uint32, 6 > SummonFireBombSpells
static constexpr Position HatchEggsPointL
static constexpr Position UpstairsPointR
static constexpr std::string_view EggsStringIdR
uint32 GetTickNumber() const
HookList< EffectPeriodicHandler > OnEffectPeriodic
void JustEngagedWith(Unit *who) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetCorpseDelay(uint32 delay, bool ignoreCorpseDecayRatio=false)
void Repeat(Milliseconds time)
void RescheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
void CancelEvent(EventId eventId)
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Creature * GetCreature(uint32 type)
bool SpawnGroupSpawn(uint32 groupId, bool ignoreRespawn=false, bool force=false, std::vector< WorldObject * > *spawnedObjects=nullptr)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
WorldLocation * GetHitDest() const
Aura * GetHitAura(bool dynObjAura=false, bool withRemoved=false) const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void Summon(Creature const *summon)
TaskContext & Repeat(TaskScheduler::duration_t duration)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & Update()
Update the scheduler to the current time.
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 DoCast(uint32 spellId)
MotionMaster * GetMotionMaster()
bool HealthBelowPctDamaged(float pct, uint32 damage) const
bool HasUnitState(const uint32 f) const
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
void MovePositionToFirstCollision(Position &pos, float dist, float angle) const
bool Validate(SpellInfo const *) override
void OnPeriodic(AuraEffect const *aurEff)
void SummonFlamePatch(AuraEffect const *aurEff) const
void InitOrientation(SpellEffIndex) const
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void RandomResize(C &container, std::size_t requestedSize)
float GetAbsoluteAngle(float x, float y) const
constexpr void GetPosition(float &x, float &y) const
constexpr float GetOrientation() const
ScriptedAI(Creature *creature, uint32 scriptId=0) noexcept
void UpdateAI(uint32 diff) override
bool _hasTriedToHatchEggs
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void OnSpellCast(SpellInfo const *spellInfo) override
void JustSummoned(Creature *summon) override
void JustDied(Unit *) override
void JustAppeared() override
boss_janalai(Creature *creature)
void KilledUnit(Unit *) override
bool AllEggsWereHatched()
void EnterEvadeMode(EvadeReason) override
void JustEngagedWith(Unit *who) override
npc_amani_dragonhawk_hatchling(Creature *creature)
void JustAppeared() override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
void InitializeAI() override
InstanceScript * _instance
void JustAppeared() override
Position _hatchEggsPointA
std::string_view _eggsStringIdB
std::string_view _eggsStringIdA
void InitializeAI() override
void UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 id) override
bool IsOtherHatcherAlive()
Position _hatchEggsPointB
npc_amanishi_hatcher(Creature *creature)
void InitializeAI() override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void InitializeAI() override
void DoAction(int32 action) override
#define RegisterZulAmanCreatureAI(ai_name)