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

Public Member Functions

bool IAmVeklor () override
 
 boss_veklorAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void CastSpellOnBug (Creature *target) override
 
void UpdateAI (uint32 diff) override
 
void AttackStart (Unit *who) override
 
- Public Member Functions inherited from boss_twinemperorsAI
 boss_twinemperorsAI (Creature *creature)
 
void Initialize ()
 
void TwinReset ()
 
CreatureGetOtherBoss ()
 
void DamageTaken (Unit *, uint32 &damage) override
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void EnterCombat (Unit *who) override
 
void SpellHit (Unit *caster, const SpellInfo *entry) override
 
void TryHealBrother (uint32 diff)
 
void TeleportToMyBrother ()
 
void SetAfterTeleport ()
 
bool TryActivateAfterTTelep (uint32 diff)
 
void MoveInLineOfSight (Unit *who) override
 
CreatureRespawnNearbyBugsAndGetOne ()
 
void HandleBugs (uint32 diff)
 
void CheckEnrage (uint32 diff)
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void OnPossess (bool)
 
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 ShadowBolt_Timer
 
uint32 Blizzard_Timer
 
uint32 ArcaneBurst_Timer
 
uint32 Scorpions_Timer
 
- Public Attributes inherited from boss_twinemperorsAI
InstanceScriptinstance
 
uint32 Heal_Timer
 
uint32 Teleport_Timer
 
bool AfterTeleport
 
uint32 AfterTeleportTimer
 
bool DontYellWhenDead
 
uint32 Abuse_Bug_Timer
 
uint32 BugsTimer
 
bool tspellcast
 
uint32 EnrageTimer
 
- 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_veklor::boss_veklorAI::boss_veklorAI ( Creature creature)
inline
492  : boss_twinemperorsAI(creature)
493  {
494  Initialize();
495  }
boss_twinemperorsAI(Creature *creature)
Definition: boss_twinemperors.cpp:70
void Initialize()
Definition: boss_twinemperors.cpp:497

+ Here is the call graph for this function:

Member Function Documentation

void boss_veklor::boss_veklorAI::AttackStart ( Unit who)
inlineoverridevirtual

Reimplemented from ScriptedAI.

587  {
588  if (!who)
589  return;
590 
591  if (who->isTargetableForAttack())
592  {
593  // VL doesn't melee
594  if (me->Attack(who, false))
595  {
597  me->AddThreat(who, 0.0f);
598  }
599  }
600  }
Definition: boss_twinemperors.cpp:62
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=NULL)
Definition: Unit.cpp:10691
bool Attack(Unit *victim, bool meleeAttack)
Definition: Unit.cpp:7222
void MoveChase(Unit *target, float dist=0.0f, float angle=0.0f)
Definition: MotionMaster.cpp:241
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Creature *const me
Definition: CreatureAI.h:71
bool isTargetableForAttack(bool checkFakeDeath=true) const
Definition: Unit.cpp:9987

+ Here is the call graph for this function:

void boss_veklor::boss_veklorAI::CastSpellOnBug ( Creature target)
inlineoverridevirtual

Implements boss_twinemperorsAI.

520  {
521  target->setFaction(14);
522  target->AddAura(SPELL_EXPLODEBUG, target);
523  target->SetFullHealth();
524  }
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:14463
void setFaction(uint32 faction)
Definition: Unit.h:1467
void SetFullHealth()
Definition: Unit.h:1440
Definition: boss_twinemperors.cpp:38

+ Here is the call graph for this function:

bool boss_veklor::boss_veklorAI::IAmVeklor ( )
inlineoverridevirtual

Implements boss_twinemperorsAI.

491 {return true;}
void boss_veklor::boss_veklorAI::Initialize ( void  )
inline
498  {
499  ShadowBolt_Timer = 0;
500  Blizzard_Timer = urand(15000, 20000);
501  ArcaneBurst_Timer = 1000;
502  Scorpions_Timer = urand(7000, 14000);
503  }
uint32 ShadowBolt_Timer
Definition: boss_twinemperors.cpp:505
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
uint32 ArcaneBurst_Timer
Definition: boss_twinemperors.cpp:507
uint32 Scorpions_Timer
Definition: boss_twinemperors.cpp:508
uint32 Blizzard_Timer
Definition: boss_twinemperors.cpp:506

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_veklor::boss_veklorAI::Reset ( )
inlineoverridevirtual

Implements boss_twinemperorsAI.

511  {
512  TwinReset();
513  Initialize();
514 
515  //Added. Can be removed if its included in DB.
517  }
Definition: SharedDefines.h:1863
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply)
Definition: Unit.cpp:9615
void Initialize()
Definition: boss_twinemperors.cpp:497
Creature *const me
Definition: CreatureAI.h:71
Definition: SharedDefines.h:288
void TwinReset()
Definition: boss_twinemperors.cpp:105

+ Here is the call graph for this function:

void boss_veklor::boss_veklorAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

527  {
528  //Return since we have no target
529  if (!UpdateVictim())
530  return;
531 
532  // reset arcane burst after teleport - we need to do this because
533  // when VL jumps to VN's location there will be a warrior who will get only 2s to run away
534  // which is almost impossible
535  if (AfterTeleport)
536  ArcaneBurst_Timer = 5000;
537  if (!TryActivateAfterTTelep(diff))
538  return;
539 
540  //ShadowBolt_Timer
541  if (ShadowBolt_Timer <= diff)
542  {
543  if (!me->IsWithinDist(me->GetVictim(), 45.0f))
545  else
547  ShadowBolt_Timer = 2000;
548  } else ShadowBolt_Timer -= diff;
549 
550  //Blizzard_Timer
551  if (Blizzard_Timer <= diff)
552  {
553  Unit* target = NULL;
554  target = SelectTarget(SELECT_TARGET_RANDOM, 0, 45, true);
555  if (target)
556  DoCast(target, SPELL_BLIZZARD);
557  Blizzard_Timer = 15000 + rand32() % 15000;
558  } else Blizzard_Timer -= diff;
559 
560  if (ArcaneBurst_Timer <= diff)
561  {
563  {
564  DoCast(mvic, SPELL_ARCANEBURST);
565  ArcaneBurst_Timer = 5000;
566  }
567  } else ArcaneBurst_Timer -= diff;
568 
569  HandleBugs(diff);
570 
571  //Heal brother when 60yrds close
572  TryHealBrother(diff);
573 
574  //Teleporting to brother
575  if (Teleport_Timer <= diff)
576  {
578  } else Teleport_Timer -= diff;
579 
580  CheckEnrage(diff);
581 
582  //VL doesn't melee
583  //DoMeleeAttackIfReady();
584  }
Definition: boss_twinemperors.cpp:62
bool UpdateVictim()
Definition: CreatureAI.cpp:233
bool TryActivateAfterTTelep(uint32 diff)
Definition: boss_twinemperors.cpp:250
void MoveChase(Unit *target, float dist=0.0f, float angle=0.0f)
Definition: MotionMaster.cpp:241
uint32 ShadowBolt_Timer
Definition: boss_twinemperors.cpp:505
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
void CheckEnrage(uint32 diff)
Definition: boss_twinemperors.cpp:378
Definition: boss_twinemperors.cpp:45
arena_t NULL
Definition: jemalloc_internal.h:624
void HandleBugs(uint32 diff)
Definition: boss_twinemperors.cpp:348
Definition: boss_twinemperors.cpp:44
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1658
Creature *const me
Definition: CreatureAI.h:71
void TeleportToMyBrother()
Definition: boss_twinemperors.cpp:215
Definition: UnitAI.h:35
Unit * GetVictim() const
Definition: Unit.h:1379
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
bool AfterTeleport
Definition: boss_twinemperors.cpp:94
#define NOMINAL_MELEE_RANGE
Definition: Object.h:47
uint32 rand32()
Definition: Random.cpp:64
uint32 Teleport_Timer
Definition: boss_twinemperors.cpp:93
uint32 ArcaneBurst_Timer
Definition: boss_twinemperors.cpp:507
Definition: boss_twinemperors.cpp:43
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
Definition: Unit.h:1305
void TryHealBrother(uint32 diff)
Definition: boss_twinemperors.cpp:199
Definition: UnitAI.h:38
uint32 Blizzard_Timer
Definition: boss_twinemperors.cpp:506

+ Here is the call graph for this function:

Member Data Documentation

uint32 boss_veklor::boss_veklorAI::ArcaneBurst_Timer
uint32 boss_veklor::boss_veklorAI::Blizzard_Timer
uint32 boss_veklor::boss_veklorAI::Scorpions_Timer
uint32 boss_veklor::boss_veklorAI::ShadowBolt_Timer

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