52 { 1465.3872f, 3283.8604f, 137.69096f },
53 { 1431.401f, 3264.001f, 136.02579f },
54 { 1397.2067f, 3276.5618f, 133.84508f },
55 { 1441.566f, 3232.8013f, 135.01802f },
56 { 1403.632f, 3229.1094f, 132.14877f },
57 { 1347.1927f, 3286.5842f, 131.94803f },
58 { 1365.1865f, 3338.9502f, 128.57233f },
59 { 1349.6024f, 3315.0574f, 130.97443f },
60 { 1335.4618f, 3344.019f, 130.42047f },
61 { 1360.1198f, 3378.02f, 127.34183f },
62 { 1435.8524f, 3355.6423f, 173.77744f },
63 { 1432.7031f, 3385.1572f, 184.4187f },
64 { 1452.6094f, 3373.3315f, 187.0402f },
65 { 1426.7778f, 3364.7517f, 184.39569f },
66 { 1450.3646f, 3361.264f, 184.42484f },
120 float currentDist = 1000.0f;
124 if (dist >= currentDist)
127 currentPosition = pos;
339 std::list<Creature*> traineeList;
344 for (
Creature* trainee : traineeList)
345 trainee->HandleEmoteCommand(emote);
556 me->GetMotionMaster()->MovePoint(POINT_RANDOM_DEST, me->GetFirstCollisionPosition(40.0f, orientation));
660 { 1410.2014f, 3598.6494f, 89.59319f },
661 { 1456.201f, 3568.265f, 88.39075f },
662 { 1383.158f, 3595.447f, 90.3155f },
663 { 1367.333f, 3594.927f, 88.89806f },
664 { 1350.278f, 3588.938f, 89.17908f }
706 if (!amberleafScamp1 || !amberleafScamp2 || !amberleafScamp3 || !amberleafScamp5)
722 if (!amberleafScamp4)
782 Unit* summoner = me->ToTempSummon()->GetSummonerUnit();
787 summoner->RemoveAurasDueToSpell(SPELL_SUMMON_CART_DRIVER);
788 PhasingHandler::OnConditionChange(summoner);
850 { 1196.72f, 3492.85f, 90.9836f },
851 { 1192.29f, 3478.69f, 108.788f },
852 { 1197.99f, 3460.63f, 103.04f }
First const & RAND(First const &first, Second const &second, Rest const &... rest)
std::chrono::seconds Seconds
Seconds shorthand typedef.
@ QUEST_STATUS_INCOMPLETE
#define RegisterCreatureAI(ai_name)
#define RegisterGameObjectAI(ai_name)
#define RegisterSpellScript(spell_script)
@ EMOTE_ONESHOT_MONKOFFENSE_ATTACKUNARMEDOFF
@ EMOTE_ONESHOT_MONKOFFENSE_PARRYUNARMED
@ EMOTE_STATE_READY_UNARMED
@ EMOTE_ONESHOT_PALMSTRIKE
@ EMOTE_STATE_MONKOFFENSE_READYUNARMED
@ EMOTE_ONESHOT_MONKOFFENSE_SPECIALUNARMED
@ EMOTE_ONESHOT_MONKOFFENSE_ATTACKUNARMED
@ SPELL_EFFECT_SCRIPT_EFFECT
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_CONTROL_VEHICLE
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectRemoveFn(F, I, N, M)
@ UNIT_FLAG_NON_ATTACKABLE_2
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > OnEffectRemove
void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void SetImmuneToPC(bool apply) override
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void InitializeReactState()
bool IsInEvadeMode() const
void Repeat(Milliseconds time)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
void CancelEvent(uint32 eventId)
GameObjectAI(GameObject *go, uint32 scriptId={}) noexcept
void DespawnOrUnsummon(Milliseconds delay=0ms, Seconds forceRespawnTime=0s)
HuojinTraineePartnerSearch(Creature *partner)
bool operator()(Creature const *target)
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={}, Optional< bool > exactSplinePath={}, bool generatePath=true, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={})
void MoveRandom(float wanderDistance=0.0f, Optional< Milliseconds > duration={}, MovementSlot slot=MOTION_SLOT_DEFAULT, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={})
static Unit * ToUnit(Object *o)
static ObjectGuid GetGUID(Object const *o)
static Player * ToPlayer(Object *o)
static bool OnConditionChange(WorldObject *object, bool updateVisibility=true)
QuestStatus GetQuestStatus(uint32 quest_id) const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Unit * GetHitUnit() const
int32 GetEffectValue() const
HookList< EffectHandler > OnEffectHitTarget
TaskContext & Schedule(TaskScheduler::duration_t time, TaskScheduler::task_handler_t task)
TaskContext & Repeat(TaskScheduler::duration_t duration)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & Update(success_t const &callback=nullptr)
Unit * GetSummonerUnit() const
TushuiTraineeSearch(Creature *leader, float maxDist)
bool operator()(Creature const *target) const
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
virtual void DoAction(int32 param)
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
void CombatStop(bool includingCast=false, bool mutualPvP=true, bool(*unitFilter)(Unit const *otherUnit)=nullptr)
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
MotionMaster * GetMotionMaster()
void SetFacingToObject(WorldObject const *object, bool force=true)
TempSummon * ToTempSummon()
void SetUninteractible(bool apply)
void SetEmoteState(Emote emote)
void SetSpeedRate(UnitMoveType mtype, float rate)
void SetFacingTo(float const ori, bool force=true)
bool HasUnitState(const uint32 f) const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
void SetUnitFlag(UnitFlags flags)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void RemoveUnitFlag(UnitFlags flags)
Creature * FindNearestCreatureWithOptions(float range, FindCreatureOptions const &options) const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
float GetDistance(WorldObject const *obj) const
bool OnExit(Player *player, AreaTriggerEntry const *) override
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
at_inside_of_cave_of_meditation()
bool OnExit(Player *player, AreaTriggerEntry const *) override
at_min_dimwind_captured()
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex) const
void HandleEffectPeriodic(AuraEffect const *)
void OnRemoveVehicle(AuraEffect const *, AuraEffectHandleModes) const
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> std::add_const_t< decltype(*std::ranges::begin(container))> &
static void VisitGridObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
constexpr void SetOrientation(float orientation)
float GetExactDist(float x, float y, float z) const
float GetAbsoluteAngle(float x, float y) const
constexpr float GetOrientation() const
ScriptedAI(Creature *creature, uint32 scriptId=0) noexcept
bool OnGossipHello(Player *) override
void JustReachedHome() override
void UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 id) override
npc_aysa_cloudsinger_cave_of_meditation(Creature *creature)
void DoAction(int32 action) override
void UpdateAI(uint32 diff) override
npc_aysa_cloudsinger_summon(Creature *creature)
void IsSummonedBy(WorldObject *summoner) override
void MovementInform(uint32 type, uint32 pointId) override
void WaypointPathEnded(uint32, uint32 pathId) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *attacker) override
npc_huojin_trainee(Creature *creature)
void JustReachedHome() override
void JustAppeared() override
void BeginSparring(ObjectGuid guid)
void DoAction(int32 action) override
Creature * GetNewPartner() const
void BeginSparringDelayed(ObjectGuid partnerGuid)
npc_instructor_zhi(Creature *creature)
void JustAppeared() override
void UpdateAI(uint32 diff) override
void IsSummonedBy(WorldObject *summonerWO) override
void MovementInform(uint32 type, uint32 pointId) override
void UpdateAI(uint32 diff) override
void JustAppeared() override
void SpellHitTarget(WorldObject *target, SpellInfo const *spellInfo) override
void JustEngagedWith(Unit *) override
void SpellHitTarget(WorldObject *target, SpellInfo const *spellInfo) override
void UpdateAI(uint32 diff) override
void JustReachedHome() override
void OnHealthDepleted(Unit *attacker, bool) override
npc_master_li_fei_summon(Creature *creature)
void IsSummonedBy(WorldObject *summoner) override
void UpdateAI(uint32 diff) override
void WaypointReached(uint32 waypointId, uint32 pathId) override
void UpdateAI(uint32 diff) override
void IsSummonedBy(WorldObject *summoner) override
Emote PlayRandomEmote() const
void EnterEvadeMode(EvadeReason why) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
void MovementInform(uint32 type, uint32 id) override
void DamageTaken(Unit *attacker, uint32 &damage, DamageEffectType, SpellInfo const *) override
npc_tushui_huojin_trainee(Creature *creature)
void JustEngagedWith(Unit *attacker) override
npc_tushui_leading_trainee(Creature *creature)
void JustReachedHome() override
void ScheduleEmoteExecution()
void JustAppeared() override
Emote constexpr TraineeEmotes[5]
@ NPC_TUSHUI_TRAINEE_FEMALE
@ NPC_HUOJIN_TRAINEE_FEMALE
@ NPC_HUOJIN_TRAINEE_MALE
@ NPC_TUSHUI_TRAINEE_MALE
constexpr Position amberleafPos[5]
@ ACTION_FINISH_MEDITATION
@ SPELL_AYSA_CAVE_OF_SCROLLS_COMP
@ SAY_AYSA_FINISH_MEDITATION
@ QUEST_THE_WAY_OF_THE_TUSHUI
@ SPELL_MEDITATION_TIMER_BAR
@ SPELL_SUMMON_AMBERLEAF_TROUBLEMAKER
@ SPELL_CAVE_OF_SCROLLS_CREDIT
@ SPELL_SUMMON_MASTER_LI_FEI
@ ACTION_START_MEDITATION
void HandleEmoteNearbyTushuiTrainees(Creature *leader, Emote emote)
@ SPELL_UPDATE_PHASE_SHIFT_DEMON_CREATOR
void AddSC_zone_the_wandering_isle()
constexpr Position aysaJumpPos[3]
@ SPELL_SERVERSIDE_DRIVER_CREDIT
@ QUEST_THE_MISSING_DRIVER
@ SPELL_SUMMON_CART_DRIVER
@ SPELL_FORCE_SUMMON_CART_DRIVER
@ SPELL_SERVERSIDE_KILL_CREDIT
@ SPELL_FORCE_SUMMONER_TO_RIDE
@ SPELL_HAWK_DIVING_TO_EARTH_DMG
@ SPELL_HAWK_DIVING_TO_EARTH
@ SPELL_CSA_AREATRIGGER_DUMMY
@ SPELL_BABY_ELEPHANT_TAKES_A_BATH
@ SPELL_EJECT_ALL_PASSENGERS
@ SPELL_FLAME_SPOUT_VISUAL
@ ACTION_PARTNER_ENTERED_COMBAT
Position const TraineeEndpoints[]
@ PATH_CAVE_OF_MEDITATION