156#define SPELL_FLASH_HEAL (IsUndead ? SPELL_FLASH_HEAL_UNDEAD : SPELL_FLASH_HEAL_NORMAL)
157#define SPELL_POWER_WORD_SHIELD (IsUndead ? SPELL_POWER_WORD_SHIELD_UNDEAD : SPELL_POWER_WORD_SHIELD_NORMAL)
158#define SPELL_SMITE (IsUndead ? SPELL_SMITE_UNDEAD : SPELL_SMITE_NORMAL)
161#define SPELL_FEL_IRON_BOMB (IsUndead ? SPELL_FEL_IRON_BOMB_UNDEAD : SPELL_FEL_IRON_BOMB_NORMAL)
162#define SPELL_MACHINE_GUN (IsUndead ? SPELL_MACHINE_GUN_UNDEAD : SPELL_MACHINE_GUN_NORMAL)
163#define SPELL_ROCKET_LAUNCH (IsUndead ? SPELL_ROCKET_LAUNCH_UNDEAD : SPELL_ROCKET_LAUNCH_NORMAL)
342 creature->
SetPosition(data->posX, data->posY, data->posZ, data->orientation);
402 theLichKing->setActive(
true);
404 bolvarFordragon->setActive(
true);
406 factionNPC->setActive(
true);
497 bolvarFordragon->setActive(
false);
504 theLichKing->setActive(
false);
529 factionNPC->GetMotionMaster()->MovePath(factionNPC->GetDBTableGUIDLow()*10,
false);
530 me->setActive(
false);
742 for (
uint32 i = 0; i < 4; ++i)
746 if (crusader->IsAlive() && crusader->GetEntry() == crusader->GetCreatureData()->id)
748 crusader->m_Events.AddEvent(
new CaptainSurviveTalk(*crusader), crusader->m_Events.CalculateTime(delay));
767 switch (victim->GetTypeId())
773 switch (victim->GetEntry())
794 me->SetDisableGravity(
false);
818 me->setActive(
false);
841 me->setActive(
false);
843 me->SetDisableGravity(
false);
956 me->GetMap()->LoadGrid(4356.71f, 2484.33f);
964 for (
uint32 i = 0; i < 4; ++i)
972 me->setActive(
false);
989 me->setActive(
false);
1017 me->setActive(
false);
1038 float minY = 2600.0f;
1039 float maxY = 2650.0f;
1040 if (waypointId == 1)
1048 else if (waypointId == 4)
1055 std::list<Creature*> temp;
1058 me->VisitNearbyGridObject(80.0f, searcher);
1061 for (std::list<Creature*>::iterator itr = temp.begin(); itr != temp.end(); ++itr)
1062 if ((*itr)->GetHomePosition().GetPositionY() < maxY && (*itr)->GetHomePosition().GetPositionY() > minY)
1085 me->VisitNearbyWorldObject(60.0f, searcher);
1090 if (damage >=
me->GetHealth())
1094 me->VisitNearbyGridObject(333.0f, worker);
1164 me->DealHeal(
me,
me->CountPctFromMaxHealth(5));
1179 return (
me->GetPositionY() > 2660.0f) == (target->GetPositionY() > 2660.0f);
1240 me->setActive(
true);
1250 me->SetHomePosition(*
me);
1258 return (
me->GetPositionY() > 2660.0f) == (target->GetPositionY() > 2660.0f);
1273 if (!
me->GetVehicle())
1275 me->GetMotionMaster()->Clear(
false);
1290 switch (
me->GetEntry())
1395 me->VisitNearbyGridObject(60.0f, searcher);
1618 return (
me->GetPositionY() > 2660.0f) == (target->GetPositionY() > 2660.0f) &&
SmartAI::CanAIAttack(target);
1650 if (!
me->GetVehicle())
1651 me->DespawnOrUnsummon(100);
1708 if (creature->GetExactDist2d(4357.052f, 2769.421f) < 100.0f && creature->GetHomePosition().GetPositionZ() < 315.0f)
1790 trap->SetRespawnTime(trap->GetGOInfo()->trap.autoCloseTime);
1792 std::list<Creature*> wards;
1795 for (std::list<Creature*>::iterator itr = wards.begin(); itr != wards.end(); ++itr)
1801 if (
Unit* target = (*itr)->SelectNearestTarget(150.0f))
1802 (*itr)->AI()->AttackStart(target);
1870 if (!targets.empty())
1874 targets.push_back(target);
1944 return unit->IsAlive();
2008 target->DespawnOrUnsummon(1);
2035 static Position const offset = {0.0f, 0.0f, 200.0f, 0.0f};
2062 player->TeleportTo(631, 4126.35f, 2769.23f, 350.963f, 0.0f);
2067 player->GetMap()->PlayerRelocation(player, 4126.35f, 2769.23f, 350.963f, 0.0f);
2070 std::list<Creature*> traps;
2073 bool instant =
false;
2074 for (std::list<Creature*>::iterator itr = traps.begin(); itr != traps.end(); ++itr)
2076 (*itr)->AI()->DoAction(instant ? 1000 : 11000);
void GetCreatureListWithEntryInGrid(std::list< Creature * > &list, WorldObject *source, uint32 entry, float maxSearchRange)
@ 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
@ TARGET_UNIT_SRC_AREA_ALLY
@ TARGET_UNIT_DEST_AREA_ENTRY
@ AURA_EFFECT_HANDLE_REAL
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
@ UNIT_FLAG_IMMUNE_TO_NPC
@ UNIT_FLAG_NOT_SELECTABLE
@ UNIT_FLAG2_ALLOW_ENEMY_INTERACT
@ UNIT_FIELD_NPC_EMOTESTATE
@ VEHICLE_SPELL_RIDE_HARDCODED
@ SPELL_JUDGEMENT_OF_COMMAND
bool operator()(WorldObject *object) const
AreaTriggerScript(const char *name)
HookList< EffectApplyHandler > OnEffectRemove
HookList< EffectApplyHandler > OnEffectApply
InstanceScript *const instance
BossAI(Creature *creature, uint32 bossId)
CaptainSurviveTalk(Creature const &owner)
bool Execute(uint64, uint32)
CreatureAI(Creature *creature)
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
virtual void EnterEvadeMode()
void SetHomePosition(float x, float y, float z, float o)
uint32 GetOriginalEntry() const
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
void SetRespawnDelay(uint32 delay)
void SetPosition(float x, float y, float z, float o)
CreatureData const * GetCreatureData() const
uint32 GetRespawnDelay() const
void SetCorpseDelay(uint32 delay)
uint32 GetCorpseDelay() const
CreatureScript(const char *name)
bool operator()(WorldObject *object) const
DeathPlagueTargetSelector(Unit *caster)
void operator()(Creature *creature)
FrostwingVrykulSearcher(Creature const *source, float range)
bool operator()(Unit *unit)
EncounterState GetBossState(uint32 id) const
void MoveLand(uint32 id, Position const &pos)
NullCreatureAI(Creature *c)
static Creature * GetCreature(WorldObject const &u, uint64 guid)
bool CanAIAttack(const Unit *who) const OVERRIDE
Creature * GetHitCreature()
WorldLocation const * GetExplTargetDest()
SpellInfo const * GetSpellInfo()
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
HookList< EffectHandler > OnEffectHitTarget
HookList< CastHandler > OnCast
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
SpellScriptLoader(const char *name)
virtual void DoAction(int32)
void DoMeleeAttackIfReady()
void DoCast(uint32 spellId)
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
void DoCastVictim(uint32 spellId, bool triggered=false)
void DoCastAOE(uint32 spellId, bool triggered=false)
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID=0, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Unit * GetVehicleBase() const
MotionMaster * GetMotionMaster()
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
void GetCreatureListWithEntryInGrid(std::list< Creature * > &lList, uint32 uiEntry, float fMaxSearchRange) const
void GetNearPosition(Position &pos, float dist, float angle)
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true) const
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TempSummonType::TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
virtual uint32 GetData(uint32) const
virtual void SetData(uint32, uint32)
bool OnTrigger(Player *player, AreaTriggerEntry const *) OVERRIDE
bool OnTrigger(Player *player, AreaTriggerEntry const *) OVERRIDE
at_icc_start_blood_quickening()
bool OnTrigger(Player *player, AreaTriggerEntry const *) OVERRIDE
at_icc_start_frostwing_gauntlet()
bool OnTrigger(Player *player, AreaTriggerEntry const *) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
bool OnGossipHello(Player *player, Creature *creature) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
npc_arthas_teleport_visual()
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
npc_highlord_tirion_fordring_lh()
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
npc_rotting_frost_giant()
void HandleScript(SpellEffIndex effIndex)
void CountTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_frost_giant_death_plague_SpellScript)
void FilterTargets(std::list< WorldObject * > &targets)
SpellScript * GetSpellScript() const OVERRIDE
spell_frost_giant_death_plague()
PrepareSpellScript(spell_icc_harvest_blight_specimen_SpellScript)
void HandleQuestComplete(SpellEffIndex)
void HandleScript(SpellEffIndex effIndex)
SpellScript * GetSpellScript() const OVERRIDE
spell_icc_harvest_blight_specimen()
PrepareSpellScript(spell_icc_soul_missile_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
void HandleEvent(SpellEffIndex effIndex)
PrepareSpellScript(spell_icc_sprit_alarm_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
void HandleScript(SpellEffIndex effIndex)
PrepareSpellScript(spell_svalna_remove_spear_SpellScript)
spell_svalna_remove_spear()
SpellScript * GetSpellScript() const OVERRIDE
void RemoveAliveTarget(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_svalna_revive_champion_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
spell_svalna_revive_champion()
@ ACTION_RESURRECT_CAPTAINS
#define SPELL_ROCKET_LAUNCH
@ SPELL_ROCKET_LAUNCH_NORMAL
@ SPELL_HARVEST_BLIGHT_SPECIMEN
@ SPELL_FEL_IRON_BOMB_NORMAL
@ SPELL_JUDGEMENT_OF_COMMAND
@ SPELL_FLASH_HEAL_NORMAL
@ SPELL_HARVEST_BLIGHT_SPECIMEN25
@ SPELL_RECENTLY_INFECTED
@ SPELL_IMPALING_SPEAR_KILL
@ SPELL_POWER_WORD_SHIELD_NORMAL
@ SPELL_FLASH_HEAL_UNDEAD
@ SPELL_POWER_WORD_SHIELD_UNDEAD
@ SPELL_HAMMER_OF_BETRAYAL
@ SPELL_FEL_IRON_BOMB_UNDEAD
@ SPELL_DEATH_PLAGUE_KILL
@ SPELL_ROCKET_LAUNCH_UNDEAD
@ SPELL_DEATH_PLAGUE_AURA
@ SPELL_MACHINE_GUN_NORMAL
@ SPELL_MACHINE_GUN_UNDEAD
#define SPELL_FEL_IRON_BOMB
void AddSC_icecrown_citadel()
@ EVENT_RUPERT_FEL_IRON_BOMB
@ EVENT_BRANDON_CRUSADER_STRIKE
@ EVENT_GRONDEL_MORTAL_STRIKE
@ EVENT_ARNATH_DOMINATE_MIND
@ EVENT_GRONDEL_SUNDER_ARMOR
@ EVENT_RUPERT_ROCKET_LAUNCH
@ EVENT_BRANDON_JUDGEMENT_OF_COMMAND
@ EVENT_BRANDON_HAMMER_OF_BETRAYAL
@ EVENT_GRONDEL_CONFLAGRATION
@ EVENT_RUPERT_MACHINE_GUN
@ EVENT_BRANDON_DIVINE_SHIELD
@ EVENT_ARNATH_FLASH_HEAL
@ EVENT_GRONDEL_CHARGE_CHECK
#define SPELL_POWER_WORD_SHIELD
@ SAY_SVALNA_CAPTAIN_DEATH
@ EMOTE_DEATH_PLAGUE_WARNING
@ SAY_CROK_WEAKENING_SVALNA
@ SAY_CROK_WEAKENING_GAUNTLET
@ SAY_CAPTAIN_SECOND_DEATH
@ SAY_SVALNA_KILL_CAPTAIN
@ SAY_SVALNA_RESURRECT_CAPTAINS
@ SAY_CAPTAIN_SURVIVE_TALK
@ SAY_CAPTAIN_RESURRECTED
@ EMOTE_SVALNA_BROKEN_SHIELD
#define SPELL_MACHINE_GUN
@ NPC_CAPTAIN_GRONDEL_UNDEAD
@ NPC_YMIRJAR_BATTLE_MAIDEN
@ NPC_CAPTAIN_BRANDON_UNDEAD
@ NPC_CAPTAIN_ARNATH_UNDEAD
@ NPC_HIGHLORD_BOLVAR_FORDRAGON_LH
@ NPC_CAPTAIN_RUPERT_UNDEAD
@ NPC_SE_HIGH_OVERLORD_SAURFANG
@ NPC_YMIRJAR_FROSTBINDER
@ NPC_SE_MURADIN_BRONZEBEARD
CreatureAI * GetIcecrownCitadelAI(Creature *creature)
@ SPELL_GREEN_BLIGHT_RESIDUE
@ SPELL_ORANGE_BLIGHT_RESIDUE
@ DATA_DEATHBRINGER_SAURFANG
@ DATA_BLOOD_QUICKENING_STATE
@ DATA_BLOOD_QUEEN_LANA_THEL
@ DATA_PROFESSOR_PUTRICIDE
void RandomResizeList(std::list< T > &list, uint32 size)
C::value_type const & SelectRandomContainerElement(C const &container)
@ NPC_YMIRJAR_DEATHBRINGER
void GetPosition(float &x, float &y) const
void SetCombatMovement(bool allowMovement)
bool HealthAbovePct(uint32 pct) const
bool HealthBelowPct(uint32 pct) const
std::list< Creature * > DoFindFriendlyMissingBuff(float range, uint32 spellId)
ScriptedAI(Creature *creature)
void JustReachedHome() OVERRIDE
void InitializeAI() OVERRIDE
void DoAction(int32 action) OVERRIDE
void KilledUnit(Unit *victim) OVERRIDE
void MovementInform(uint32 type, uint32 id) OVERRIDE
void EnterCombat(Unit *) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
boss_sister_svalnaAI(Creature *creature)
void JustDied(Unit *) OVERRIDE
void SpellHitTarget(Unit *target, SpellInfo const *spell) OVERRIDE
void SpellHit(Unit *caster, SpellInfo const *spell) OVERRIDE
void SpellHit(Unit *, SpellInfo const *spell) OVERRIDE
InstanceScript * instance
void KilledUnit(Unit *victim) OVERRIDE
void EnterEvadeMode() OVERRIDE
npc_argent_captainAI(Creature *creature)
void EnterCombat(Unit *) OVERRIDE
void JustDied(Unit *) OVERRIDE
void DoAction(int32 action) OVERRIDE
bool CanAIAttack(Unit const *target) const OVERRIDE
InstanceScript * _instance
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_arthas_teleport_visualAI(Creature *creature)
npc_captain_arnathAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Creature * FindFriendlyCreature() const
npc_captain_brandonAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_captain_grondelAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_captain_rupertAI(Creature *creature)
InstanceScript * _instance
npc_crok_scourgebaneAI(Creature *creature)
void SetGUID(uint64 guid, int32 type) OVERRIDE
uint32 const _respawnTime
void UpdateEscortAI(uint32 const diff) OVERRIDE
bool _didUnderTenPercentText
bool CanAIAttack(Unit const *target) const OVERRIDE
void WaypointReached(uint32 waypointId) OVERRIDE
std::set< uint64 > _aliveTrash
void WaypointStart(uint32 waypointId) OVERRIDE
void DoAction(int32 action) OVERRIDE
void DamageTaken(Unit *, uint32 &damage) OVERRIDE
uint32 const _corpseDelay
void SetDespawnAtFar(bool despawn)
npc_escortAI(Creature *creature)
void SetDespawnAtEnd(bool despawn)
void SetEscortPaused(bool on)
void Start(bool isActiveAttacker=true, bool run=false, uint64 playerGUID=0, Quest const *quest=NULL, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=true)
void DoAction(int32 action) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_frost_freeze_trapAI(Creature *creature)
npc_frostwing_vrykulAI(Creature *creature)
bool CanAIAttack(Unit const *target) const OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void SetData(uint32 type, uint32 data) OVERRIDE
npc_highlord_tirion_fordringAI(Creature *creature)
InstanceScript *const _instance
uint32 _vehicleCheckTimer
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_impaling_spearAI(Creature *creature)
npc_rotting_frost_giantAI(Creature *creature)
void JustDied(Unit *) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================