111 if (player->IsAlive())
173 for (auto itr = _summons.begin(); reset && itr != _summons.end(); ++itr)
175 Creature* summon = ObjectAccessor::GetCreature(*me, *_summons.begin());
176 if (summon && player->IsEngagedBy(summon))
506 if (
Unit* summoner = casterSummon->GetSummonerUnit())
576 if (
Unit* summoner = casterSummon->GetSummonerUnit())
666 else if (chance < 60)
668 else if (chance < 90)
673 caster->CastSpell(caster, spellId,
true);
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
@ QUEST_STATUS_INCOMPLETE
bool roll_chance(float chance, PseudoRandomDistributionState &state)
uint32 urand(uint32 min, uint32 max)
#define RegisterCreatureAI(ai_name)
#define RegisterSpellScript(spell_script)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SEND_EVENT
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_FORCE_REACTION
#define SpellCheckCastFn(F)
#define SpellEffectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectApplyHandler > AfterEffectApply
ObjectGuid const & GetGUID() const
bool _EnterEvadeMode(EvadeReason why=EvadeReason::Other)
void SetHomePosition(float x, float y, float z, float o)
void MoveFollow(Unit *target, float dist, Optional< ChaseAngle > angle={}, Optional< Milliseconds > duration={}, bool ignoreTargetWalk=false, MovementSlot slot=MOTION_SLOT_ACTIVE, 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< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
uint32 GetQuestId() const
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)
HookList< CastHandler > AfterCast
HookList< CheckCastHandler > OnCheckCast
int32 GetEffectValueAsInt() const
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Item * GetCastItem() const
Unit * GetExplTargetUnit() const
SpellInfo const * GetSpellInfo() const
static void SendCastResult(Player const *caster, SpellInfo const *spellInfo, SpellCastVisual spellVisual, ObjectGuid cast_count, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE, int32 *param1=nullptr, int32 *param2=nullptr)
void Despawn(Creature const *summon)
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.
Vehicle * GetVehicle() const
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
MotionMaster * GetMotionMaster()
void AddUnitState(uint32 f)
Unit * GetCharmerOrOwner() const
bool SetWalk(bool enable)
virtual float GetFollowAngle() const
Vehicle * GetVehicleKit() const
virtual bool IsEngaged() const
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void Reset(bool evading=false)
Reapplies immunities and reinstalls accessories. Only has effect for creatures.
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
bool Validate(SpellInfo const *) override
void HandleEffect(SpellEffIndex)
void HandleEffect(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleEffect(SpellEffIndex)
void HandleDummy(SpellEffIndex)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *spellInfo) override
void HandleScript(SpellEffIndex)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
SpellCastResult CheckCast()
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *spellInfo) override
bool Validate(SpellInfo const *spellInfo) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> std::add_const_t< decltype(*std::ranges::begin(container))> &
void UpdateAI(uint32 diff) override
void OnQuestAccept(Player *player, Quest const *quest) override
void SummonGladiator(uint32 entry)
void EnterEvadeMode(EvadeReason why) override
void JustSummoned(Creature *summon) override
void SummonedCreatureDies(Creature *summon, Unit *) override
void SummonedCreatureDespawn(Creature *summon) override
npc_daegarn(Creature *creature)
@ SPELL_SUMMON_WINTERSKORN_BERSERKER
@ SPELL_SUMMON_PUTRID_HORROR
@ SPELL_SUMMON_WINTERSKORN_TRIBESMAN
@ SPELL_SUMMON_BABY_RIVEN_WIDOWS
@ SPELL_SUMMON_FANGGORE_WORG
@ SPELL_SUMMON_WINTERSKORN_WOODSMAN
@ SPELL_SUMMON_GJALERBRON_WARRIOR
@ SPELL_SUMMON_GJALERBRON_SLEEPWATCHER
@ SPELL_SUMMON_WINTERSKORN_ORACLE
@ SPELL_SUMMON_FREED_MIST_WHISPER_SCOUT
@ SPELL_SUMMON_GJALERBRON_RUNECASTER
@ SPELL_SUMMON_DARKCLAW_BAT
@ SPELL_RANDOM_CIRCUMFERENCE_POINT_POISON
@ SPELL_RANDOM_CIRCUMFERENCE_POINT_BONE
@ SPELL_RANDOM_CIRCUMFERENCE_POINT_BONE_2
@ SPELL_MINDLESS_ABOMINATION_CONTROL
TowersOfCertainDoomAlliance
@ SPELL_SERGEANTS_FLARE_EFFECT
@ NPC_GENERIC_TRIGGER_LAB
void AddSC_howling_fjord()
@ SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3
@ SPELL_SCOURGING_CRYSTAL_CONTROLLER
TheExplorersLeagueOutpost
@ SPELL_TAXI_TO_EXPLORERS_LEAGUE
@ SPELL_BRAVES_FLARE_EFFECT
@ SPELL_WORG_DISGUISE_DUMMY
@ SPELL_MIRROR_IMAGE_AURA
@ SPELL_SUMMON_INNER_TURMOIL
@ SPELL_RECENT_MEDITATION
@ SPELL_FISHED_UP_REEF_SHARK
@ SPELL_CREATE_TASTY_REEF_FISH
static Position const daegarnSummonPosition
std::array< uint32, 11 > const CocoonSummonSpells
static Position const daegarnCenterPosition
@ SPELL_RANDOM_CIRCUMFERENCE_POINT_CANNON_PART_01
@ SPELL_RANDOM_CIRCUMFERENCE_POINT_CANNON_PART_02