152 if (
Unit* passenger = vehicle->GetPassenger(0))
163 if (
Unit* player = vehicle->GetPassenger(0))
167 for (
uint8 i = 1; i < 4; ++i)
174 prisoner->ExitVehicle();
177 player->ExitVehicle();
405 for (
uint8 i = 0; i < 5; ++i)
616 player->VehicleSpellInitialize();
653 _phase = PHASE_MOUTH;
656 InitSpellsForPhase();
657 DoCastAOE(SPELL_LOW_HEALTH_TRIGGER, true);
658 me->RemoveAurasDueToSpell(SPELL_CLAW_SWIPE_PERIODIC);
659 me->RemoveAurasDueToSpell(SPELL_GRIP);
661 if (Player* player = ObjectAccessor::GetPlayer(*me, _playerGuid))
662 Talk(SAY_PHASE_2, player);
664 DoCastAOE(SPELL_EJECT_PASSENGER_1, true);
665 DoCastAOE(SPELL_JAWS_OF_DEATH_PERIODIC);
666 DoCastAOE(SPELL_FLY_STATE_VISUAL);
706 if (_playerCheckTimer <= diff)
714 _playerCheckTimer -= diff;
716 _scheduler.Update(diff);
929 stacksToRemove = sequence * 2;
935 for (
uint32 i = 0; i < stacksToRemove; ++i)
985template <
int8 StacksToLose>
1078 chance = aurEff->GetAmount();
1315 for (
uint8 i = 0; i < count; i++)
DB2Storage< BroadcastTextEntry > sBroadcastTextStore("BroadcastText.db2", &BroadcastTextLoadInfo::Instance)
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)
@ EMOTE_STATE_WORK_MINING
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ 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
@ UNIT_FLAG_IMMUNE_TO_NPC
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=EvadeReason::Other)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
void SetImmuneToPC(bool apply) override
uint32 m_spells[MAX_CREATURE_SPELLS]
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
void MovePath(uint32 pathId, bool repeatable, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< std::pair< Milliseconds, Milliseconds > > waitTimeRangeAtPathEnd={}, Optional< float > wanderDistanceAtPathEnds={}, Optional< bool > followPathBackwardsFromEndToStart={}, bool generatePath=true)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
void MoveFall(uint32 id=0)
static Unit * ToUnit(Object *o)
static ObjectGuid GetGUID(Object const *o)
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
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 > duration)
TaskScheduler & CancelAll()
TaskScheduler & Async(std::function< void()> callable)
virtual void DoAction(int32)
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
Vehicle * GetVehicle() const
MotionMaster * GetMotionMaster()
void RemoveNpcFlag(NPCFlags flags)
void SetEmoteState(Emote emote)
bool HealthBelowPct(int32 pct) const
bool SetWalk(bool enable)
void SetFacingTo(float const ori, bool force=true)
void SetUnitFlag(UnitFlags flags)
Vehicle * GetVehicleKit() const
void KillSelf(bool durabilityLoss=true, bool skipSettingDeathState=false)
void ReplaceAllNpcFlags(NPCFlags flags)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
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)
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)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandlePeriodic(AuraEffect const *)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void HandleScript(SpellEffIndex)
void HandleDrop(AuraEffect const *, AuraEffectHandleModes)
void DummyTick(AuraEffect const *)
void HandleDamage(SpellEffIndex)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *spellInfo) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleDummy(AuraEffect const *, AuraEffectHandleModes)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *spellInfo) override
void HandleScript(SpellEffIndex)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
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
== Triggered Actions Requested ==================
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 MovementInform(uint32 type, uint32 id) override
npc_king_jokkum_vehicle(Creature *creature)
void UpdateAI(uint32 diff) override
void OnCharmed(bool) override
void PassengerBoarded(Unit *who, int8, bool apply) override
== Fields =======================================
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
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