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

Public Member Functions

 npc_demolitionist_legosoAI (Creature *creature)
 
void Initialize ()
 
void sQuestAccept (Player *player, Quest const *quest) override
 
ObjectGuid GetGUID (int32 type) const override
 
void SetGUID (ObjectGuid guid, int32 type) override
 
void Reset () override
 
void UpdateAI (uint32 diff) override
 
void WaypointReached (uint32 waypointId) override
 
void DoAction (int32 param) 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
 
virtual void UpdateEscortAI (uint32 diff)
 
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)
 
virtual void WaypointStart (uint32)
 
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 DamageTaken (Unit *, uint32 &) override
 
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 bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
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 sQuestSelect (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual bool sOnDummyEffect (Unit *, uint32, SpellEffIndex)
 
virtual void sOnGameEvent (bool, uint16)
 

Private Attributes

int8 _phase
 
uint32 _moveTimer
 
ObjectGuid _eventStarterGuid
 
GuidList _explosivesGuids
 
EventMap _events
 

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_demolitionist_legoso::npc_demolitionist_legosoAI::npc_demolitionist_legosoAI ( Creature creature)
inline
355  : npc_escortAI(creature)
356  {
357  Initialize();
358  }
npc_escortAI(Creature *creature)
Definition: ScriptedEscortAI.cpp:37
void Initialize()
Definition: zone_bloodmyst_isle.cpp:360

+ Here is the call graph for this function:

Member Function Documentation

void npc_demolitionist_legoso::npc_demolitionist_legosoAI::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

782  {
783  switch (param)
784  {
788  break;
789  default:
790  break;
791  }
792  }
Definition: zone_bloodmyst_isle.cpp:204
Definition: zone_bloodmyst_isle.cpp:148
int8 _phase
Definition: zone_bloodmyst_isle.cpp:795
uint32 _moveTimer
Definition: zone_bloodmyst_isle.cpp:796
Definition: Common.h:103
ObjectGuid npc_demolitionist_legoso::npc_demolitionist_legosoAI::GetGUID ( int32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

376  {
377  if (type == DATA_EVENT_STARTER_GUID)
378  return _eventStarterGuid;
379 
380  return ObjectGuid::Empty;
381  }
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: zone_bloodmyst_isle.cpp:209
ObjectGuid _eventStarterGuid
Definition: zone_bloodmyst_isle.cpp:797
void npc_demolitionist_legoso::npc_demolitionist_legosoAI::Initialize ( void  )
inline
361  {
362  _phase = PHASE_NONE;
363  _moveTimer = 0;
364  }
Definition: zone_bloodmyst_isle.cpp:171
int8 _phase
Definition: zone_bloodmyst_isle.cpp:795
uint32 _moveTimer
Definition: zone_bloodmyst_isle.cpp:796

+ Here is the caller graph for this function:

void npc_demolitionist_legoso::npc_demolitionist_legosoAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

396  {
397  me->SetCanDualWield(true);
398  Initialize();
399  _events.Reset();
404  }
void SetCanDualWield(bool value) override
Definition: Creature.cpp:1423
void Reset()
Definition: EventMap.cpp:20
Definition: zone_bloodmyst_isle.cpp:155
Definition: zone_bloodmyst_isle.cpp:156
EventMap _events
Definition: zone_bloodmyst_isle.cpp:799
Creature *const me
Definition: CreatureAI.h:71
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: zone_bloodmyst_isle.cpp:157
Definition: Common.h:103
void Initialize()
Definition: zone_bloodmyst_isle.cpp:360
Definition: zone_bloodmyst_isle.cpp:154

+ Here is the call graph for this function:

void npc_demolitionist_legoso::npc_demolitionist_legosoAI::SetGUID ( ObjectGuid  guid,
int32  type 
)
inlineoverridevirtual

Reimplemented from UnitAI.

384  {
385  switch (type)
386  {
388  _eventStarterGuid = guid;
389  break;
390  default:
391  break;
392  }
393  }
Definition: zone_bloodmyst_isle.cpp:209
ObjectGuid _eventStarterGuid
Definition: zone_bloodmyst_isle.cpp:797

+ Here is the caller graph for this function:

void npc_demolitionist_legoso::npc_demolitionist_legosoAI::sQuestAccept ( Player player,
Quest const quest 
)
inlineoverridevirtual

Reimplemented from UnitAI.

367  {
368  if (quest->GetQuestId() == QUEST_ENDING_THEIR_WORLD)
369  {
370  SetGUID(player->GetGUID(), DATA_EVENT_STARTER_GUID);
371  Start(true, true, player->GetGUID(), quest);
372  }
373  }
Definition: zone_bloodmyst_isle.cpp:213
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: zone_bloodmyst_isle.cpp:209
void SetGUID(ObjectGuid guid, int32 type) override
Definition: zone_bloodmyst_isle.cpp:383

+ Here is the call graph for this function:

void npc_demolitionist_legoso::npc_demolitionist_legosoAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from npc_escortAI.

407  {
408  _events.Update(diff);
409 
410  if (UpdateVictim())
411  {
412  while (uint32 eventId = _events.ExecuteEvent())
413  {
414  switch (eventId)
415  {
416  case EVENT_FROST_SHOCK:
420  break;
421  case EVENT_SEARING_TOTEM:
425  break;
430  break;
431  case EVENT_HEALING_SURGE:
432  {
433  Unit* target = NULL;
434  if (me->GetHealthPct() < 85)
435  target = me;
436  else if (Player* player = GetPlayerForEscort())
437  if (player->GetHealthPct() < 85)
438  target = player;
439  if (target)
440  {
441  DoCast(target, SPELL_HEALING_SURGE);
443  }
444  else
446  break;
447  }
448  default:
449  break;
450  }
451  }
452 
454  }
455 
457  return;
458 
460 
461  if (_phase)
462  {
463  if (_moveTimer <= diff)
464  {
465  switch (_phase)
466  {
467  case PHASE_WP_26: //debug skip path to point 26, buggy path calculation
468  me->GetMotionMaster()->MovePoint(WP_DEBUG_2, -2021.77f, -10648.8f, 129.903f, false);
471  break;
472  case PHASE_CONTINUE: // continue escort
473  SetEscortPaused(false);
475  _phase = PHASE_NONE;
476  break;
477  case PHASE_WP_22: //debug skip path to point 22, buggy path calculation
478  me->GetMotionMaster()->MovePoint(WP_EXPLOSIVES_FIRST_PLANT, -1958.026f, -10660.465f, 111.547f, false);
482  break;
483  case PHASE_PLANT_FIRST_KNEEL: // plant first explosives stage 1 kneel
487  break;
488  case PHASE_PLANT_FIRST_STAND: // plant first explosives stage 1 stand
492  break;
493  case PHASE_PLANT_FIRST_WORK: // plant first explosives stage 2 work
495  _moveTimer = 17.5 * IN_MILLISECONDS;
497  break;
498  case PHASE_PLANT_FIRST_FINISH: // plant first explosives finish
499  _explosivesGuids.clear();
500  for (uint8 i = 0; i != MAX_EXPLOSIVES; ++i)
501  {
502  if (GameObject* explosive = me->SummonGameObject(GO_DRAENEI_EXPLOSIVES_1, ExplosivesPos[0][i].m_positionX, ExplosivesPos[0][i].m_positionY, ExplosivesPos[0][i].m_positionZ, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0))
503  _explosivesGuids.push_back(explosive->GetGUID());
504  }
505  me->HandleEmoteCommand(EMOTE_ONESHOT_NONE); // reset anim state
506  // force runoff movement so he will not screw up next waypoint
507  me->GetMotionMaster()->MovePoint(WP_EXPLOSIVES_FIRST_RUNOFF, -1955.6f, -10669.8f, 110.65f, false);
509  _moveTimer = 1.5 * IN_MILLISECONDS;
511  break;
512  case PHASE_PLANT_FIRST_TIMER_1: // first explosives detonate timer 1
516  break;
517  case PHASE_PLANT_FIRST_TIMER_2: // first explosives detonate timer 2
521  break;
522  case PHASE_PLANT_FIRST_TIMER_3: // first explosives detonate timer 3
526  break;
527  case PHASE_PLANT_FIRST_DETONATE: // first explosives detonate finish
528  for (GuidList::iterator itr = _explosivesGuids.begin(); itr != _explosivesGuids.end(); ++itr)
529  {
530  if (GameObject* explosive = ObjectAccessor::GetGameObject(*me, *itr))
531  me->RemoveGameObject(explosive, true);
532  }
533  _explosivesGuids.clear();
537  break;
538  case PHASE_PLANT_FIRST_SPEECH: // after detonation 1 speech
542  break;
543  case PHASE_PLANT_FIRST_ROTATE: // after detonation 1 rotate to next point
544  me->SetFacingTo(2.272f);
547  break;
548  case PHASE_PLANT_FIRST_POINT: // after detonation 1 send point anim and go on to next point
552  break;
553  case PHASE_FEEL_SIRONAS_1: // legoso exclamation before sironas 1.1
557  break;
558  case PHASE_FEEL_SIRONAS_2: // legoso exclamation before sironas 1.2
562  break;
563  case PHASE_MEET_SIRONAS_ROAR: // legoso exclamation before sironas 2.1
567  break;
568  case PHASE_MEET_SIRONAS_TURN: // legoso exclamation before sironas 2.2
569  if (Player* player = GetPlayerForEscort())
570  me->SetFacingToObject(player);
573  break;
574  case PHASE_MEET_SIRONAS_SPEECH: // legoso exclamation before sironas 2.3
578  break;
579  case PHASE_PLANT_SECOND_KNEEL: // plant second explosives stage 1 kneel
583  break;
584  case PHASE_PLANT_SECOND_SPEECH: // plant second explosives stage 2 kneel
588  break;
589  case PHASE_PLANT_SECOND_STAND: // plant second explosives finish
593  break;
594  case PHASE_PLANT_SECOND_FINISH: // plant second explosives finish - create explosives
595  _explosivesGuids.clear();
596  for (uint8 i = 0; i != MAX_EXPLOSIVES; ++i)
597  {
598  if (GameObject* explosive = me->SummonGameObject(GO_DRAENEI_EXPLOSIVES_2, ExplosivesPos[1][i].m_positionX, ExplosivesPos[1][i].m_positionY, ExplosivesPos[1][i].m_positionZ, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0))
599  _explosivesGuids.push_back(explosive->GetGUID());
600  }
604  break;
605  case PHASE_PLANT_SECOND_WAIT: // plant second explosives finish - proceed to next point
608  break;
609  case PHASE_PLANT_SECOND_TIMER_1: // second explosives detonate timer 1
613  break;
614  case PHASE_PLANT_SECOND_TIMER_2: // second explosives detonate timer 2
618  break;
619  case PHASE_PLANT_SECOND_TIMER_3: // second explosives detonate timer 3
623  break;
624  case PHASE_PLANT_SECOND_DETONATE: // second explosives detonate finish
625  for (GuidList::iterator itr = _explosivesGuids.begin(); itr != _explosivesGuids.end(); ++itr)
626  {
627  if (GameObject* explosive = ObjectAccessor::GetGameObject(*me, *itr))
628  me->RemoveGameObject(explosive, true);
629  }
630  _explosivesGuids.clear();
632  {
634  me->SetFacingToObject(sironas);
635  }
638  break;
639  case PHASE_FIGHT_SIRONAS_STOP: // sironas channel stop
641  sironas->AI()->DoAction(ACTION_SIRONAS_CHANNEL_STOP);
644  break;
645  case PHASE_FIGHT_SIRONAS_SPEECH_1: // sironas exclamation before aggro
647  sironas->AI()->Talk(SAY_SIRONAS_1);
650  break;
651  case PHASE_FIGHT_SIRONAS_SPEECH_2: // legoso exclamation before aggro
653  sironas->SetObjectScale(3.0f);
657  break;
658  case PHASE_FIGHT_SIRONAS_START: // legoso exclamation at aggro
660  {
661  Unit* target = GetPlayerForEscort();
662  if (!target)
663  target = me;
664 
665  target->AddThreat(sironas, 0.001f);
666  sironas->Attack(target, true);
667  sironas->GetMotionMaster()->MoveChase(target);
668  }
671  break;
672  case PHASE_SIRONAS_SLAIN_SPEECH_1: // legoso exclamation after battle - stage 1.1
676  break;
677  case PHASE_SIRONAS_SLAIN_EMOTE_1: // legoso exclamation after battle - stage 1.2
681  break;
682  case PHASE_SIRONAS_SLAIN_EMOTE_2: // legoso exclamation after battle - stage 1.3
683  if (Player* player = GetPlayerForEscort())
684  player->GroupEventHappens(QUEST_ENDING_THEIR_WORLD, me);
688  break;
689  case PHASE_SIRONAS_SLAIN_SPEECH_2: // legoso exclamation after battle - stage 2
693  break;
694  default:
695  break;
696  }
697  }
698  else if (!me->IsInCombat())
699  _moveTimer -= diff;
700  }
701  }
Definition: zone_bloodmyst_isle.cpp:204
Definition: zone_bloodmyst_isle.cpp:133
Definition: zone_bloodmyst_isle.cpp:211
Definition: zone_bloodmyst_isle.cpp:203
Definition: Unit.h:207
Definition: zone_bloodmyst_isle.cpp:146
GameObject * SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime)
Definition: Object.cpp:2372
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=NULL)
Definition: Unit.cpp:10691
Definition: SharedDefines.h:2417
Definition: Unit.h:215
Definition: zone_bloodmyst_isle.cpp:142
#define SIZE_OF_GRIDS
Definition: GridDefines.h:39
Definition: zone_bloodmyst_isle.cpp:185
Definition: zone_bloodmyst_isle.cpp:106
Definition: zone_bloodmyst_isle.cpp:178
bool UpdateVictim()
Definition: CreatureAI.cpp:233
Definition: zone_bloodmyst_isle.cpp:132
Definition: zone_bloodmyst_isle.cpp:105
Definition: zone_bloodmyst_isle.cpp:195
float m_positionY
Definition: Position.h:53
Definition: zone_bloodmyst_isle.cpp:213
Definition: zone_bloodmyst_isle.cpp:199
Definition: zone_bloodmyst_isle.cpp:177
Player * GetPlayerForEscort()
Definition: ScriptedEscortAI.h:109
Definition: SharedDefines.h:2435
Definition: zone_bloodmyst_isle.cpp:108
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
bool IsInCombat() const
Definition: Unit.h:1584
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: zone_bloodmyst_isle.cpp:123
Definition: zone_bloodmyst_isle.cpp:155
Definition: zone_bloodmyst_isle.cpp:181
Definition: zone_bloodmyst_isle.cpp:184
float m_positionX
Definition: Position.h:52
Definition: Creature.h:467
Definition: zone_bloodmyst_isle.cpp:114
Definition: zone_bloodmyst_isle.cpp:201
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2443
Definition: zone_bloodmyst_isle.cpp:190
GuidList _explosivesGuids
Definition: zone_bloodmyst_isle.cpp:798
Definition: SharedDefines.h:2416
Definition: zone_bloodmyst_isle.cpp:116
Definition: Unit.h:681
Definition: zone_bloodmyst_isle.cpp:162
Definition: zone_bloodmyst_isle.cpp:171
Definition: zone_bloodmyst_isle.cpp:198
Definition: zone_bloodmyst_isle.cpp:156
EventMap _events
Definition: zone_bloodmyst_isle.cpp:799
Creature *const me
Definition: CreatureAI.h:71
Definition: zone_bloodmyst_isle.cpp:180
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
void SetFacingToObject(WorldObject const *object)
Definition: Unit.cpp:15787
Definition: zone_bloodmyst_isle.cpp:202
Position const ExplosivesPos[2][MAX_EXPLOSIVES]
Definition: zone_bloodmyst_isle.cpp:216
Definition: ScriptedEscortAI.h:46
Definition: zone_bloodmyst_isle.cpp:192
Definition: zone_bloodmyst_isle.cpp:135
Definition: zone_bloodmyst_isle.cpp:115
Definition: zone_bloodmyst_isle.cpp:161
void UpdateAI(uint32 diff) override
Definition: ScriptedEscortAI.cpp:227
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: zone_bloodmyst_isle.cpp:101
int8 _phase
Definition: zone_bloodmyst_isle.cpp:795
uint32_t uint32
Definition: Define.h:150
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: GameObject.h:880
void SetFacingTo(float ori)
Definition: Unit.cpp:15777
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
float m_positionZ
Definition: Position.h:54
Definition: zone_bloodmyst_isle.cpp:205
Definition: zone_bloodmyst_isle.cpp:194
Definition: zone_bloodmyst_isle.cpp:107
Definition: zone_bloodmyst_isle.cpp:175
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: zone_bloodmyst_isle.cpp:157
Definition: zone_bloodmyst_isle.cpp:121
void Update(uint32 time)
Definition: EventMap.h:54
uint32 _moveTimer
Definition: zone_bloodmyst_isle.cpp:796
Definition: zone_bloodmyst_isle.cpp:134
Definition: zone_bloodmyst_isle.cpp:207
Definition: zone_bloodmyst_isle.cpp:109
Definition: zone_bloodmyst_isle.cpp:183
Definition: zone_bloodmyst_isle.cpp:196
Definition: Unit.h:682
Definition: zone_bloodmyst_isle.cpp:112
Definition: zone_bloodmyst_isle.cpp:188
void RemoveGameObject(GameObject *gameObj, bool del)
Definition: Unit.cpp:4765
Definition: zone_bloodmyst_isle.cpp:119
Definition: zone_bloodmyst_isle.cpp:197
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:507
Definition: zone_bloodmyst_isle.cpp:191
Definition: zone_bloodmyst_isle.cpp:113
Definition: UpdateFields.h:109
Definition: zone_bloodmyst_isle.cpp:173
Definition: Common.h:103
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
Definition: zone_bloodmyst_isle.cpp:189
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:143
Definition: zone_bloodmyst_isle.cpp:110
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
Definition: zone_bloodmyst_isle.cpp:193
Definition: zone_bloodmyst_isle.cpp:165
Definition: zone_bloodmyst_isle.cpp:172
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
Definition: Unit.cpp:12772
uint8_t uint8
Definition: Define.h:152
Definition: zone_bloodmyst_isle.cpp:176
Definition: zone_bloodmyst_isle.cpp:117
Definition: zone_bloodmyst_isle.cpp:186
void HandleEmoteCommand(uint32 anim_id)
Definition: Unit.cpp:1444
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
Definition: zone_bloodmyst_isle.cpp:122
Definition: zone_bloodmyst_isle.cpp:182
Definition: zone_bloodmyst_isle.cpp:141
Definition: zone_bloodmyst_isle.cpp:174
Definition: zone_bloodmyst_isle.cpp:187
Definition: Unit.h:1305
Definition: zone_bloodmyst_isle.cpp:118
Definition: SharedDefines.h:2412
bool HasEscortState(uint32 escortState)
Definition: ScriptedEscortAI.h:96
Definition: zone_bloodmyst_isle.cpp:179
Definition: zone_bloodmyst_isle.cpp:206
void DelayEvents(Milliseconds const &delay)
Definition: EventMap.h:219
Definition: zone_bloodmyst_isle.cpp:120
float GetHealthPct() const
Definition: Unit.h:1434
Definition: zone_bloodmyst_isle.cpp:154
Definition: zone_bloodmyst_isle.cpp:200
Definition: zone_bloodmyst_isle.cpp:137
Definition: zone_bloodmyst_isle.cpp:111

+ Here is the call graph for this function:

void npc_demolitionist_legoso::npc_demolitionist_legosoAI::WaypointReached ( uint32  waypointId)
inlineoverridevirtual

Implements npc_escortAI.

704  {
705  Player* player = GetPlayerForEscort();
706  if (!player)
707  return;
708 
709  switch (waypointId)
710  {
711  case WP_START:
712  SetEscortPaused(true);
713  me->SetFacingToObject(player);
715  _moveTimer = 2.5 * IN_MILLISECONDS;
717  break;
719  SetEscortPaused(true);
723  break;
725  me->SetFacingTo(1.46f);
726  break;
728  SetEscortPaused(true);
729  me->SetFacingTo(1.05f);
732  break;
733  case WP_DEBUG_1:
734  SetEscortPaused(true);
735  _moveTimer = 0.5 * IN_MILLISECONDS;
737  break;
738  case WP_SIRONAS_HILL:
739  {
740  SetEscortPaused(true);
741 
742  //Find Sironas and make it respawn if needed
743  Creature* sironas = NULL;
746  me->VisitNearbyObject(SIZE_OF_GRIDS, searcher);
747 
748  if (sironas)
749  {
750  if (!sironas->IsAlive())
751  sironas->Respawn(true);
752 
754  me->SetFacingToObject(sironas);
755  }
758  break;
759  }
761  SetEscortPaused(true);
762  _moveTimer = 0.2 * IN_MILLISECONDS;
764  break;
766  SetEscortPaused(true);
767  _moveTimer = 0.5 * IN_MILLISECONDS;
769  break;
771  SetEscortPaused(true);
772  me->SetFacingTo(5.7f);
775  break;
776  default:
777  break;
778  }
779  }
#define SIZE_OF_GRIDS
Definition: GridDefines.h:39
Definition: zone_bloodmyst_isle.cpp:167
Player * GetPlayerForEscort()
Definition: ScriptedEscortAI.h:109
Definition: zone_bloodmyst_isle.cpp:168
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: Creature.h:467
Definition: zone_bloodmyst_isle.cpp:159
Definition: zone_bloodmyst_isle.cpp:166
void VisitNearbyObject(float const &radius, NOTIFIER &notifier) const
Definition: Object.h:587
Definition: zone_bloodmyst_isle.cpp:169
Creature *const me
Definition: CreatureAI.h:71
Definition: zone_bloodmyst_isle.cpp:160
void SetFacingToObject(WorldObject const *object)
Definition: Unit.cpp:15787
Definition: zone_bloodmyst_isle.cpp:103
bool IsAlive() const
Definition: Unit.h:1692
Definition: zone_bloodmyst_isle.cpp:161
CreatureAI * AI() const
Definition: Creature.h:525
int8 _phase
Definition: zone_bloodmyst_isle.cpp:795
virtual void DoAction(int32)
Definition: UnitAI.h:138
void SetFacingTo(float ori)
Definition: Unit.cpp:15777
Definition: zone_bloodmyst_isle.cpp:145
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: zone_bloodmyst_isle.cpp:104
Definition: GridNotifiers.h:1265
Definition: zone_bloodmyst_isle.cpp:163
uint32 _moveTimer
Definition: zone_bloodmyst_isle.cpp:796
Definition: GridNotifiers.h:428
Definition: zone_bloodmyst_isle.cpp:196
void Respawn(bool force=false)
Definition: Creature.cpp:1697
Definition: zone_bloodmyst_isle.cpp:188
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:507
Definition: zone_bloodmyst_isle.cpp:191
Definition: zone_bloodmyst_isle.cpp:173
Definition: zone_bloodmyst_isle.cpp:164
Definition: Common.h:103
Definition: zone_bloodmyst_isle.cpp:172
Definition: zone_bloodmyst_isle.cpp:186
T check(T value)
Definition: format.h:305
Definition: zone_bloodmyst_isle.cpp:174
Definition: zone_bloodmyst_isle.cpp:179
Definition: zone_bloodmyst_isle.cpp:137

+ Here is the call graph for this function:

Member Data Documentation

EventMap npc_demolitionist_legoso::npc_demolitionist_legosoAI::_events
private
ObjectGuid npc_demolitionist_legoso::npc_demolitionist_legosoAI::_eventStarterGuid
private
GuidList npc_demolitionist_legoso::npc_demolitionist_legosoAI::_explosivesGuids
private
uint32 npc_demolitionist_legoso::npc_demolitionist_legosoAI::_moveTimer
private
int8 npc_demolitionist_legoso::npc_demolitionist_legosoAI::_phase
private

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