666#define QUEST_BATTLE_OF_THE_CRIMSON_WATCH 10781
667#define EVENT_AREA_RADIUS 65
668#define EVENT_COOLDOWN 30000
691 {-4615.8556f, 1342.2532f, 139.9f, 1.612f},
692 {-4598.9365f, 1377.3182f, 139.9f, 3.917f},
693 {-4598.4697f, 1360.8999f, 139.9f, 2.427f},
694 {-4589.3599f, 1369.1061f, 139.9f, 3.165f},
695 {-4608.3477f, 1386.0076f, 139.9f, 4.108f},
696 {-4633.1889f, 1359.8033f, 139.9f, 0.949f},
697 {-4623.5791f, 1351.4574f, 139.9f, 0.971f},
698 {-4607.2988f, 1351.6099f, 139.9f, 2.416f},
699 {-4633.7764f, 1376.0417f, 139.9f, 5.608f},
700 {-4600.2461f, 1369.1240f, 139.9f, 3.056f},
701 {-4631.7808f, 1367.9459f, 139.9f, 0.020f},
702 {-4600.2461f, 1369.1240f, 139.9f, 3.056f},
703 {-4631.7808f, 1367.9459f, 139.9f, 0.020f},
704 {-4615.5586f, 1353.0031f, 139.9f, 1.540f},
705 {-4616.4736f, 1384.2170f, 139.9f, 4.971f},
706 {-4627.1240f, 1378.8752f, 139.9f, 2.544f}
717 {9, 0, 22075, 10000, 7000},
718 {2, 9, 22074, 10000, 7000},
719 {4, 11, 19797, 10000, 7000},
720 {1, 15, 22076, 10000, 7000}
730 {10000, 15000, 35871},
731 {10000, 10000, 38985},
732 {35000, 35000, 22884},
733 {20000, 20000, 17194},
734 {8000, 15000, 38010},
735 {12000, 20000, 16102},
736 {10000, 15000, 15284},
737 {18000, 20000, 39082},
738 {25000, 28000, 33961}
831 AggroTarget->GetPosition(x, y, z);
905 LordIllidan->AI()->EnterEvadeMode();
980 uint8 GroupMemberCount = 0;
981 uint8 DeadMemberCount = 0;
982 uint8 FailedMemberCount = 0;
998 if (GroupMember->
isDead())
1002 if (GroupMemberCount == FailedMemberCount)
1007 if (GroupMemberCount == DeadMemberCount)
1193 uint8 FelguardCount = 0;
1194 uint8 DreadlordCount = 0;
1196 for (
uint8 i = 0; i < count; ++i)
1207 if (
rand32() % 3 == 1 && FelguardCount<2)
1209 Spawn->SetDisplayId(18654);
1212 else if (DreadlordCount < 3)
1214 Spawn->SetDisplayId(19991);
1217 else if (FelguardCount<2)
1219 Spawn->SetDisplayId(18654);
1231 target->GetPosition(x, y, z);
1232 Spawn->GetMotionMaster()->MovePoint(0, x, y, z);
1374 switch (me->GetEntry())
1399 if (!UpdateVictim())
1401 _events.Update(diff);
1403 while (
uint32 eventId = _events.ExecuteEvent())
1441 DoMeleeAttackIfReady();
1452 switch (me->GetEntry())
1481 Unit* totemOspirits =
nullptr;
1497 player->KilledMonsterCredit(credit);
1525 if (
Player* caster = GetCaster()->ToPlayer())
1527 caster->KilledMonsterCredit(
NPC_KARYNAKU, karynaku->GetGUID());
1532 AfterHit +=
SpellHitFn(spell_unlocking_zuluheds_chains_SpellScript::HandleAfterHit);
1575 me->DespawnOrUnsummon();
1586 boar->SetWalk(
false);
1587 boar->GetMotionMaster()->MovePoint(
POINT_TUBER, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
1622 if (
Player* target = GetTarget()->ToPlayer())
1623 target->CastSpell(target, target->GetNativeGender() ==
GENDER_MALE ?
1629 Unit* target = GetTarget();
1648 return ValidateSpellInfo(
1657 Unit* target = GetHitUnit();
1718 return ValidateSpellInfo({ _triggeredSpellId });
1723 GetHitUnit()->CastSpell(GetHitUnit(), _triggeredSpellId);
std::chrono::seconds Seconds
Seconds shorthand typedef.
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
@ QUEST_STATUS_INCOMPLETE
uint32 urand(uint32 min, uint32 max)
#define RegisterSpellScript(spell_script)
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ EMOTE_ONESHOT_ATTACK_UNARMED
@ AURA_EFFECT_HANDLE_REAL
#define SpellEffectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_UNINTERACTIBLE
Creature * DoSummon(uint32 entry, Position const &pos, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
bool LoadCreaturesAddon()
void SetDisplayId(uint32 modelId) override
void SetImmuneToPC(bool apply) override
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetTarget(ObjectGuid guid) override
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
std::list< MemberSlot > MemberSlotList
MemberSlotList::const_iterator member_citerator
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
void MoveTakeoff(uint32 id, Position const &pos, Optional< float > velocity={})
void MoveRandom(float wanderDistance=0.0f)
static ObjectGuid const Empty
static Creature * ToCreature(Object *o)
static ObjectGuid GetGUID(Object const *o)
static Player * ToPlayer(Object *o)
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
QuestStatus GetQuestStatus(uint32 quest_id) const
void FailQuest(uint32 quest_id)
uint32 GetQuestId() const
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
void ClearThreat(Unit *target)
void DoMeleeAttackIfReady()
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
virtual void AttackStart(Unit *)
SpellCastResult DoCast(uint32 spellId)
void ClearUnitState(uint32 f)
ThreatManager & GetThreatManager()
void SetFaction(uint32 faction) override
void StopMoving(bool force=false)
MotionMaster * GetMotionMaster()
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
void AddUnitState(uint32 f)
bool SetCanFly(bool enable, bool packetOnly=false)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void HandleEmoteCommand(Emote emoteId)
void SetStandState(UnitStandStateType state)
void CombatStop(bool includingCast=false, bool mutualPvP=true)
void SetUnitFlag(UnitFlags flags)
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)
Position GetRandomNearPosition(float radius)
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
void UpdateGroundPositionZ(float x, float y, float &z) const
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
GameObjectAI * GetAI(GameObject *go) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
npc_enslaved_netherwing_drake()
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *c) const override
CreatureAI * GetAI(Creature *creature) const override
npc_invis_infernal_caster()
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *c) const override
npc_lord_illidan_stormrage()
npc_mature_netherwing_drake()
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
npc_shadowmoon_tuber_node()
npc_torloth_the_magnificent()
CreatureAI * GetAI(Creature *c) const override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_shadowmoon_arcano_scorp_control)
spell_shadowmoon_arcano_scorp_control(uint32 triggeredSpellId)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_shadowmoon_illidari_agent_illusion)
PrepareSpellScript(spell_shadowmoon_quest_credit_crazed_colossus)
bool Validate(SpellInfo const *spellInfo) override
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_shadowmoon_unbanish_azaloth)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_unlocking_zuluheds_chains_SpellScript)
spell_unlocking_zuluheds_chains()
SpellScript * GetSpellScript() const override
TC_GAME_API Unit * GetUnit(WorldObject const &, 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)
Player * GetPlayerForEscort()
void UpdateAI(uint32 diff) override
float GetPositionZ() const
float GetPositionX() const
void GetPosition(float &x, float &y) const
float GetPositionY() const
void AttackStart(Unit *) override
bool HealthAbovePct(uint32 pct) const
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
go_crystal_prisonAI(GameObject *go)
void OnQuestAccept(Player *player, Quest const *quest) override
void JustSummoned(Creature *summoned) override
void WaypointReached(uint32 waypointId, uint32) override
void UpdateAI(uint32 uiDiff) override
void OnQuestAccept(Player *player, Quest const *quest) override
npc_earthmender_wildaAI(Creature *creature)
void JustEngagedWith(Unit *who) override
void JustEngagedWith(Unit *) override
void JustDied(Unit *) override
npc_enraged_spiritAI(Creature *creature)
void UpdateAI(uint32 diff) override
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
void UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 id) override
npc_enslaved_netherwing_drakeAI(Creature *creature)
ObjectGuid LordIllidanGUID
void JustDied(Unit *) override
npc_illidari_spawnAI(Creature *creature)
void JustEngagedWith(Unit *) override
void UpdateAI(uint32 diff) override
void JustDied(Unit *) override
void UpdateAI(uint32) override
void IsSummonedBy(WorldObject *summoner) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
npc_infernal_attackerAI(Creature *creature)
npc_invis_infernal_casterAI(Creature *creature)
void UpdateAI(uint32 diff) override
void SetData(uint32 id, uint32 data) override
npc_lord_illidan_stormrageAI(Creature *creature)
void MoveInLineOfSight(Unit *) override
void AttackStart(Unit *) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
npc_mature_netherwing_drakeAI(Creature *creature)
void MovementInform(uint32 type, uint32 id) override
void UpdateAI(uint32 diff) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void SetData(uint32 id, uint32 data) override
npc_shadowmoon_tuber_nodeAI(Creature *creature)
ObjectGuid AggroTargetGUID
void JustEngagedWith(Unit *) override
ObjectGuid LordIllidanGUID
npc_torloth_the_magnificentAI(Creature *creature)
void UpdateAI(uint32 diff) override
void JustDied(Unit *killer) override
@ SPELL_ARCANO_SCORP_CONTROL_03
@ SPELL_ARCANO_SCORP_CONTROL_01
@ SPELL_ARCANO_SCORP_CONTROL_02
static WaveData WavesInfo[]
static SpawnSpells SpawnCast[]
@ GO_SHADOWMOON_TUBER_MOUND
#define QUEST_BATTLE_OF_THE_CRIMSON_WATCH
static Position SpawnLocation[]
void AddSC_shadowmoon_valley()
@ EVENT_ENRAGED_AIR_SPIRIT_CHAIN_LIGHTNING
@ EVENT_ENRAGED_AIR_SPIRIT_HURRICANE
@ EVENT_ENRAGED_EARTH_SPIRIT
@ EVENT_ENRAGED_WATER_SPIRIT
@ EVENT_ENRAGED_FIRE_SPIRIT
static TorlothCinematic TorlothAnim[]
@ QUEST_ENRAGED_SPIRITS_FIRE_EARTH
@ SPELL_EARTHEN_SOUL_CAPTURED_CREDIT
@ SPELL_AIR_SPIRIT_CHAIN_LIGHTNING
@ NPC_ENRAGED_WATER_SPIRIT
@ NPC_ENRAGED_EARTH_SPIRIT
@ RADIUS_TOTEM_OF_SPIRITS
@ NPC_ENRAGED_WATERY_SOUL
@ SPELL_WATERY_SOUL_CAPTURED_CREDIT
@ SPELL_AIRY_SOUL_CAPTURED_CREDIT
@ QUEST_ENRAGED_SPIRITS_AIR
@ SPELL_FIERY_SOUL_CAPTURED_CREDIT
@ QUEST_ENRAGED_SPIRITS_WATER
@ NPC_ENRAGED_FIRE_SPIRIT
@ SPELL_SUMMON_ENRAGED_EARTH_SHARD
DissensionAmongstTheRanks
@ SPELL_ILLIDARI_DISGUISE_MALE
@ SPELL_ILLIDARI_DISGUISE_FEMALE
@ SPELL_KILL_CREDIT_CRAZED_COLOSSUS
#define EVENT_AREA_RADIUS
@ NPC_DRAGONMAW_SUBJUGATOR
@ SPELL_HIT_FORCE_OF_NELTHARAKU
@ QUEST_THE_FORCE_OF_NELTHARAKU
@ SPELL_FORCE_OF_NELTHARAKU
@ SPELL_TRANSFORM_INFERNAL
@ EVENT_CAST_SUMMON_INFERNAL