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

Public Member Functions

 boss_nexusprince_shaffarAI (Creature *creature)
 
void Reset () override
 
void MoveInLineOfSight (Unit *who) override
 
void EnterCombat (Unit *) override
 
void JustSummoned (Creature *summoned) override
 
void KilledUnit (Unit *victim) override
 
void JustDied (Unit *) override
 
void ExecuteEvent (uint32 eventId) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
virtual ~BossAI ()
 
void SummonedCreatureDespawn (Creature *summon) override
 
virtual void UpdateAI (uint32 diff) override
 
virtual void ScheduleTasks ()
 
void JustReachedHome () override
 
bool CanAIAttack (Unit const *target) const override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void OnPossess (bool)
 
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
 
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 void DoAction (int32)
 
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)
 

Private Attributes

bool _hasTaunted
 

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 BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _EnterCombat ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _DespawnAtEvade ()
 
void TeleportCheaters ()
 
- 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 BossAI
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const_boundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Constructor & Destructor Documentation

boss_nexusprince_shaffar::boss_nexusprince_shaffarAI::boss_nexusprince_shaffarAI ( Creature creature)
inline
80  : BossAI(creature, DATA_NEXUSPRINCE_SHAFFAR)
81  {
82  _hasTaunted = false;
83  }
Definition: mana_tombs.h:31
bool _hasTaunted
Definition: boss_nexusprince_shaffar.cpp:184
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:444

Member Function Documentation

void boss_nexusprince_shaffar::boss_nexusprince_shaffarAI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

108  {
109  Talk(SAY_AGGRO);
110  _EnterCombat();
111 
116  }
Definition: boss_nexusprince_shaffar.cpp:32
void _EnterCombat()
Definition: ScriptedCreature.cpp:480
Definition: boss_nexusprince_shaffar.cpp:69
Definition: boss_nexusprince_shaffar.cpp:68
Definition: boss_nexusprince_shaffar.cpp:70
Definition: boss_nexusprince_shaffar.cpp:67
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
EventMap events
Definition: ScriptedCreature.h:371

+ Here is the call graph for this function:

void boss_nexusprince_shaffar::boss_nexusprince_shaffarAI::ExecuteEvent ( uint32  eventId)
inlineoverridevirtual

Reimplemented from BossAI.

144  {
145  switch (eventId)
146  {
147  case EVENT_BLINK:
148  if (me->IsNonMeleeSpellCast(false))
150 
151  // expire movement, will prevent from running right back to victim after cast
152  // (but should MoveChase be used again at a certain time or should he not move?)
155 
157  break;
158  case EVENT_BEACON:
159  if (!urand(0, 3))
160  Talk(SAY_SUMMON);
161 
164  break;
165  case EVENT_FIREBALL:
168  break;
169  case EVENT_FROSTBOLT:
172  break;
173  case EVENT_FROST_NOVA:
175  events.ScheduleEvent(EVENT_FROST_NOVA, urand(17500, 25000));
177  break;
178  default:
179  break;
180  }
181  }
Definition: boss_nexusprince_shaffar.cpp:34
Definition: boss_nexusprince_shaffar.cpp:45
Definition: boss_nexusprince_shaffar.cpp:66
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
MovementGeneratorType GetCurrentMovementGeneratorType() const
Definition: MotionMaster.cpp:663
Definition: boss_nexusprince_shaffar.cpp:69
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition: Unit.cpp:2886
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_nexusprince_shaffar.cpp:68
Definition: boss_nexusprince_shaffar.cpp:70
Definition: boss_nexusprince_shaffar.cpp:67
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: boss_nexusprince_shaffar.cpp:40
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
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
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:2916
EventMap events
Definition: ScriptedCreature.h:371
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
Definition: boss_nexusprince_shaffar.cpp:41
Definition: MotionMaster.h:43
void MovementExpired(bool reset=true)
Definition: MotionMaster.h:151
Definition: boss_nexusprince_shaffar.cpp:43

+ Here is the call graph for this function:

void boss_nexusprince_shaffar::boss_nexusprince_shaffarAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

138  {
139  Talk(SAY_DEAD);
140  _JustDied();
141  }
void _JustDied()
Definition: ScriptedCreature.cpp:471
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_nexusprince_shaffar.cpp:35

+ Here is the call graph for this function:

void boss_nexusprince_shaffar::boss_nexusprince_shaffarAI::JustSummoned ( Creature summoned)
inlineoverridevirtual

Reimplemented from BossAI.

119  {
120  if (summoned->GetEntry() == NPC_BEACON)
121  {
122  summoned->CastSpell(summoned, SPELL_ETHEREAL_BEACON_VISUAL, false);
123 
124  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
125  summoned->AI()->AttackStart(target);
126  }
127 
128  summons.Summon(summoned);
129  }
Definition: boss_nexusprince_shaffar.cpp:46
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:92
Definition: UnitAI.h:35
CreatureAI * AI() const
Definition: Creature.h:525
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
SummonList summons
Definition: ScriptedCreature.h:372
uint32 GetEntry() const
Definition: Object.h:107
Definition: Unit.h:1305
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
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29
Definition: boss_nexusprince_shaffar.cpp:55

+ Here is the call graph for this function:

void boss_nexusprince_shaffar::boss_nexusprince_shaffarAI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

132  {
133  if (victim->GetTypeId() == TYPEID_PLAYER)
134  Talk(SAY_SLAY);
135  }
TypeID GetTypeId() const
Definition: Object.h:113
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_nexusprince_shaffar.cpp:33
Definition: ObjectGuid.h:33

+ Here is the call graph for this function:

void boss_nexusprince_shaffar::boss_nexusprince_shaffarAI::MoveInLineOfSight ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

99  {
100  if (!_hasTaunted && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 100.0f))
101  {
102  Talk(SAY_INTRO);
103  _hasTaunted = true;
104  }
105  }
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
Definition: boss_nexusprince_shaffar.cpp:31
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: ObjectGuid.h:33
bool _hasTaunted
Definition: boss_nexusprince_shaffar.cpp:184

+ Here is the call graph for this function:

void boss_nexusprince_shaffar::boss_nexusprince_shaffarAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

86  {
87  _Reset();
88 
89  float dist = 8.0f;
90  float posX, posY, posZ, angle;
91  me->GetHomePosition(posX, posY, posZ, angle);
92 
93  me->SummonCreature(NPC_BEACON, posX - dist, posY - dist, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
94  me->SummonCreature(NPC_BEACON, posX - dist, posY + dist, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
95  me->SummonCreature(NPC_BEACON, posX + dist, posY, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
96  }
Creature *const me
Definition: CreatureAI.h:71
void _Reset()
Definition: ScriptedCreature.cpp:457
Definition: Object.h:59
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:672
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346
Definition: boss_nexusprince_shaffar.cpp:55

+ Here is the call graph for this function:

Member Data Documentation

bool boss_nexusprince_shaffar::boss_nexusprince_shaffarAI::_hasTaunted
private

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