TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
npc_crok_scourgebane::npc_crok_scourgebaneAI Struct Reference

Public Member Functions

 npc_crok_scourgebaneAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void DoAction (int32 action) override
 
void SetGUID (ObjectGuid guid, int32 type) override
 
void WaypointReached (uint32 waypointId) override
 
void WaypointStart (uint32 waypointId) override
 
void DamageTaken (Unit *, uint32 &damage) override
 
void UpdateEscortAI (uint32 diff) override
 
bool CanAIAttack (Unit const *target) const override
 
- Public Member Functions inherited from npc_escortAI
 npc_escortAI (Creature *creature)
 
 ~npc_escortAI ()
 
void AttackStart (Unit *who) override
 
void MoveInLineOfSight (Unit *who) override
 
void JustDied (Unit *) override
 
void JustRespawned () override
 
void ReturnToLastPoint ()
 
void EnterEvadeMode (EvadeReason=EVADE_REASON_OTHER) override
 
void UpdateAI (uint32 diff) override
 
void MovementInform (uint32, uint32) override
 
void AddWaypoint (uint32 id, float x, float y, float z, uint32 waitTime=0)
 
bool SetNextWaypoint (uint32 pointId, float x, float y, float z, float orientation)
 
bool SetNextWaypoint (uint32 pointId, bool setPosition=true, bool resetWaypointsOnFail=true)
 
bool GetWaypointPosition (uint32 pointId, float &x, float &y, float &z)
 
void Start (bool isActiveAttacker=true, bool run=false, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=NULL, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=true)
 
void SetRun (bool on=true)
 
void SetEscortPaused (bool on)
 
bool HasEscortState (uint32 escortState)
 
virtual bool IsEscorted () const override
 
void SetMaxPlayerDistance (float newMax)
 
float GetMaxPlayerDistance () const
 
void SetDespawnAtEnd (bool despawn)
 
void SetDespawnAtFar (bool despawn)
 
bool GetAttack () const
 
void SetCanAttack (bool attack)
 
ObjectGuid GetEventStarterGUID () const
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void OnPossess (bool)
 
void EnterCombat (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoResetThreat ()
 
float DoGetThreat (Unit *unit)
 
void DoModifyThreatPercent (Unit *unit, int32 pct)
 
void DoTeleportTo (float x, float y, float z, uint32 time=0)
 
void DoTeleportTo (float const pos[4])
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo constSelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
 CreatureAI (Creature *creature)
 
virtual ~CreatureAI ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void AttackedBy (Unit *)
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary constGetBoundary () const
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual void InitializeAI ()
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectAggroTarget targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectAggroTarget targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, PREDICATE const &predicate, uint32 maxTargets, SelectAggroTarget targetType)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void SpellInterrupted (uint32, uint32)
 
void AttackStartCaster (Unit *victim, float dist)
 
void DoCast (uint32 spellId)
 
void DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
void DoCastVictim (uint32 spellId, bool triggered=false)
 
void DoCastAOE (uint32 spellId, bool triggered=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spellId)
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual bool sOnDummyEffect (Unit *, uint32, SpellEffIndex)
 
virtual void sOnGameEvent (bool, uint16)
 

Private Attributes

EventMap _events
 
GuidSet _aliveTrash
 
InstanceScript_instance
 
uint32 _currentWPid
 
uint32 _wipeCheckTimer
 
uint32 const _respawnTime
 
uint32 const _corpseDelay
 
bool _isEventActive
 
bool _isEventDone
 
bool _didUnderTenPercentText
 

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason { EVADE_REASON_NO_HOSTILES, EVADE_REASON_BOUNDARY, EVADE_REASON_SEQUENCE_BREAK, EVADE_REASON_OTHER }
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from npc_escortAI
PlayerGetPlayerForEscort ()
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
bool CheckBoundary (Position const *who=nullptr) const
 
void SetBoundary (CreatureBoundary const *boundary)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const_boundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Constructor & Destructor Documentation

npc_crok_scourgebane::npc_crok_scourgebaneAI::npc_crok_scourgebaneAI ( Creature creature)
inline
944  : npc_escortAI(creature),
945  _instance(creature->GetInstanceScript()), _respawnTime(creature->GetRespawnDelay()),
946  _corpseDelay(creature->GetCorpseDelay())
947  {
948  Initialize();
949  SetDespawnAtEnd(false);
950  SetDespawnAtFar(false);
951  _isEventActive = false;
953  _currentWPid = 0;
954  }
npc_escortAI(Creature *creature)
Definition: ScriptedEscortAI.cpp:37
void SetDespawnAtEnd(bool despawn)
Definition: ScriptedEscortAI.h:102
uint32 GetRespawnDelay() const
Definition: Creature.h:637
Definition: icecrown_citadel.h:84
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
uint32 _currentWPid
Definition: icecrown_citadel.cpp:1211
Definition: inflate.h:49
uint32 const _corpseDelay
Definition: icecrown_citadel.cpp:1214
uint32 GetCorpseDelay() const
Definition: Creature.h:493
uint32 const _respawnTime
Definition: icecrown_citadel.cpp:1213
void SetDespawnAtFar(bool despawn)
Definition: ScriptedEscortAI.h:103
InstanceScript * _instance
Definition: icecrown_citadel.cpp:1210
void Initialize()
Definition: icecrown_citadel.cpp:956
bool _isEventDone
Definition: icecrown_citadel.cpp:1216
bool _isEventActive
Definition: icecrown_citadel.cpp:1215
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227

+ Here is the call graph for this function:

Member Function Documentation

bool npc_crok_scourgebane::npc_crok_scourgebaneAI::CanAIAttack ( Unit const target) const
inlineoverridevirtual

Reimplemented from UnitAI.

1202  {
1203  // do not see targets inside Frostwing Halls when we are not there
1204  return (me->GetPositionY() > 2660.0f) == (target->GetPositionY() > 2660.0f);
1205  }
Creature *const me
Definition: CreatureAI.h:71
float GetPositionY() const
Definition: Position.h:105

+ Here is the call graph for this function:

void npc_crok_scourgebane::npc_crok_scourgebaneAI::DamageTaken ( Unit ,
uint32 damage 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1102  {
1103  // check wipe
1104  if (!_wipeCheckTimer)
1105  {
1106  _wipeCheckTimer = 1000;
1107  Player* player = NULL;
1110  me->VisitNearbyWorldObject(60.0f, searcher);
1111  // wipe
1112  if (!player)
1113  {
1114  damage *= 100;
1115  if (damage >= me->GetHealth())
1116  {
1117  FrostwingGauntletRespawner respawner;
1119  me->VisitNearbyGridObject(333.0f, worker);
1121  }
1122  return;
1123  }
1124  }
1125 
1126  if (HealthBelowPct(10))
1127  {
1129  {
1130  _didUnderTenPercentText = true;
1131  if (_isEventActive)
1133  else
1135  }
1136 
1137  damage = 0;
1140  }
1141  }
uint32 _wipeCheckTimer
Definition: icecrown_citadel.cpp:1212
Definition: icecrown_citadel.cpp:99
Definition: GridNotifiers.h:1188
bool HealthBelowPct(uint32 pct) const
Definition: ScriptedCreature.h:247
Definition: GridNotifiers.h:474
void VisitNearbyWorldObject(float const &radius, NOTIFIER &notifier) const
Definition: Object.h:589
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: icecrown_citadel.cpp:221
bool _didUnderTenPercentText
Definition: icecrown_citadel.cpp:1217
void VisitNearbyGridObject(float const &radius, NOTIFIER &notifier) const
Definition: Object.h:588
Definition: GridNotifiers.h:495
Creature *const me
Definition: CreatureAI.h:71
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: icecrown_citadel.cpp:321
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: icecrown_citadel.cpp:121
Definition: icecrown_citadel.cpp:100
EventMap _events
Definition: icecrown_citadel.cpp:1208
Definition: icecrown_citadel.cpp:98
T check(T value)
Definition: format.h:305
bool _isEventActive
Definition: icecrown_citadel.cpp:1215
uint32 GetHealth() const
Definition: Unit.h:1426

+ Here is the call graph for this function:

void npc_crok_scourgebane::npc_crok_scourgebaneAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

972  {
973  if (action == ACTION_START_GAUNTLET)
974  {
975  if (_isEventDone || !me->IsAlive())
976  return;
977 
978  _isEventActive = true;
979  _isEventDone = true;
980  // Load Grid with Sister Svalna
981  me->GetMap()->LoadGrid(4356.71f, 2484.33f);
983  svalna->AI()->DoAction(ACTION_START_GAUNTLET);
988  me->setActive(true);
989  for (uint32 i = 0; i < 4; ++i)
991  crusader->AI()->DoAction(ACTION_START_GAUNTLET);
992  }
993  else if (action == ACTION_RESET_EVENT)
994  {
995  _isEventActive = false;
997  me->setActive(false);
998  _aliveTrash.clear();
999  _currentWPid = 0;
1000  }
1001  }
Definition: icecrown_citadel.cpp:223
void LoadGrid(float x, float y)
Definition: Map.cpp:508
Map * GetMap() const
Definition: Object.h:543
Definition: icecrown_citadel.h:84
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
uint32 _currentWPid
Definition: icecrown_citadel.cpp:1211
Definition: inflate.h:49
Definition: icecrown_citadel.cpp:269
Definition: Creature.h:467
Definition: icecrown_citadel.cpp:222
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: icecrown_citadel.h:108
bool IsAlive() const
Definition: Unit.h:1692
uint32_t uint32
Definition: Define.h:150
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: icecrown_citadel.cpp:226
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
EventMap _events
Definition: icecrown_citadel.cpp:1208
GuidSet _aliveTrash
Definition: icecrown_citadel.cpp:1209
InstanceScript * _instance
Definition: icecrown_citadel.cpp:1210
bool _isEventDone
Definition: icecrown_citadel.cpp:1216
Definition: icecrown_citadel.cpp:272
bool _isEventActive
Definition: icecrown_citadel.cpp:1215
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
Definition: icecrown_citadel.cpp:83

+ Here is the call graph for this function:

void npc_crok_scourgebane::npc_crok_scourgebaneAI::Initialize ( void  )
inline
957  {
958  _didUnderTenPercentText = false;
959  _wipeCheckTimer = 1000;
960  }
uint32 _wipeCheckTimer
Definition: icecrown_citadel.cpp:1212
bool _didUnderTenPercentText
Definition: icecrown_citadel.cpp:1217

+ Here is the caller graph for this function:

void npc_crok_scourgebane::npc_crok_scourgebaneAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

963  {
964  _events.Reset();
968  Initialize();
969  }
void Reset()
Definition: EventMap.cpp:20
Definition: Unit.h:1130
Definition: icecrown_citadel.cpp:219
Creature *const me
Definition: CreatureAI.h:71
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: icecrown_citadel.cpp:220
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
EventMap _events
Definition: icecrown_citadel.cpp:1208
void Initialize()
Definition: icecrown_citadel.cpp:956
void SetReactState(ReactStates st)
Definition: Creature.h:502

+ Here is the call graph for this function:

void npc_crok_scourgebane::npc_crok_scourgebaneAI::SetGUID ( ObjectGuid  guid,
int32  type 
)
inlineoverridevirtual

Reimplemented from UnitAI.

1004  {
1005  if (type == ACTION_VRYKUL_DEATH)
1006  {
1007  _aliveTrash.erase(guid);
1008  if (_aliveTrash.empty())
1009  {
1010  SetEscortPaused(false);
1011  if (_currentWPid == 4 && _isEventActive)
1012  {
1013  _isEventActive = false;
1014  me->setActive(false);
1017  svalna->AI()->DoAction(ACTION_RESURRECT_CAPTAINS);
1018  }
1019  }
1020  }
1021  }
Definition: icecrown_citadel.h:487
Definition: icecrown_citadel.h:84
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
uint32 _currentWPid
Definition: icecrown_citadel.cpp:1211
Definition: Creature.h:467
Definition: icecrown_citadel.cpp:270
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: icecrown_citadel.cpp:89
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:507
GuidSet _aliveTrash
Definition: icecrown_citadel.cpp:1209
InstanceScript * _instance
Definition: icecrown_citadel.cpp:1210
bool _isEventActive
Definition: icecrown_citadel.cpp:1215

+ Here is the call graph for this function:

void npc_crok_scourgebane::npc_crok_scourgebaneAI::UpdateEscortAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from npc_escortAI.

1144  {
1145  if (_wipeCheckTimer <= diff)
1146  _wipeCheckTimer = 0;
1147  else
1148  _wipeCheckTimer -= diff;
1149 
1150  if (!UpdateVictim() && !_isEventActive)
1151  return;
1152 
1153  _events.Update(diff);
1154 
1156  return;
1157 
1158  while (uint32 eventId = _events.ExecuteEvent())
1159  {
1160  switch (eventId)
1161  {
1162  case EVENT_ARNATH_INTRO_2:
1164  arnath->AI()->Talk(SAY_ARNATH_INTRO_2);
1165  break;
1166  case EVENT_CROK_INTRO_3:
1168  break;
1169  case EVENT_START_PATHING:
1170  Start(true, true);
1171  break;
1172  case EVENT_SCOURGE_STRIKE:
1175  break;
1176  case EVENT_DEATH_STRIKE:
1177  if (HealthBelowPct(20))
1180  break;
1181  case EVENT_HEALTH_CHECK:
1182  if (HealthAbovePct(15))
1183  {
1185  _didUnderTenPercentText = false;
1186  }
1187  else
1188  {
1191  }
1192  break;
1193  default:
1194  break;
1195  }
1196  }
1197 
1199  }
Definition: icecrown_citadel.cpp:223
uint32 _wipeCheckTimer
Definition: icecrown_citadel.cpp:1212
bool UpdateVictim()
Definition: CreatureAI.cpp:233
Definition: Unit.h:565
bool HealthBelowPct(uint32 pct) const
Definition: ScriptedCreature.h:247
void Start(bool isActiveAttacker=true, bool run=false, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=NULL, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=true)
Definition: ScriptedEscortAI.cpp:438
Definition: icecrown_citadel.cpp:85
Definition: icecrown_citadel.cpp:122
bool HealthAbovePct(uint32 pct) const
Definition: ScriptedCreature.h:248
Definition: icecrown_citadel.cpp:219
Definition: Creature.h:467
Definition: icecrown_citadel.cpp:222
Definition: icecrown_citadel.cpp:221
bool _didUnderTenPercentText
Definition: icecrown_citadel.cpp:1217
Definition: icecrown_citadel.cpp:84
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: icecrown_citadel.h:108
Definition: icecrown_citadel.cpp:123
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
int32 DealHeal(Unit *victim, uint32 addhealth)
Definition: Unit.cpp:7885
Definition: icecrown_citadel.cpp:220
uint32_t uint32
Definition: Define.h:150
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: icecrown_citadel.cpp:226
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
void Update(uint32 time)
Definition: EventMap.h:54
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3586
Definition: icecrown_citadel.cpp:121
EventMap _events
Definition: icecrown_citadel.cpp:1208
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1395
InstanceScript * _instance
Definition: icecrown_citadel.cpp:1210
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
bool _isEventActive
Definition: icecrown_citadel.cpp:1215
uint32 CountPctFromMaxHealth(int32 pct) const
Definition: Unit.h:1435

+ Here is the call graph for this function:

void npc_crok_scourgebane::npc_crok_scourgebaneAI::WaypointReached ( uint32  waypointId)
inlineoverridevirtual

Implements npc_escortAI.

1024  {
1025  switch (waypointId)
1026  {
1027  // pause pathing until trash pack is cleared
1028  case 0:
1030  if (!_aliveTrash.empty())
1031  SetEscortPaused(true);
1032  break;
1033  case 1:
1035  if (!_aliveTrash.empty())
1036  SetEscortPaused(true);
1037  break;
1038  case 4:
1039  if (_aliveTrash.empty() && _isEventActive)
1040  {
1041  _isEventActive = false;
1042  me->setActive(false);
1045  svalna->AI()->DoAction(ACTION_RESURRECT_CAPTAINS);
1046  }
1047  break;
1048  default:
1049  break;
1050  }
1051  }
Definition: icecrown_citadel.h:84
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
Definition: icecrown_citadel.cpp:88
Definition: Creature.h:467
Definition: icecrown_citadel.cpp:270
Definition: icecrown_citadel.cpp:87
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: icecrown_citadel.cpp:89
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:507
GuidSet _aliveTrash
Definition: icecrown_citadel.cpp:1209
InstanceScript * _instance
Definition: icecrown_citadel.cpp:1210
bool _isEventActive
Definition: icecrown_citadel.cpp:1215

+ Here is the call graph for this function:

void npc_crok_scourgebane::npc_crok_scourgebaneAI::WaypointStart ( uint32  waypointId)
inlineoverridevirtual

Reimplemented from npc_escortAI.

1054  {
1055  _currentWPid = waypointId;
1056  switch (waypointId)
1057  {
1058  case 0:
1059  case 1:
1060  case 4:
1061  {
1062  // get spawns by home position
1063  float minY = 2600.0f;
1064  float maxY = 2650.0f;
1065  if (waypointId == 1)
1066  {
1067  minY -= 50.0f;
1068  maxY -= 50.0f;
1069  // at waypoints 1 and 2 she kills one captain
1071  svalna->AI()->DoAction(ACTION_KILL_CAPTAIN);
1072  }
1073  else if (waypointId == 4)
1074  {
1075  minY -= 100.0f;
1076  maxY -= 100.0f;
1077  }
1078 
1079  // get all nearby vrykul
1080  std::list<Creature*> temp;
1083  me->VisitNearbyGridObject(80.0f, searcher);
1084 
1085  _aliveTrash.clear();
1086  for (std::list<Creature*>::iterator itr = temp.begin(); itr != temp.end(); ++itr)
1087  if ((*itr)->GetHomePosition().GetPositionY() < maxY && (*itr)->GetHomePosition().GetPositionY() > minY)
1088  _aliveTrash.insert((*itr)->GetGUID());
1089  break;
1090  }
1091  // at waypoints 1 and 2 she kills one captain
1092  case 2:
1094  svalna->AI()->DoAction(ACTION_KILL_CAPTAIN);
1095  break;
1096  default:
1097  break;
1098  }
1099  }
Definition: icecrown_citadel.h:84
uint32 _currentWPid
Definition: icecrown_citadel.cpp:1211
Definition: Creature.h:467
void VisitNearbyGridObject(float const &radius, NOTIFIER &notifier) const
Definition: Object.h:588
Definition: icecrown_citadel.cpp:268
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: GridNotifiers.h:459
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
GuidSet _aliveTrash
Definition: icecrown_citadel.cpp:1209
Definition: icecrown_citadel.cpp:288
InstanceScript * _instance
Definition: icecrown_citadel.cpp:1210
T check(T value)
Definition: format.h:305

+ Here is the call graph for this function:

Member Data Documentation

GuidSet npc_crok_scourgebane::npc_crok_scourgebaneAI::_aliveTrash
private
uint32 const npc_crok_scourgebane::npc_crok_scourgebaneAI::_corpseDelay
private
uint32 npc_crok_scourgebane::npc_crok_scourgebaneAI::_currentWPid
private
bool npc_crok_scourgebane::npc_crok_scourgebaneAI::_didUnderTenPercentText
private
EventMap npc_crok_scourgebane::npc_crok_scourgebaneAI::_events
private
InstanceScript* npc_crok_scourgebane::npc_crok_scourgebaneAI::_instance
private
bool npc_crok_scourgebane::npc_crok_scourgebaneAI::_isEventActive
private
bool npc_crok_scourgebane::npc_crok_scourgebaneAI::_isEventDone
private
uint32 const npc_crok_scourgebane::npc_crok_scourgebaneAI::_respawnTime
private
uint32 npc_crok_scourgebane::npc_crok_scourgebaneAI::_wipeCheckTimer
private

The documentation for this struct was generated from the following file: