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

Public Member Functions

 npc_expedition_commanderAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void MoveInLineOfSight (Unit *who) override
 
void JustSummoned (Creature *summoned) override
 
void DoAction (int32 action) 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 JustDied (Unit *) override
 
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 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 ()
 
virtual void MovementInform (uint32, uint32)
 
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 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

InstanceScriptinstance
 
SummonList summons
 
bool Greet
 
uint32 AttackStartTimer
 
uint8 Phase
 
ObjectGuid Engineer [4]
 
ObjectGuid Defender [4]
 
- 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 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_expedition_commander::npc_expedition_commanderAI::npc_expedition_commanderAI ( Creature creature)
inline
605  : ScriptedAI(creature), summons(creature)
606  {
607  Initialize();
609  }
void Initialize()
Definition: boss_razorscale.cpp:611
ScriptedAI(Creature *creature)
Definition: ScriptedCreature.cpp:100
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
Creature *const me
Definition: CreatureAI.h:71
InstanceScript * instance
Definition: boss_razorscale.cpp:618
SummonList summons
Definition: boss_razorscale.cpp:619

+ Here is the call graph for this function:

Member Function Documentation

void npc_expedition_commander::npc_expedition_commanderAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

649  {
650  switch (action)
651  {
652  case ACTION_GROUND_PHASE:
654  break;
658  break;
659  }
660  }
Definition: Unit.h:735
void DespawnAll()
Definition: ScriptedCreature.cpp:66
Definition: boss_razorscale.cpp:105
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_razorscale.cpp:32
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_razorscale.cpp:108
SummonList summons
Definition: boss_razorscale.cpp:619
Definition: UpdateFields.h:135

+ Here is the call graph for this function:

void npc_expedition_commander::npc_expedition_commanderAI::Initialize ( void  )
inline
612  {
613  AttackStartTimer = 0;
614  Phase = 0;
615  Greet = false;
616  }
bool Greet
Definition: boss_razorscale.cpp:621
uint32 AttackStartTimer
Definition: boss_razorscale.cpp:622
Phase
Definition: boss_kiljaeden.cpp:153

+ Here is the caller graph for this function:

void npc_expedition_commander::npc_expedition_commanderAI::JustSummoned ( Creature summoned)
inlineoverridevirtual

Reimplemented from ScriptedAI.

644  {
645  summons.Summon(summoned);
646  }
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:92
SummonList summons
Definition: boss_razorscale.cpp:619

+ Here is the call graph for this function:

void npc_expedition_commander::npc_expedition_commanderAI::MoveInLineOfSight ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

635  {
636  if (!Greet && me->IsWithinDistInMap(who, 10.0f) && who->GetTypeId() == TYPEID_PLAYER)
637  {
638  Talk(SAY_INTRO);
639  Greet = true;
640  }
641  }
bool Greet
Definition: boss_razorscale.cpp:621
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1663
Creature *const me
Definition: CreatureAI.h:71
TypeID GetTypeId() const
Definition: Object.h:113
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: ObjectGuid.h:33
Definition: boss_razorscale.cpp:31

+ Here is the call graph for this function:

void npc_expedition_commander::npc_expedition_commanderAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

628  {
629  Initialize();
631  }
void Initialize()
Definition: boss_razorscale.cpp:611
void DespawnAll()
Definition: ScriptedCreature.cpp:66
SummonList summons
Definition: boss_razorscale.cpp:619

+ Here is the call graph for this function:

void npc_expedition_commander::npc_expedition_commanderAI::UpdateAI ( uint32  Diff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

663  {
664  if (AttackStartTimer <= Diff)
665  {
666  switch (Phase)
667  {
668  case 1:
671  AttackStartTimer = 1000;
672  Phase = 2;
673  break;
674  case 2:
675  for (uint8 n = 0; n < RAID_MODE(2, 4); n++)
676  {
678  {
679  summonedEngineer->SetWalk(false);
680  summonedEngineer->SetSpeed(MOVE_RUN, 0.5f);
681  summonedEngineer->SetHomePosition(PosEngRepair[n]);
682  summonedEngineer->GetMotionMaster()->MoveTargetedHome();
683  Engineer[n] = summonedEngineer->GetGUID();
684  }
685  }
686  if (Creature* firstSummon = ObjectAccessor::GetCreature(*me, Engineer[0]))
687  firstSummon->AI()->Talk(SAY_AGGRO_3);
688  Phase = 3;
689  AttackStartTimer = 14000;
690  break;
691  case 3:
692  for (uint8 n = 0; n < 4; n++)
693  {
695  {
696  summonedDefender->SetWalk(false);
697  summonedDefender->SetHomePosition(PosDefCombat[n]);
698  summonedDefender->GetMotionMaster()->MoveTargetedHome();
699  Defender[n] = summonedDefender->GetGUID();
700  }
701  }
702  Phase = 4;
703  break;
704  case 4:
705  for (uint8 n = 0; n < RAID_MODE(2, 4); n++)
706  if (Creature* summonedEngineer = ObjectAccessor::GetCreature(*me, Engineer[n]))
707  summonedEngineer->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
708  for (uint8 n = 0; n < 4; ++n)
709  if (Creature* summonedDefender = ObjectAccessor::GetCreature(*me, Defender[n]))
710  summonedDefender->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
711  Talk(SAY_AGGRO_2);
712  AttackStartTimer = 16000;
713  Phase = 5;
714  break;
715  case 5:
717  {
718  Razorscale->AI()->DoAction(ACTION_EVENT_START);
719  me->SetInCombatWith(Razorscale);
720  }
721  if (Creature* firstEngineer = ObjectAccessor::GetCreature(*me, Engineer[0]))
722  firstEngineer->AI()->Talk(SAY_AGGRO_1);
723  Phase = 6;
724  break;
725  }
726  }
727  else
728  AttackStartTimer -= Diff;
729  }
Definition: SharedDefines.h:2488
Definition: UpdateFields.h:136
void DespawnAll()
Definition: ScriptedCreature.cpp:66
Definition: boss_razorscale.cpp:37
Definition: boss_razorscale.cpp:33
Definition: Creature.h:467
Definition: boss_razorscale.cpp:104
uint32 AttackStartTimer
Definition: boss_razorscale.cpp:622
ObjectGuid Defender[4]
Definition: boss_razorscale.cpp:625
const Position PosDefCombat[4]
Definition: boss_razorscale.cpp:163
Definition: ulduar.h:34
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
InstanceScript * instance
Definition: boss_razorscale.cpp:618
const Position PosDefSpawn[4]
Definition: boss_razorscale.cpp:155
Definition: InstanceScript.h:59
const Position PosEngRepair[4]
Definition: boss_razorscale.cpp:147
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
SummonList summons
Definition: boss_razorscale.cpp:619
const T & RAID_MODE(const T &normal10, const T &normal25) const
Definition: ScriptedCreature.h:293
Definition: Unit.h:600
Definition: boss_razorscale.cpp:36
Definition: Object.h:59
uint8_t uint8
Definition: Define.h:152
ObjectGuid Engineer[4]
Definition: boss_razorscale.cpp:624
Definition: boss_razorscale.cpp:85
Phase
Definition: boss_kiljaeden.cpp:153
const Position PosEngSpawn
Definition: boss_razorscale.cpp:181
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346
void SetInCombatWith(Unit *enemy)
Definition: Unit.cpp:9840
Definition: boss_razorscale.cpp:86
Definition: SharedDefines.h:2462

+ Here is the call graph for this function:

Member Data Documentation

uint32 npc_expedition_commander::npc_expedition_commanderAI::AttackStartTimer
ObjectGuid npc_expedition_commander::npc_expedition_commanderAI::Defender[4]
ObjectGuid npc_expedition_commander::npc_expedition_commanderAI::Engineer[4]
bool npc_expedition_commander::npc_expedition_commanderAI::Greet
InstanceScript* npc_expedition_commander::npc_expedition_commanderAI::instance
uint8 npc_expedition_commander::npc_expedition_commanderAI::Phase
SummonList npc_expedition_commander::npc_expedition_commanderAI::summons

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