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

Public Member Functions

 npc_brann_hosAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void DespawnDwarf ()
 
void WaypointReached (uint32 waypointId) override
 
void SpawnDwarf (uint32 uiType)
 
void JustSummoned (Creature *summoned) override
 
void JumpToNextStep (uint32 uiTimer)
 
void StartWP ()
 
void DamageTaken (Unit *, uint32 &) override
 
uint32 GetData (uint32 type) const override
 
void UpdateEscortAI (uint32 uiDiff) 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)
 
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 KilledUnit (Unit *) 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 void DoAction (int32)
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
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)
 

Public Attributes

uint32 uiStep
 
uint32 uiPhaseTimer
 
ObjectGuid uiControllerGUID
 
GuidList lDwarfGUIDList
 
InstanceScriptinstance
 
bool bIsBattle
 
bool bIsLowHP
 
bool brannSparklinNews
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 

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 ()
 
- 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_brann_hos::npc_brann_hosAI::npc_brann_hosAI ( Creature creature)
inline
297  : npc_escortAI(creature)
298  {
299  Initialize();
300  instance = creature->GetInstanceScript();
301  }
npc_escortAI(Creature *creature)
Definition: ScriptedEscortAI.cpp:37
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
void Initialize()
Definition: halls_of_stone.cpp:303
InstanceScript * instance
Definition: halls_of_stone.cpp:319

+ Here is the call graph for this function:

Member Function Documentation

void npc_brann_hos::npc_brann_hosAI::DamageTaken ( Unit ,
uint32  
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

427  {
429  brannSparklinNews = false;
430  }
Definition: InstanceScript.h:59
Definition: halls_of_stone.h:31
bool brannSparklinNews
Definition: halls_of_stone.cpp:323
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
InstanceScript * instance
Definition: halls_of_stone.cpp:319

+ Here is the call graph for this function:

void npc_brann_hos::npc_brann_hosAI::DespawnDwarf ( )
inline
338  {
339  if (lDwarfGUIDList.empty())
340  return;
341  for (GuidList::const_iterator itr = lDwarfGUIDList.begin(); itr != lDwarfGUIDList.end(); ++itr)
342  {
344  if (temp && temp->IsAlive())
345  temp->DespawnOrUnsummon();
346  }
347  lDwarfGUIDList.clear();
348  }
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
Definition: Creature.cpp:1774
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: Creature.h:467
Creature *const me
Definition: CreatureAI.h:71
GuidList lDwarfGUIDList
Definition: halls_of_stone.cpp:317
bool IsAlive() const
Definition: Unit.h:1692
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
InstanceScript * instance
Definition: halls_of_stone.cpp:319

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32 npc_brann_hos::npc_brann_hosAI::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

433  {
434  if (type == DATA_BRANN_SPARKLIN_NEWS)
435  return brannSparklinNews ? 1 : 0;
436 
437  return 0;
438  }
Definition: halls_of_stone.cpp:119
bool brannSparklinNews
Definition: halls_of_stone.cpp:323
void npc_brann_hos::npc_brann_hosAI::Initialize ( void  )
inline
304  {
305  bIsLowHP = false;
306  bIsBattle = false;
307  uiStep = 0;
308  uiPhaseTimer = 0;
310  brannSparklinNews = true;
311  }
uint32 uiStep
Definition: halls_of_stone.cpp:313
void Clear()
Definition: ObjectGuid.h:215
uint32 uiPhaseTimer
Definition: halls_of_stone.cpp:314
bool brannSparklinNews
Definition: halls_of_stone.cpp:323
bool bIsBattle
Definition: halls_of_stone.cpp:321
ObjectGuid uiControllerGUID
Definition: halls_of_stone.cpp:316
bool bIsLowHP
Definition: halls_of_stone.cpp:322

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void npc_brann_hos::npc_brann_hosAI::JumpToNextStep ( uint32  uiTimer)
inline
413  {
414  uiPhaseTimer = uiTimer;
415  ++uiStep;
416  }
uint32 uiStep
Definition: halls_of_stone.cpp:313
uint32 uiPhaseTimer
Definition: halls_of_stone.cpp:314

+ Here is the caller graph for this function:

void npc_brann_hos::npc_brann_hosAI::JustSummoned ( Creature summoned)
inlineoverridevirtual

Reimplemented from ScriptedAI.

406  {
407  lDwarfGUIDList.push_back(summoned->GetGUID());
408  summoned->AddThreat(me, 0.0f);
409  summoned->AI()->AttackStart(me);
410  }
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=NULL)
Definition: Unit.cpp:10691
Creature *const me
Definition: CreatureAI.h:71
GuidList lDwarfGUIDList
Definition: halls_of_stone.cpp:317
CreatureAI * AI() const
Definition: Creature.h:525
ObjectGuid const & GetGUID() const
Definition: Object.h:105
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29

+ Here is the call graph for this function:

void npc_brann_hos::npc_brann_hosAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

326  {
328  {
329  Initialize();
330 
331  DespawnDwarf();
332 
334  }
335  }
Definition: ScriptedEscortAI.h:47
void Initialize()
Definition: halls_of_stone.cpp:303
Definition: InstanceScript.h:58
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: halls_of_stone.h:31
void DespawnDwarf()
Definition: halls_of_stone.cpp:337
bool HasEscortState(uint32 escortState)
Definition: ScriptedEscortAI.h:96
InstanceScript * instance
Definition: halls_of_stone.cpp:319

+ Here is the call graph for this function:

void npc_brann_hos::npc_brann_hosAI::SpawnDwarf ( uint32  uiType)
inline
384  {
385  switch (uiType)
386  {
387  case 1:
388  {
389  uint32 uiSpawnNumber = DUNGEON_MODE(2, 3);
390  for (uint8 i = 0; i < uiSpawnNumber; ++i)
393  break;
394  }
395  case 2:
396  for (uint8 i = 0; i < 2; ++i)
398  break;
399  case 3:
401  break;
402  }
403  }
Definition: halls_of_stone.cpp:94
Creature *const me
Definition: CreatureAI.h:71
uint32_t uint32
Definition: Define.h:150
Definition: halls_of_stone.cpp:95
static Position SpawnLocations[]
Definition: halls_of_stone.cpp:126
const T & DUNGEON_MODE(const T &normal5, const T &heroic10) const
Definition: ScriptedCreature.h:277
Definition: Object.h:59
uint8_t uint8
Definition: Define.h:152
Definition: halls_of_stone.cpp:96
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void npc_brann_hos::npc_brann_hosAI::StartWP ( )
inline
419  {
421  SetEscortPaused(false);
422  uiStep = 1;
423  Start();
424  }
Definition: Unit.h:735
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
uint32 uiStep
Definition: halls_of_stone.cpp:313
Creature *const me
Definition: CreatureAI.h:71
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:507
Definition: UpdateFields.h:135

+ Here is the call graph for this function:

void npc_brann_hos::npc_brann_hosAI::UpdateEscortAI ( uint32  uiDiff)
inlineoverridevirtual

Reimplemented from npc_escortAI.

441  {
442  if (uiPhaseTimer <= uiDiff)
443  {
444  switch (uiStep)
445  {
446  case 1:
448  return;
449  bIsBattle = false;
451  SetRun(true);
452  JumpToNextStep(0);
453  break;
454  case 3:
455  SetEscortPaused(false);
456  JumpToNextStep(0);
457  break;
458  case 5:
460  temp->AI()->Talk(SAY_EVENT_INTRO_3_ABED);
461  JumpToNextStep(8500);
462  break;
463  case 6:
465  JumpToNextStep(6500);
466  break;
467  case 7:
469  temp->AI()->Talk(SAY_EVENT_A_2_KADD);
470  JumpToNextStep(12500);
471  break;
472  case 8:
476  ENSURE_AI(npc_tribuna_controller::npc_tribuna_controllerAI, temp->AI())->bKaddrakActivated = true;
477  JumpToNextStep(5000);
478  break;
479  case 9:
481  SpawnDwarf(1);
482  JumpToNextStep(20000);
483  break;
484  case 10:
486  JumpToNextStep(6000);
487  break;
488  case 11:
490  temp->AI()->Talk(SAY_EVENT_B_2_MARN);
491  SpawnDwarf(1);
492  JumpToNextStep(20000);
493  break;
494  case 12:
498  ENSURE_AI(npc_tribuna_controller::npc_tribuna_controllerAI, temp->AI())->bMarnakActivated = true;
499  JumpToNextStep(10000);
500  break;
501  case 13:
502  SpawnDwarf(1);
503  JumpToNextStep(10000);
504  break;
505  case 14:
506  SpawnDwarf(2);
507  JumpToNextStep(20000);
508  break;
509  case 15:
511  SpawnDwarf(1);
512  JumpToNextStep(10000);
513  break;
514  case 16:
515  SpawnDwarf(2);
516  JumpToNextStep(20000);
517  break;
518  case 17:
520  temp->AI()->Talk(SAY_EVENT_C_2_ABED);
521  SpawnDwarf(1);
522  JumpToNextStep(20000);
523  break;
524  case 18:
528  ENSURE_AI(npc_tribuna_controller::npc_tribuna_controllerAI, temp->AI())->bAbedneumActivated = true;
529  JumpToNextStep(5000);
530  break;
531  case 19:
532  SpawnDwarf(2);
533  JumpToNextStep(10000);
534  break;
535  case 20:
536  SpawnDwarf(1);
537  JumpToNextStep(15000);
538  break;
539  case 21:
541  SpawnDwarf(3);
542  JumpToNextStep(20000);
543  break;
544  case 22:
546  temp->AI()->Talk(SAY_EVENT_D_2_ABED);
547  SpawnDwarf(1);
548  JumpToNextStep(5000);
549  break;
550  case 23:
551  SpawnDwarf(2);
552  JumpToNextStep(15000);
553  break;
554  case 24:
556  SpawnDwarf(3);
557  JumpToNextStep(5000);
558  break;
559  case 25:
560  SpawnDwarf(1);
561  JumpToNextStep(5000);
562  break;
563  case 26:
564  SpawnDwarf(2);
565  JumpToNextStep(10000);
566  break;
567  case 27:
569  temp->AI()->Talk(SAY_EVENT_D_4_ABED);
570  SpawnDwarf(1);
571  JumpToNextStep(10000);
572  break;
573  case 28:
579  temp->DealDamage(temp, temp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
580  bIsBattle = true;
581  SetEscortPaused(false);
582  JumpToNextStep(6500);
583  break;
584  case 29:
588  JumpToNextStep(5500);
589  break;
590  case 30:
592  temp->AI()->Talk(SAY_EVENT_END_03_ABED);
593  JumpToNextStep(8500);
594  break;
595  case 31:
597  JumpToNextStep(11500);
598  break;
599  case 32:
601  temp->AI()->Talk(SAY_EVENT_END_05_ABED);
602  JumpToNextStep(11500);
603  break;
604  case 33:
606  JumpToNextStep(4500);
607  break;
608  case 34:
610  temp->AI()->Talk(SAY_EVENT_END_07_ABED);
611  JumpToNextStep(22500);
612  break;
613  case 35:
615  JumpToNextStep(7500);
616  break;
617  case 36:
619  temp->AI()->Talk(SAY_EVENT_END_09_KADD);
620  JumpToNextStep(18500);
621  break;
622  case 37:
624  JumpToNextStep(5500);
625  break;
626  case 38:
628  temp->AI()->Talk(SAY_EVENT_END_11_KADD);
629  JumpToNextStep(20500);
630  break;
631  case 39:
633  JumpToNextStep(2500);
634  break;
635  case 40:
637  temp->AI()->Talk(SAY_EVENT_END_13_KADD);
638  JumpToNextStep(19500);
639  break;
640  case 41:
642  JumpToNextStep(10500);
643  break;
644  case 42:
646  temp->AI()->Talk(SAY_EVENT_END_15_MARN);
647  JumpToNextStep(6500);
648  break;
649  case 43:
651  JumpToNextStep(6500);
652  break;
653  case 44:
655  temp->AI()->Talk(SAY_EVENT_END_17_MARN);
656  JumpToNextStep(25500);
657  break;
658  case 45:
660  JumpToNextStep(23500);
661  break;
662  case 46:
664  temp->AI()->Talk(SAY_EVENT_END_19_MARN);
665  JumpToNextStep(3500);
666  break;
667  case 47:
669  JumpToNextStep(8500);
670  break;
671  case 48:
673  temp->AI()->Talk(SAY_EVENT_END_21_ABED);
674  JumpToNextStep(5500);
675  break;
676  case 49:
677  {
682  Player* player = GetPlayerForEscort();
683  if (player)
684  player->GroupEventHappens(QUEST_HALLS_OF_STONE, me);
686  JumpToNextStep(180000);
687  break;
688  }
689  case 50:
690  SetEscortPaused(false);
691  break;
692  }
693  } else uiPhaseTimer -= uiDiff;
694 
695  if (!bIsLowHP && HealthBelowPct(30))
696  {
698  bIsLowHP = true;
699  }
700  else if (bIsLowHP && !HealthBelowPct(30))
701  bIsLowHP = false;
702 
703  if (!UpdateVictim())
704  return;
705 
707  }
Definition: Unit.h:207
void SpawnDwarf(uint32 uiType)
Definition: halls_of_stone.cpp:383
Definition: halls_of_stone.cpp:28
Definition: halls_of_stone.cpp:53
Definition: Unit.h:735
Definition: halls_of_stone.h:36
Definition: halls_of_stone.cpp:112
Definition: halls_of_stone.h:41
bool UpdateVictim()
Definition: CreatureAI.cpp:233
Definition: halls_of_stone.cpp:70
Definition: halls_of_stone.cpp:55
Definition: halls_of_stone.cpp:51
Definition: Unit.h:1129
bool HealthBelowPct(uint32 pct) const
Definition: ScriptedCreature.h:247
Definition: halls_of_stone.cpp:43
Definition: halls_of_stone.cpp:54
Definition: halls_of_stone.cpp:46
Definition: halls_of_stone.cpp:40
Definition: halls_of_stone.cpp:57
Player * GetPlayerForEscort()
Definition: ScriptedEscortAI.h:109
Definition: halls_of_stone.h:37
Definition: Unit.h:1130
Definition: halls_of_stone.cpp:75
Definition: halls_of_stone.cpp:49
uint32 uiStep
Definition: halls_of_stone.cpp:313
Definition: inflate.h:49
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: halls_of_stone.cpp:47
Definition: Creature.h:467
Definition: halls_of_stone.h:39
Definition: halls_of_stone.cpp:50
Definition: halls_of_stone.cpp:42
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
Definition: halls_of_stone.cpp:79
Definition: halls_of_stone.cpp:56
void JumpToNextStep(uint32 uiTimer)
Definition: halls_of_stone.cpp:412
Definition: halls_of_stone.cpp:31
Creature *const me
Definition: CreatureAI.h:71
Definition: halls_of_stone.h:40
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
Definition: halls_of_stone.cpp:82
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: SharedDefines.h:288
Definition: halls_of_stone.cpp:137
Definition: InstanceScript.h:58
Definition: halls_of_stone.cpp:45
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: halls_of_stone.cpp:44
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: halls_of_stone.cpp:80
Definition: halls_of_stone.cpp:58
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
void SetRun(bool on=true)
Definition: ScriptedEscortAI.cpp:417
Definition: halls_of_stone.cpp:68
Definition: halls_of_stone.h:31
uint32 uiPhaseTimer
Definition: halls_of_stone.cpp:314
Definition: halls_of_stone.cpp:76
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:507
Definition: halls_of_stone.cpp:81
Definition: halls_of_stone.cpp:69
Definition: halls_of_stone.cpp:67
Definition: halls_of_stone.cpp:66
bool bIsBattle
Definition: halls_of_stone.cpp:321
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
Definition: Unit.cpp:12772
Definition: UpdateFields.h:135
Definition: halls_of_stone.cpp:72
Definition: Unit.h:662
Definition: halls_of_stone.cpp:52
Definition: halls_of_stone.cpp:65
Definition: halls_of_stone.h:35
Definition: halls_of_stone.cpp:59
ObjectGuid uiControllerGUID
Definition: halls_of_stone.cpp:316
Definition: halls_of_stone.cpp:41
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
void SetReactState(ReactStates st)
Definition: Creature.h:502
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869
Definition: halls_of_stone.cpp:77
bool bIsLowHP
Definition: halls_of_stone.cpp:322
Definition: halls_of_stone.cpp:117
InstanceScript * instance
Definition: halls_of_stone.cpp:319
Definition: halls_of_stone.cpp:71
Definition: halls_of_stone.cpp:74
Definition: halls_of_stone.h:42

+ Here is the call graph for this function:

void npc_brann_hos::npc_brann_hosAI::WaypointReached ( uint32  waypointId)
inlineoverridevirtual

Implements npc_escortAI.

351  {
352  switch (waypointId)
353  {
354  case 7:
356  {
357  if (!creature->IsAlive())
358  creature->Respawn();
359  ENSURE_AI(npc_tribuna_controller::npc_tribuna_controllerAI, creature->AI())->UpdateFacesList();
360  uiControllerGUID = creature->GetGUID();
361  }
362  break;
363  case 13:
366  SetEscortPaused(true);
367  JumpToNextStep(20000);
368  // @todo: There should be a pause here and a gossip should start the next step.
369  break;
370  case 17:
374  SetEscortPaused(true);
375  JumpToNextStep(8500);
376  break;
377  case 18:
378  SetEscortPaused(true);
379  break;
380  }
381  }
Definition: halls_of_stone.h:38
Definition: Unit.h:215
TC_GAME_API Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive)
Definition: ScriptedCreature.cpp:611
Definition: halls_of_stone.cpp:39
Definition: Creature.h:467
void JumpToNextStep(uint32 uiTimer)
Definition: halls_of_stone.cpp:412
Creature *const me
Definition: CreatureAI.h:71
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: InstanceScript.h:59
Definition: halls_of_stone.cpp:38
Definition: halls_of_stone.cpp:137
Definition: halls_of_stone.cpp:90
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: halls_of_stone.h:31
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:507
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
Definition: Unit.cpp:12772
ObjectGuid uiControllerGUID
Definition: halls_of_stone.cpp:316
InstanceScript * instance
Definition: halls_of_stone.cpp:319

+ Here is the call graph for this function:

Member Data Documentation

bool npc_brann_hos::npc_brann_hosAI::bIsBattle
bool npc_brann_hos::npc_brann_hosAI::bIsLowHP
bool npc_brann_hos::npc_brann_hosAI::brannSparklinNews
InstanceScript* npc_brann_hos::npc_brann_hosAI::instance
GuidList npc_brann_hos::npc_brann_hosAI::lDwarfGUIDList
ObjectGuid npc_brann_hos::npc_brann_hosAI::uiControllerGUID
uint32 npc_brann_hos::npc_brann_hosAI::uiPhaseTimer
uint32 npc_brann_hos::npc_brann_hosAI::uiStep

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