106 trapper->SetFacingToObject(
me);
113 trapper->GetMotionMaster()->MovePoint(0, trapper->GetFirstCollisionPosition(20.0f, 0));
120 if (trapper->IsAIEnabled())
141 player->KilledMonsterCredit(trapper->GetEntry(), trapper->GetGUID());
148 trapper->DespawnOrUnsummon();
238 mammoth->SetFacingToObject(player);
249 if (mammoth->IsAIEnabled())
255 mammoth->GetMotionMaster()->MovePoint(0, mammoth->GetFirstCollisionPosition(50.0f,
me->
GetOrientation()));
260 mammoth->DespawnOrUnsummon(0s, 120s);
458 arthas->SetWalk(
true);
463 talbot->SetWalk(
true);
471 arthas->GetMotionMaster()->MovePath(
PATH_ARTHAS,
false);
477 talbot->GetMotionMaster()->MovePath(
PATH_TALBOT,
false);
485 talbot->SetFullHealth();
496 if (talbot->IsAIEnabled())
505 arlos->SetWalk(
true);
508 arlos->GetMotionMaster()->MovePath(
PATH_ARLOS,
false);
513 leryssa->SetWalk(
true);
516 leryssa->GetMotionMaster()->MovePath(
PATH_LERYSSA,
false);
523 if (talbot->IsAIEnabled())
541 arthas->SetFacingToObject(
me);
549 if (arthas->IsAIEnabled())
561 if (talbot->IsAIEnabled())
570 arthas->SetFacingToObject(talbot);
571 if (arthas->IsAIEnabled())
580 arthas->SetFacingToObject(
me);
588 arthas->RemoveFromWorld();
596 if (talbot->IsAIEnabled())
601 talbot->Attack(
me,
false);
610 if (arlos->IsAIEnabled())
630 leryssa->SetFacingToObject(
me);
640 if (arlos->IsAIEnabled())
646 if (leryssa->IsAIEnabled())
661 leryssa->SetWalk(
false);
662 leryssa->MonsterMoveWithSpeed(3726.751f, 3568.1633f, 477.44086f, leryssa->GetSpeed(
MOVE_RUN),
true,
true);
670 if (leryssa->IsAIEnabled())
684 if (leryssa->IsAIEnabled())
696 if (leryssa->IsAIEnabled())
726 talbot->DespawnOrUnsummon();
729 leryssa->DespawnOrUnsummon();
732 arlos->DespawnOrUnsummon();
735 arthas->DespawnOrUnsummon();
740 if (gossipListId == 0)
778 if (
Unit* summoner = tempSummon->GetSummonerUnit())
797 if (
Unit* summoner = tempSummon->GetSummonerUnit())
863 if (
Unit* summoner = tempSummon->GetSummonerUnit())
1015 if (tappers.empty())
1152 aura->ModStackAmount(-1);
1262 if (!caster || !target)
1269 switch (aura->GetStackAmount())
1314 if (!caster || !target)
1322 switch (aura->GetStackAmount())
1339 target->
AI()->
Talk(text, caster);
1520 switch (target->GetEntry())
1530 caster->
CastSpell(caster, spellId, castItem);
1532 target->DespawnOrUnsummon();
1744 creature->DespawnOrUnsummon();
1806 creature->DespawnOrUnsummon();
First const & RAND(First const &first, Second const &second, Rest const &... rest)
DB2Storage< BroadcastTextEntry > sBroadcastTextStore("BroadcastText.db2", &BroadcastTextLoadInfo::Instance)
@ TEMPSUMMON_DEAD_DESPAWN
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
std::unordered_set< ObjectGuid > GuidUnorderedSet
bool roll_chance(float chance, PseudoRandomDistributionState &state)
uint32 urand(uint32 min, uint32 max)
#define RegisterCreatureAI(ai_name)
#define RegisterGameObjectAI(ai_name)
#define RegisterSpellScript(spell_script)
void CloseGossipMenuFor(Player *player)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SEND_EVENT
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_MECHANIC_IMMUNITY
#define SpellEffectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
@ UNIT_NPC_FLAG_QUESTGIVER
@ UNIT_FLAG_NON_ATTACKABLE
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectApplyHandler > AfterEffectApply
uint8 GetStackAmount() const
ObjectGuid const & GetGUID() const
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void GetHomePosition(float &x, float &y, float &z, float &ori) const
GuidUnorderedSet const & GetTapList() const
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
void SetGoState(GOState state)
GOState GetGoState() const
void DespawnOrUnsummon(Milliseconds delay=0ms, Seconds forceRespawnTime=0s)
void Use(Unit *user, bool ignoreCastInProgress=false)
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={})
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< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void KilledMonsterCredit(uint32 entry, ObjectGuid guid=ObjectGuid::Empty)
int32 CalcValueAsInt(WorldObject const *caster=nullptr, SpellEffectValue 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)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
Creature * GetHitCreature() const
HookList< HitHandler > AfterHit
int32 GetEffectValueAsInt() const
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
Item * GetCastItem() const
SpellInfo const * GetSpellInfo() const
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
MotionMaster * GetMotionMaster()
void RemoveNpcFlag(NPCFlags flags)
TempSummon * ToTempSummon()
void AddUnitState(uint32 f)
void SetFacingToObject(WorldObject const *object, bool force=true, uint32 movementId=EVENT_FACE)
void SetEmoteState(Emote emote)
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
void SetNpcFlag(NPCFlags flags)
bool SetWalk(bool enable)
void SetFacingTo(float ori, bool force=true, uint32 movementId=EVENT_FACE)
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)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void RemoveUnitFlag(UnitFlags flags)
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
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)
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Position GetFirstCollisionPosition(float dist, float angle)
void HandleScript(SpellEffIndex)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *spellInfo) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *spellInfo) override
bool Validate(SpellInfo const *) override
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *spellInfo) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *spellInfo) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *spellInfo) override
void HandleScript(SpellEffIndex)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleEffect(SpellEffIndex)
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)
auto SelectRandomContainerElement(C const &container) -> std::add_const_t< decltype(*std::ranges::begin(container))> &
constexpr void GetPosition(float &x, float &y) const
constexpr float GetOrientation() const
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
go_caribou_trap(GameObject *go)
void UpdateAI(uint32 diff) override
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
go_mammoth_trap(GameObject *go)
void UpdateAI(uint32 diff) override
void SetGUID(ObjectGuid const &guid, int32 id) override
npc_bloodmage_laurith(Creature *creature)
void UpdateAI(uint32 diff) override
npc_counselor_talbot(Creature *creature)
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
npc_general_arlos(Creature *creature)
void WaypointPathEnded(uint32, uint32 pathId) override
void WaypointPathEnded(uint32, uint32 pathId) override
npc_leryssa(Creature *creature)
bool OnGossipSelect(Player *player, uint32, uint32 gossipListId) override
npc_thassarian(Creature *creature)
void JustAppeared() override
void WaypointPathEnded(uint32, uint32 pathId) override
void UpdateAI(uint32 diff) override
void JustDied(Unit *) override
npc_valiance_keep_cannoneer(Creature *creature)
void UpdateAI(uint32 diff) override
@ GO_VALIANCE_KEEP_CANNON_2
@ GO_VALIANCE_KEEP_CANNON_1
@ EVENT_THASSARIAN_SCRIPT_29
@ EVENT_THASSARIAN_SCRIPT_5
@ EVENT_THASSARIAN_SCRIPT_22
@ EVENT_THASSARIAN_SCRIPT_7
@ EVENT_THASSARIAN_SCRIPT_11
@ EVENT_THASSARIAN_SCRIPT_2
@ EVENT_THASSARIAN_SCRIPT_18
@ EVENT_THASSARIAN_SCRIPT_16
@ EVENT_THASSARIAN_SCRIPT_17
@ EVENT_THASSARIAN_SCRIPT_20
@ EVENT_THASSARIAN_SCRIPT_12
@ EVENT_THASSARIAN_SCRIPT_8
@ EVENT_THASSARIAN_SCRIPT_27
@ EVENT_THASSARIAN_SCRIPT_1
@ EVENT_THASSARIAN_SCRIPT_26
@ EVENT_THASSARIAN_SCRIPT_4
@ SPELL_TRANSFORM_VALANAR
@ EVENT_THASSARIAN_SCRIPT_25
@ EVENT_THASSARIAN_SCRIPT_21
@ EVENT_THASSARIAN_SCRIPT_9
@ EVENT_THASSARIAN_SCRIPT_6
@ EVENT_THASSARIAN_SCRIPT_15
@ EVENT_THASSARIAN_SCRIPT_14
@ EVENT_THASSARIAN_SCRIPT_19
@ EVENT_THASSARIAN_SCRIPT_23
@ EVENT_THASSARIAN_SCRIPT_13
@ EVENT_THASSARIAN_SCRIPT_24
@ EVENT_THASSARIAN_SCRIPT_10
@ EVENT_THASSARIAN_SCRIPT_3
@ EVENT_THASSARIAN_SCRIPT_28
@ SPELL_DRAKE_HATCHLING_SUBDUED
@ SPELL_SUMMON_ARCANE_PRISONER_1
@ SPELL_SUMMON_ARCANE_PRISONER_2
@ SPELL_SUMMON_FIZZCRANK_SURVIVOR
@ SPELL_MAGNATAUR_KILL_CREDIT
@ SPELL_MAGNATAUR_ON_DEATH_2
static constexpr std::array< uint32, 5 > BlasterTargetSpells
std::array< uint32, 3 > const CocoonSummonSpells
@ SPELL_SUMMON_SENTRYBOT_57K
@ SPELL_SUMMON_SCAVENGEBOT_004A8
@ SPELL_SUMMON_55D_COLLECTATRON
@ SPELL_SUMMON_SCAVENGEBOT_005B6
@ SPELL_SUMMON_DEFENDOTANK_66D
@ SPELL_ROBOT_KILL_CREDIT
@ SPELL_COLDARRA_TO_TRANSITUS
@ DATA_FACING_PLAYER_GUID
@ EVENT_RESET_ORIENTATION
void AddSC_borean_tundra()
@ SPELL_POWER_OF_THE_STORM_ITEM
@ SPELL_POWER_OF_THE_STORM
@ SPELL_DROP_WARSONG_LAND_MINE_1
@ SPELL_DROP_WARSONG_LAND_MINE_4
@ SPELL_DROP_WARSONG_LAND_MINE_8
@ SPELL_DROP_WARSONG_LAND_MINE_3
@ SPELL_DROP_WARSONG_LAND_MINE_2
@ SPELL_DROP_WARSONG_LAND_MINE_7
@ SPELL_DROP_WARSONG_LAND_MINE_5
@ SPELL_DROP_WARSONG_LAND_MINE_6
@ SPELL_AMBER_LEDGE_TO_BERYL_POINT
static constexpr std::array< uint32, 8 > DropLandMineSpells
@ SPELL_FREED_WARSONG_MAGE
@ SPELL_FREED_SOLDIER_DEBUFF
@ SPELL_FREED_WARSONG_WARRIOR
@ SPELL_FREED_WARSONG_PEON
@ SPELL_FREED_WARSONG_SHAMAN
static constexpr std::array< uint32, 5 > BlasterCasterSpells
@ WHISPER_TORTURE_RANDOM_2
@ WHISPER_TORTURE_RANDOM_3
@ WHISPER_TORTURE_PROTO_10
@ WHISPER_TORTURE_PROTO_9
@ WHISPER_TORTURE_PROTO_4
@ WHISPER_TORTURE_PROTO_3
@ SPELL_PROTOTYPE_NEURAL_NEEDLE_IMPACT
@ WHISPER_TORTURE_PROTO_5
@ WHISPER_TORTURE_PROTO_1
@ WHISPER_TORTURE_PROTO_7
@ WHISPER_TORTURE_PROTO_2
@ WHISPER_TORTURE_PROTO_8
@ WHISPER_TORTURE_RANDOM_1
@ WHISPER_TORTURE_PROTO_6
@ SPELL_NEURAL_NEEDLE_IMPACT