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

Public Member Functions

 npc_baradaAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void sGossipSelect (Player *player, uint32, uint32 gossipListId) override
 
void DoAction (int32 action) override
 
void MovementInform (uint32 type, uint32 id) override
 
void JustDied (Unit *) override
 
void UpdateAI (uint32 diff) override
 
- 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 AttackStart (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 EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted () const
 
virtual void JustRespawned ()
 
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)
 
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 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
 
uint8 step
 
ObjectGuid julesGUID
 
ObjectGuid playerGUID
 

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 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)
 
virtual void MoveInLineOfSight (Unit *)
 
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_barada::npc_baradaAI::npc_baradaAI ( Creature creature)
inline
489  : ScriptedAI(creature)
490  {
491  Initialize();
492  }
ScriptedAI(Creature *creature)
Definition: ScriptedCreature.cpp:100
void Initialize()
Definition: zone_hellfire_peninsula.cpp:494

+ Here is the call graph for this function:

Member Function Documentation

void npc_barada::npc_baradaAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

524  {
525  if (action == ACTION_START_EVENT)
526  {
527  if (Creature* jules = me->FindNearestCreature(NPC_COLONEL_JULES, 20.0f, true))
528  {
529  julesGUID = jules->GetGUID();
530  jules->AI()->Talk(SAY_JULES_1);
531  }
532 
535 
537  }
538  }
Definition: zone_hellfire_peninsula.cpp:432
Definition: zone_hellfire_peninsula.cpp:458
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: Creature.h:467
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2443
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
Creature *const me
Definition: CreatureAI.h:71
Definition: zone_hellfire_peninsula.cpp:424
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
Definition: Unit.h:690
ObjectGuid julesGUID
Definition: zone_hellfire_peninsula.cpp:731
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Position const exorcismPos[11]
Definition: zone_hellfire_peninsula.cpp:439
Definition: UpdateFields.h:109
Definition: zone_hellfire_peninsula.cpp:464

+ Here is the call graph for this function:

void npc_barada::npc_baradaAI::Initialize ( void  )
inline
495  {
496  step = 0;
497  }
uint8 step
Definition: zone_hellfire_peninsula.cpp:730

+ Here is the caller graph for this function:

void npc_barada::npc_baradaAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

553  {
555  {
556  jules->AI()->DoAction(ACTION_JULES_MOVE_HOME);
557  jules->RemoveAllAuras();
558  }
559  }
Definition: zone_hellfire_peninsula.cpp:467
Definition: Creature.h:467
Creature *const me
Definition: CreatureAI.h:71
ObjectGuid julesGUID
Definition: zone_hellfire_peninsula.cpp:731
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174

+ Here is the call graph for this function:

void npc_barada::npc_baradaAI::MovementInform ( uint32  type,
uint32  id 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

541  {
542  if (type != POINT_MOTION_TYPE)
543  return;
544 
545  if (id == 0)
547 
548  if (id == 1)
550  }
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Creature *const me
Definition: CreatureAI.h:71
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Position const exorcismPos[11]
Definition: zone_hellfire_peninsula.cpp:439
EventMap events
Definition: zone_hellfire_peninsula.cpp:729
Definition: zone_hellfire_peninsula.cpp:472
Definition: MotionMaster.h:46

+ Here is the call graph for this function:

void npc_barada::npc_baradaAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

500  {
501  events.Reset();
502  Initialize();
503 
504  playerGUID.Clear();
506  }
void Reset()
Definition: EventMap.cpp:20
Creature *const me
Definition: CreatureAI.h:71
Definition: Unit.h:690
void Initialize()
Definition: zone_hellfire_peninsula.cpp:494
void Clear()
Definition: ObjectGuid.h:215
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
EventMap events
Definition: zone_hellfire_peninsula.cpp:729
Definition: UpdateFields.h:109
ObjectGuid playerGUID
Definition: zone_hellfire_peninsula.cpp:732

+ Here is the call graph for this function:

void npc_barada::npc_baradaAI::sGossipSelect ( Player player,
uint32  ,
uint32  gossipListId 
)
inlineoverridevirtual

Reimplemented from UnitAI.

509  {
510  player->PlayerTalkClass->ClearMenus();
511  switch (gossipListId)
512  {
513  case 1:
514  player->PlayerTalkClass->SendCloseGossip();
515  me->AI()->Talk(SAY_BARADA_1);
517  break;
518  default:
519  break;
520  }
521  }
Creature *const me
Definition: CreatureAI.h:71
CreatureAI * AI() const
Definition: Creature.h:525
virtual void DoAction(int32)
Definition: UnitAI.h:138
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: zone_hellfire_peninsula.cpp:423
Definition: zone_hellfire_peninsula.cpp:464

+ Here is the call graph for this function:

void npc_barada::npc_baradaAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

562  {
563  events.Update(diff);
564 
565  while (uint32 eventId = events.ExecuteEvent())
566  {
567  switch (eventId)
568  {
569  case EVENT_BARADAS_TALK:
570  switch (step)
571  {
572  case 0:
573  me->SetFacingTo(1.513286f);
574 
577  step++;
578  break;
579  case 1:
582  step++;
583  break;
584  case 2:
587  step++;
588  break;
589  case 3:
591  jules->AI()->Talk(SAY_JULES_2);
592 
594  step++;
595  break;
596  case 4:
599 
601  jules->AI()->DoAction(ACTION_JULES_HOVER);
602 
604  step++;
605  break;
606  case 5:
608  jules->AI()->Talk(SAY_JULES_3);
609 
611  step++;
612  break;
613  case 6:
616  step++;
617  break;
618  case 7:
620  jules->AI()->Talk(SAY_JULES_3);
621 
623  step++;
624  break;
625  case 8:
628  step++;
629  break;
630  case 9:
632  jules->AI()->Talk(SAY_JULES_4);
633 
635  step++;
636  break;
637  case 10:
640  step++;
641  break;
642  case 11:
644  jules->AI()->DoAction(ACTION_JULES_FLIGHT);
645 
647  step++;
648  break;
649  case 12:
651  jules->AI()->Talk(SAY_JULES_4);
652 
654  step++;
655  break;
656  case 13:
659  step++;
660  break;
661  case 14:
663  jules->AI()->Talk(SAY_JULES_4);
664 
666  step++;
667  break;
668  case 15:
671  step++;
672  break;
673  case 16:
675  jules->AI()->Talk(SAY_JULES_5);
676 
678  step++;
679  break;
680  case 17:
683  step++;
684  break;
685  case 18:
687  jules->AI()->Talk(SAY_JULES_3);
688 
690  step++;
691  break;
692  case 19:
695  step++;
696  break;
697  case 20:
699  {
700  jules->AI()->DoAction(ACTION_JULES_MOVE_HOME);
701  jules->RemoveAura(SPELL_JULES_VOMITS_AURA);
702  }
703 
705  step++;
706  break;
707  case 21:
708  //End
710  player->KilledMonsterCredit(NPC_COLONEL_JULES, ObjectGuid::Empty);
711 
713  jules->RemoveAllAuras();
714 
717 
720  EnterEvadeMode();
721  break;
722  }
723  break;
724  }
725  }
726  }
Definition: zone_hellfire_peninsula.cpp:429
Definition: SharedDefines.h:2426
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: zone_hellfire_peninsula.cpp:458
Definition: zone_hellfire_peninsula.cpp:436
Definition: zone_hellfire_peninsula.cpp:435
Definition: zone_hellfire_peninsula.cpp:467
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:168
Definition: zone_hellfire_peninsula.cpp:427
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
void MoveTargetedHome()
Definition: MotionMaster.cpp:201
Definition: Creature.h:467
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3442
Definition: zone_hellfire_peninsula.cpp:465
Definition: zone_hellfire_peninsula.cpp:428
Creature *const me
Definition: CreatureAI.h:71
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
Definition: ObjectAccessor.cpp:209
Definition: Unit.h:690
Definition: zone_hellfire_peninsula.cpp:415
Definition: zone_hellfire_peninsula.cpp:430
uint32_t uint32
Definition: Define.h:150
ObjectGuid julesGUID
Definition: zone_hellfire_peninsula.cpp:731
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: SharedDefines.h:2581
void SetFacingTo(float ori)
Definition: Unit.cpp:15777
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
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
void Update(uint32 time)
Definition: EventMap.h:54
Definition: zone_hellfire_peninsula.cpp:466
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
uint8 step
Definition: zone_hellfire_peninsula.cpp:730
Definition: zone_hellfire_peninsula.cpp:418
EventMap events
Definition: zone_hellfire_peninsula.cpp:729
Definition: UpdateFields.h:109
Definition: zone_hellfire_peninsula.cpp:433
Definition: zone_hellfire_peninsula.cpp:425
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
Definition: zone_hellfire_peninsula.cpp:472
void HandleEmoteCommand(uint32 anim_id)
Definition: Unit.cpp:1444
Definition: zone_hellfire_peninsula.cpp:426
ObjectGuid playerGUID
Definition: zone_hellfire_peninsula.cpp:732
Definition: zone_hellfire_peninsula.cpp:417
Definition: zone_hellfire_peninsula.cpp:434

+ Here is the call graph for this function:

Member Data Documentation

EventMap npc_barada::npc_baradaAI::events
private
ObjectGuid npc_barada::npc_baradaAI::julesGUID
private
ObjectGuid npc_barada::npc_baradaAI::playerGUID
private
uint8 npc_barada::npc_baradaAI::step
private

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