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

Public Member Functions

 boss_exarch_maladaarAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void MoveInLineOfSight (Unit *who) override
 
void EnterCombat (Unit *) override
 
void JustSummoned (Creature *summoned) override
 
void KilledUnit (Unit *) 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 SummonedCreatureDespawn (Creature *) 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
 
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 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

uint32 soulmodel
 
ObjectGuid soulholder
 
uint8 soulclass
 
uint32 Fear_timer
 
uint32 Ribbon_of_Souls_timer
 
uint32 StolenSoul_Timer
 
bool HasTaunted
 
bool Avatar_summoned
 
- 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

boss_exarch_maladaar::boss_exarch_maladaarAI::boss_exarch_maladaarAI ( Creature creature)
inline
171  : ScriptedAI(creature)
172  {
173  Initialize();
174  HasTaunted = false;
175  }
void Initialize()
Definition: boss_exarch_maladaar.cpp:177
ScriptedAI(Creature *creature)
Definition: ScriptedCreature.cpp:100
bool HasTaunted
Definition: boss_exarch_maladaar.cpp:198

+ Here is the call graph for this function:

Member Function Documentation

void boss_exarch_maladaar::boss_exarch_maladaarAI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

219  {
220  Talk(SAY_AGGRO);
221  }
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_exarch_maladaar.cpp:145

+ Here is the call graph for this function:

void boss_exarch_maladaar::boss_exarch_maladaarAI::Initialize ( void  )
inline
178  {
179  soulmodel = 0;
180  soulholder.Clear();
181  soulclass = 0;
182 
183  Fear_timer = 15000 + rand32() % 5000;
184  Ribbon_of_Souls_timer = 5000;
185  StolenSoul_Timer = 25000 + rand32() % 10000;
186 
187  Avatar_summoned = false;
188  }
uint32 StolenSoul_Timer
Definition: boss_exarch_maladaar.cpp:196
ObjectGuid soulholder
Definition: boss_exarch_maladaar.cpp:191
uint8 soulclass
Definition: boss_exarch_maladaar.cpp:192
bool Avatar_summoned
Definition: boss_exarch_maladaar.cpp:199
uint32 Fear_timer
Definition: boss_exarch_maladaar.cpp:194
uint32 soulmodel
Definition: boss_exarch_maladaar.cpp:190
void Clear()
Definition: ObjectGuid.h:215
uint32 Ribbon_of_Souls_timer
Definition: boss_exarch_maladaar.cpp:195
uint32 rand32()
Definition: Random.cpp:64

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_exarch_maladaar::boss_exarch_maladaarAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

249  {
250  Talk(SAY_DEATH);
251  //When Exarch Maladar is defeated D'ore appear.
252  me->SummonCreature(19412, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 600000);
253  }
Creature *const me
Definition: CreatureAI.h:71
Definition: Object.h:56
Definition: boss_exarch_maladaar.cpp:148
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
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:

void boss_exarch_maladaar::boss_exarch_maladaarAI::JustSummoned ( Creature summoned)
inlineoverridevirtual

Reimplemented from ScriptedAI.

224  {
225  if (summoned->GetEntry() == ENTRY_STOLEN_SOUL)
226  {
227  //SPELL_STOLEN_SOUL_VISUAL has shapeshift effect, but not implemented feature in Trinity for this spell.
228  summoned->CastSpell(summoned, SPELL_STOLEN_SOUL_VISUAL, false);
229  summoned->SetDisplayId(soulmodel);
230  summoned->setFaction(me->getFaction());
231 
232  if (Unit* target = ObjectAccessor::GetUnit(*me, soulholder))
233  {
234  ENSURE_AI(npc_stolen_soul::npc_stolen_soulAI, summoned->AI())->SetMyClass(soulclass);
235  summoned->AI()->AttackStart(target);
236  }
237  }
238  }
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
uint32 getFaction() const
Definition: Unit.h:1466
Definition: boss_exarch_maladaar.cpp:153
ObjectGuid soulholder
Definition: boss_exarch_maladaar.cpp:191
uint8 soulclass
Definition: boss_exarch_maladaar.cpp:192
void setFaction(uint32 faction)
Definition: Unit.h:1467
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_exarch_maladaar.cpp:156
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
CreatureAI * AI() const
Definition: Creature.h:525
uint32 soulmodel
Definition: boss_exarch_maladaar.cpp:190
void SetDisplayId(uint32 modelId) override
Definition: Creature.cpp:2664
uint32 GetEntry() const
Definition: Object.h:107
Definition: boss_exarch_maladaar.cpp:62
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

+ Here is the call graph for this function:

void boss_exarch_maladaar::boss_exarch_maladaarAI::KilledUnit ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

241  {
242  if (rand32() % 2)
243  return;
244 
245  Talk(SAY_SLAY);
246  }
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
uint32 rand32()
Definition: Random.cpp:64
Definition: boss_exarch_maladaar.cpp:147

+ Here is the call graph for this function:

void boss_exarch_maladaar::boss_exarch_maladaarAI::MoveInLineOfSight ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

208  {
209  if (!HasTaunted && me->IsWithinDistInMap(who, 150.0f))
210  {
211  Talk(SAY_INTRO);
212  HasTaunted = true;
213  }
214 
216  }
bool HasTaunted
Definition: boss_exarch_maladaar.cpp:198
Definition: boss_exarch_maladaar.cpp:143
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1663
Creature *const me
Definition: CreatureAI.h:71
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
virtual void MoveInLineOfSight(Unit *)
Definition: CreatureAI.cpp:128

+ Here is the call graph for this function:

void boss_exarch_maladaar::boss_exarch_maladaarAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

202  {
203  Initialize();
204  }
void Initialize()
Definition: boss_exarch_maladaar.cpp:177

+ Here is the call graph for this function:

void boss_exarch_maladaar::boss_exarch_maladaarAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

256  {
257  if (!UpdateVictim())
258  return;
259 
260  if (!Avatar_summoned && HealthBelowPct(25))
261  {
262  if (me->IsNonMeleeSpellCast(false))
264 
265  Talk(SAY_SUMMON);
266 
268  Avatar_summoned = true;
269  StolenSoul_Timer = 15000 + rand32() % 15000;
270  }
271 
272  if (StolenSoul_Timer <= diff)
273  {
274  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
275  {
276  if (target->GetTypeId() == TYPEID_PLAYER)
277  {
278  if (me->IsNonMeleeSpellCast(false))
280 
281  Talk(SAY_ROAR);
282 
283  soulmodel = target->GetDisplayId();
284  soulholder = target->GetGUID();
285  soulclass = target->getClass();
286 
287  DoCast(target, SPELL_STOLEN_SOUL);
289 
290  StolenSoul_Timer = 20000 + rand32() % 10000;
291  } else StolenSoul_Timer = 1000;
292  }
293  } else StolenSoul_Timer -= diff;
294 
295  if (Ribbon_of_Souls_timer <= diff)
296  {
297  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
298  DoCast(target, SPELL_RIBBON_OF_SOULS);
299 
300  Ribbon_of_Souls_timer = 5000 + (rand32() % 20 * 1000);
301  } else Ribbon_of_Souls_timer -= diff;
302 
303  if (Fear_timer <= diff)
304  {
306  Fear_timer = 15000 + rand32() % 15000;
307  } else Fear_timer -= diff;
308 
310  }
Definition: boss_exarch_maladaar.cpp:144
bool UpdateVictim()
Definition: CreatureAI.cpp:233
uint32 StolenSoul_Timer
Definition: boss_exarch_maladaar.cpp:196
bool HealthBelowPct(uint32 pct) const
Definition: ScriptedCreature.h:247
ObjectGuid soulholder
Definition: boss_exarch_maladaar.cpp:191
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition: Unit.cpp:2886
Definition: boss_exarch_maladaar.cpp:150
uint8 soulclass
Definition: boss_exarch_maladaar.cpp:192
Definition: boss_exarch_maladaar.cpp:151
bool Avatar_summoned
Definition: boss_exarch_maladaar.cpp:199
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_exarch_maladaar.cpp:156
uint32 Fear_timer
Definition: boss_exarch_maladaar.cpp:194
Definition: UnitAI.h:35
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
Definition: boss_exarch_maladaar.cpp:146
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
uint32 soulmodel
Definition: boss_exarch_maladaar.cpp:190
Definition: ObjectGuid.h:33
uint32 Ribbon_of_Souls_timer
Definition: boss_exarch_maladaar.cpp:195
Definition: boss_exarch_maladaar.cpp:152
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:2916
uint32 rand32()
Definition: Random.cpp:64
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
Definition: Unit.h:1305
Definition: boss_exarch_maladaar.cpp:154
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:

Member Data Documentation

bool boss_exarch_maladaar::boss_exarch_maladaarAI::Avatar_summoned
uint32 boss_exarch_maladaar::boss_exarch_maladaarAI::Fear_timer
bool boss_exarch_maladaar::boss_exarch_maladaarAI::HasTaunted
uint32 boss_exarch_maladaar::boss_exarch_maladaarAI::Ribbon_of_Souls_timer
uint8 boss_exarch_maladaar::boss_exarch_maladaarAI::soulclass
ObjectGuid boss_exarch_maladaar::boss_exarch_maladaarAI::soulholder
uint32 boss_exarch_maladaar::boss_exarch_maladaarAI::soulmodel
uint32 boss_exarch_maladaar::boss_exarch_maladaarAI::StolenSoul_Timer

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