250 theLichKing->setActive(
true);
251 theLichKing->SetFarVisible(
true);
253 bolvarFordragon->setActive(
true);
254 bolvarFordragon->SetFarVisible(
true);
256 factionNPC->setActive(
true);
257 factionNPC->SetFarVisible(
true);
348 bolvarFordragon->setActive(
false);
349 bolvarFordragon->SetFarVisible(
false);
356 theLichKing->setActive(
false);
357 theLichKing->SetFarVisible(
false);
382 factionNPC->GetMotionMaster()->MovePath((factionNPC->GetSpawnId() * 10) << 3,
false);
599 return GetIcecrownCitadelAI<npc_arthas_teleport_visualAI>(creature);
666 std::vector<Creature*> creatures;
671 if (creatures.empty())
674 for (
Creature* creature : creatures)
702 if (!minion->IsAlive())
740 if (minion->IsAIEnabled() && !minion->IsInCombat())
741 minion->AI()->DoZoneInCombat(darkfallen);
793 std::vector<Creature*> creatures;
797 if (!creatures.empty())
871 unholyStrike.
Repeat(8s, 9s);
901 vampiric->AI()->AttackStart(target);
902 summonVampiric.
Repeat(30s);
956 amplifyMagic.
Repeat(15s, 24s);
961 blastWave.
Repeat(25s, 30s);
967 polymorph.
Repeat(25s, 35s);
987 immunity.
Repeat(20s, 25s);
1001 unholyStrike.
Repeat(8s, 11s);
1084 Unit* target =
nullptr;
1135 trigger->DespawnOrUnsummon();
1242 if (targets.size() < 2)
1300 target->SetUninteractible(
true);
1301 target->SetImmuneToPC(
true);
1311 target->SetUninteractible(
false);
1312 target->SetImmuneToPC(
false);
1350 trap->SetRespawnTime(trap->GetGOInfo()->GetAutoCloseTime() /
IN_MILLISECONDS);
1352 std::list<Creature*> wards;
1355 for (std::list<Creature*>::iterator itr = wards.begin(); itr != wards.end(); ++itr)
1361 if (
Unit* target = (*itr)->SelectNearestTarget(150.0f))
1362 (*itr)->AI()->AttackStart(target);
1463 static Position const offset = { 0.0f, 0.0f, 200.0f, 0.0f };
1474 :
SpellScript(), _triggerId(triggerId), _triggerFlags(triggerFlags)
1504 player->
TeleportTo(631, 4126.35f, 2769.23f, 350.963f, 0.0f);
1512 std::list<Creature*> traps;
1515 bool instant =
false;
1516 for (std::list<Creature*>::iterator itr = traps.begin(); itr != traps.end(); ++itr)
1518 (*itr)->AI()->DoAction(instant ? 1000 : 11000);
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
@ TEMPSUMMON_MANUAL_DESPAWN
@ TEMPSUMMON_CORPSE_DESPAWN
std::vector< ObjectGuid > GuidVector
bool roll_chance_i(int chance)
if(posix_memalign(&__mallocedMemory, __align, __size)) return NULL
#define RegisterGameObjectAI(ai_name)
#define RegisterSpellScript(spell_script)
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
@ TARGET_UNIT_SRC_AREA_ALLY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ EMOTE_STATE_CUSTOM_SPELL_03
@ EMOTE_ONESHOT_POINT_NO_SHEATHE
@ EMOTE_ONESHOT_EXCLAMATION
@ EMOTE_STATE_CUSTOM_SPELL_02
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SEND_EVENT
@ SPELL_EFFECT_QUEST_COMPLETE
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define SpellDestinationTargetSelectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectApplyHandler > OnEffectRemove
HookList< EffectApplyHandler > OnEffectApply
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void SetHomePosition(float x, float y, float z, float o)
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
void GetHomePosition(float &x, float &y, float &z, float &ori) const
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
uint32 GetWaypointPathId() const
void SetImmuneToAll(bool apply) override
bool operator()(Unit *unit) const
DeathPlagueTargetSelector(Unit *owner)
void Repeat(Milliseconds time)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
void SetGoState(GOState state)
void SetGoAnimProgress(uint8 animprogress)
void SetFlag(GameObjectFlags flags)
bool operator()(Creature *target) const
ICCOrbControllerMinionSearch(Unit *owner, bool checkCasting)
EncounterState GetBossState(uint32 id) const
void PlayerRelocation(Player *, float x, float y, float z, float orientation)
void MoveLand(uint32 id, Position const &pos, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default)
static Unit * ToUnit(Object *o)
static ObjectGuid GetGUID(Object const *o)
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, TeleportToOptions options=TELE_TO_NONE, Optional< uint32 > instanceId={})
bool IsGameMaster() const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
HookList< CastHandler > AfterCast
HookList< HitHandler > AfterHit
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
int32 GetEffectValue() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
HookList< EffectHandler > OnEffectLaunch
GameObject * GetGObjCaster() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
TaskContext & Repeat(std::chrono::duration< Rep, Period > duration)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(std::chrono::duration< Rep, Period > time, task_handler_t task)
TaskScheduler & Update(success_t const &callback=nullptr)
TaskScheduler & SetValidator(P &&predicate)
Sets a validator which is asked if tasks are allowed to be executed.
bool DoSpellAttackIfReady(uint32 spellId)
virtual void DoAction(int32)
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)
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
Spell * FindCurrentSpellBySpellId(uint32 spell_id) const
MotionMaster * GetMotionMaster()
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
void SetEmoteState(Emote emote)
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)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
InstanceScript * GetInstanceScript() const
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) 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)
void setActive(bool isActiveObject)
void SetFarVisible(bool on)
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
float GetDistance(WorldObject const *obj) const
virtual uint32 GetData(uint32) const
virtual void SetData(uint32, uint32)
at_icc_nerubar_broodkeeper()
bool TryHandleOnce(Player *player, AreaTriggerEntry const *areaTrigger) override
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
CreatureAI * GetAI(Creature *creature) const override
npc_arthas_teleport_visual()
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
std::list< WorldObject * > _targets
void HandleMirror(SpellEffIndex)
void CountTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
std::list< WorldObject * > _sharedList
void FilterTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void HandleScript(SpellEffIndex effIndex)
void HandleQuestComplete(SpellEffIndex)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
static void RelocateDest(SpellDestination &dest)
void HandleEvent(SpellEffIndex effIndex)
bool Validate(SpellInfo const *spell) override
spell_trigger_spell_from_caster(uint32 triggerId, TriggerCastFlags triggerFlags=TRIGGERED_FULL_MASK)
TriggerCastFlags _triggerFlags
void AddSC_icecrown_citadel()
static Emote const DarkFallensEmotes[]
@ ACTION_SIPHON_INTERRUPTED
@ SPELL_HARVEST_BLIGHT_SPECIMEN
@ SPELL_HARVEST_BLIGHT_SPECIMEN25
@ SPELL_ORB_CONTROLLER_ACTIVE
@ SPELL_RECENTLY_INFECTED
@ SPELL_SHROUD_OF_SPELL_WARDING
@ SPELL_EMPOWERED_BLOOD_3
@ SPELL_EMPOWERED_BLOOD_2
@ SPELL_DEATH_PLAGUE_KILL
@ SPELL_DEATH_PLAGUE_AURA
@ SPELL_BLOOD_MIRROR_DAMAGE_SHARE
@ SPELL_EMPOWERED_BLOOD_4
@ EMOTE_DEATH_PLAGUE_WARNING
@ SPELL_GREEN_BLIGHT_RESIDUE
@ SPELL_ORANGE_BLIGHT_RESIDUE
#define RegisterIcecrownCitadelCreatureAI(ai_name)
@ GO_EMPOWERING_BLOOD_ORB
@ DATA_DEATHBRINGER_SAURFANG
@ DATA_UPPERSPIRE_TELE_ACT
@ DATA_BLOOD_QUEEN_LANA_THEL
@ DATA_PROFESSOR_PUTRICIDE
@ DATA_NERUBAR_BROODKEEPER_EVENT
@ NPC_DARKFALLEN_TACTICIAN
@ NPC_DARKFALLEN_BLOOD_KNIGHT
@ NPC_HIGHLORD_BOLVAR_FORDRAGON_LH
@ NPC_SE_HIGH_OVERLORD_SAURFANG
@ NPC_DARKFALLEN_ARCHMAGE
@ NPC_SE_MURADIN_BRONZEBEARD
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
void RandomResize(C &container, std::size_t requestedSize)
static void VisitGridObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
DarkFallenAI(Creature *creature)
void JustEngagedWith(Unit *) override
void EnterEvadeMode(EvadeReason why) override
void UpdateAI(uint32 diff) override
void SetGUID(ObjectGuid const &guid, int32 id) override
void DoAction(int32 action) override
virtual void ScheduleSpells()=0
float GetExactDist2d(const float x, const float y) const
constexpr void GetPosition(float &x, float &y) const
constexpr float GetOrientation() const
void SetCombatMovement(bool allowMovement)
Unit * DoSelectLowestHpFriendly(float range, uint32 minHPDiff=1)
void RelocateOffset(Position const &offset)
void UpdateAI(uint32 diff) override
go_empowering_blood_orb(GameObject *go)
void SetGUID(ObjectGuid const &guid, int32 id) override
bool OnGossipHello(Player *player) override
npc_alchemist_adrianna(Creature *creature)
bool OnGossipHello(Player *player) override
void UpdateAI(uint32 diff) override
InstanceScript * _instance
npc_arthas_teleport_visualAI(Creature *creature)
npc_darkfallen_advisor(Creature *creature)
void ScheduleSpells() override
npc_darkfallen_archmage(Creature *creature)
void ScheduleSpells() override
void ScheduleSpells() override
npc_darkfallen_blood_knight(Creature *creature)
void ScheduleSpells() override
npc_darkfallen_noble(Creature *creature)
void ScheduleSpells() override
npc_darkfallen_tactician(Creature *creature)
bool OnGossipSelect(Player *, uint32 menuId, uint32) override
npc_entrance_faction_leader(Creature *creature)
void DoAction(int32 action) override
npc_frost_freeze_trap(Creature *creature)
void UpdateAI(uint32 diff) override
void SetData(uint32 type, uint32 data) override
void UpdateAI(uint32 diff) override
ObjectGuid _bolvarFordragon
InstanceScript *const _instance
npc_highlord_tirion_fordring_lh(Creature *creature)
void UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 id) override
void InitializeAI() override
void JustEngagedWith(Unit *) override
void DoAction(int32 action) override
npc_icc_nerubar_broodkeeper(Creature *creature)
void SetGUID(ObjectGuid const &guid, int32 id) override
void DoAction(int32 action) override
void UpdateAI(uint32 diff) override
void ScheduleVisualChannel(bool evading)
npc_icc_orb_controller(Creature *creature)
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
void UpdateAI(uint32 diff) override
npc_rotting_frost_giant(Creature *creature)
void JustDied(Unit *) override
npc_vampiric_fiend(Creature *creature)
void JustEngagedWith(Unit *) override
void UpdateAI(uint32 diff) override
void EnterEvadeMode(EvadeReason) override