173 if (
Unit* passenger = vehicle->GetPassenger(0))
184 if (
Unit* player = vehicle->GetPassenger(0))
188 for (
uint8 i = 1; i < 4; ++i)
195 prisoner->ExitVehicle();
198 player->ExitVehicle();
426 for (
uint8 i = 0; i < 5; ++i)
635 player->VehicleSpellInitialize();
672 _phase = PHASE_MOUTH;
675 InitSpellsForPhase();
676 DoCastAOE(SPELL_LOW_HEALTH_TRIGGER, true);
677 me->RemoveAurasDueToSpell(SPELL_CLAW_SWIPE_PERIODIC);
678 me->RemoveAurasDueToSpell(SPELL_GRIP);
680 if (Player* player = ObjectAccessor::GetPlayer(*me, _playerGuid))
681 Talk(SAY_PHASE_2, player);
683 DoCastAOE(SPELL_EJECT_PASSENGER_1, true);
684 DoCastAOE(SPELL_JAWS_OF_DEATH_PERIODIC);
685 DoCastAOE(SPELL_FLY_STATE_VISUAL);
722 DoMeleeAttackIfReady();
726 if (_playerCheckTimer <= diff)
729 EnterEvadeMode(EVADE_REASON_NO_HOSTILES);
734 _playerCheckTimer -= diff;
736 _scheduler.Update(diff);
877 stacksToRemove = sequence * 2;
883 for (
uint32 i = 0; i < stacksToRemove; ++i)
935template <
int8 StacksToLose>
1038 chance = aurEff->GetAmount();
1266 for (
uint8 i = 0; i < count; i++)
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
uint32 urand(uint32 min, uint32 max)
bool roll_chance_i(int chance)
#define RegisterCreatureAI(ai_name)
#define RegisterSpellScript(spell_script)
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
void CloseGossipMenuFor(Player *player)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ EMOTE_STATE_WORK_MINING
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
@ UNIT_NPC_FLAG_QUESTGIVER
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
uint8 GetStackAmount() const
HookList< EffectApplyHandler > OnEffectApply
bool ModStackAmount(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
void SetImmuneToPC(bool apply) override
uint32 m_spells[MAX_CREATURE_SPELLS]
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
void MovePath(uint32 pathId, bool repeatable)
void MoveFall(uint32 id=0)
static Unit * ToUnit(Object *o)
static ObjectGuid GetGUID(Object const *o)
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
void SetEffectValue(int32 value)
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
int32 GetEffectValue() const
HookList< EffectHandler > OnEffectHitTarget
HookList< EffectHandler > OnEffectLaunchTarget
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
TaskScheduler & CancelAll()
TaskScheduler & Async(std::function< void()> const &callable)
virtual void DoAction(int32)
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
Vehicle * GetVehicle() const
void KillSelf(bool durabilityLoss=true)
MotionMaster * GetMotionMaster()
void RemoveNpcFlag(NPCFlags flags)
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
void SetEmoteState(Emote emote)
bool HealthBelowPct(int32 pct) const
bool SetWalk(bool enable)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void SetFacingTo(float ori, bool force=true, uint32 movementId=EVENT_FACE)
Vehicle * GetVehicleKit() const
void ReplaceAllNpcFlags(NPCFlags flags)
uint8 GetAvailableSeatCount() const
Gets the available seat count.
Unit * GetPassenger(int8 seatId) const
Gets a passenger on specified seat.
void InstallAllAccessories(bool evading)
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
void PassengerBoarded(Unit *who, int8, bool apply) override
== Fields =======================================
npc_hyldsmeet_protodrake(Creature *creature)
void UpdateAI(uint32 diff) override
uint32 _accessoryRespawnTimer
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
PrepareAuraScript(spell_claw_swipe_check)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandlePeriodic(AuraEffect const *)
PrepareAuraScript(spell_close_rift)
PrepareSpellScript(spell_fatal_strike)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_grab_on)
PrepareAuraScript(spell_grip)
void HandleDrop(AuraEffect const *, AuraEffectHandleModes)
void DummyTick(AuraEffect const *)
PrepareSpellScript(spell_jaws_of_death_claw_swipe_pct_damage)
void HandleDamage(SpellEffIndex)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_jokkum_scriptcast)
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_loosen_grip)
bool Validate(SpellInfo const *spellInfo) override
PrepareSpellScript(spell_low_health_trigger)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleDummy(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_player_mount_wyrm)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_storm_peaks_bear_flank_fail)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_storm_peaks_bear_flank_master)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_storm_peaks_call_of_earth)
void HandleScript(SpellEffIndex)
PrepareAuraScript(spell_storm_peaks_flaming_arrow_triggered_effect)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_storm_peaks_free_brunnhildar_prisoner)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_storm_peaks_mammoth_explosion_master)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_storm_peaks_read_pronouncement)
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_storm_peaks_unstable_explosive_detonation)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_veranus_summon)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
void Start(bool isActiveAttacker=true, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false)
void LoadPath(uint32 pathId)
void UpdateAI(uint32 diff) override
void UpdateAI(uint32 diff) override
bool OnGossipSelect(Player *player, uint32, uint32) override
void UpdateAI(uint32 diff) override
npc_brann_bronzebeard_keystone(Creature *creature)
npc_brunnhildar_prisoner(Creature *creature)
void JustAppeared() override
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
void UpdateAI(uint32) override
void UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 id) override
npc_freed_protodrake(Creature *creature)
void AttackStart(Unit *) override
npc_icefang(Creature *creature)
void EnterEvadeMode(EvadeReason) override
void JustEngagedWith(Unit *) override
void JustDied(Unit *) override
void PassengerBoarded(Unit *who, int8, bool apply) override
== Fields =======================================
void OnCharmed(bool) override
void UpdateAI(uint32 diff) override
void PassengerBoarded(Unit *passenger, int8 seatId, bool apply) override
== Fields =======================================
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
npc_wild_wyrm(Creature *creature)
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void UpdateAI(uint32 diff) override
void InitSpellsForPhase()
void MovementInform(uint32 type, uint32 id) override
void DoAction(int32 action) override
@ AREA_VALLEY_OF_ANCIENT_WINTERS
@ SPELL_KILL_CREDIT_PRISONER
@ SPELL_KILL_CREDIT_DRAKE
@ SPELL_MAMMOTH_SUMMON_OBJECT_1
@ SPELL_SUMMON_MAIN_MAMMOTH_MEAT
@ SPELL_MAMMOTH_SUMMON_OBJECT_2
@ SPELL_MAMMOTH_SUMMON_OBJECT_3
uint8 const ControllableSpellsCount
@ SPELL_MIGHTY_SPEAR_THRUST
@ SPELL_EJECT_PASSENGER_1
@ SPELL_JAWS_OF_DEATH_PERIODIC
@ SPELL_FALLING_DRAGON_FEIGN_DEATH
@ SPELL_CLAW_SWIPE_DAMAGE
@ ACTION_FATAL_STRIKE_MISS
@ SPELL_CLAW_SWIPE_PERIODIC
@ ACTION_CLAW_SWIPE_DODGE
@ SPELL_PLAYER_MOUNT_WYRM
@ SPELL_LOW_HEALTH_TRIGGER
@ SPELL_EJECT_ALL_PASSENGERS
@ SPELL_FATAL_STRIKE_DAMAGE
@ NPC_HYLDSMEET_DRAKERIDER
@ SPELL_FROSTGIANT_CREDIT
uint32 const WyrmControlSpells[PHASE_MAX][ControllableSpellsCount]
@ SPELL_SUMMON_VERANUS_AND_THORIM
@ SPELL_JOKKUM_KILL_CREDIT
@ SPELL_PLAYER_CAST_VERANUS_SUMMON
static constexpr uint32 PATH_ESCORT_ICEFANG
@ SPELL_CREATE_BEAR_FLANK