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

Public Member Functions

bool IAmVeklor () override
 
 boss_veknilashAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void CastSpellOnBug (Creature *target) override
 
void UpdateAI (uint32 diff) 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 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 UpperCut_Timer
 
uint32 UnbalancingStrike_Timer
 
uint32 Scarabs_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_veknilash::boss_veknilashAI::boss_veknilashAI ( Creature creature)
inline
404  : boss_twinemperorsAI(creature)
405  {
406  Initialize();
407  }
void Initialize()
Definition: boss_twinemperors.cpp:409
boss_twinemperorsAI(Creature *creature)
Definition: boss_twinemperors.cpp:70

+ Here is the call graph for this function:

Member Function Documentation

void boss_veknilash::boss_veknilashAI::CastSpellOnBug ( Creature target)
inlineoverridevirtual

Implements boss_twinemperorsAI.

429  {
430  target->setFaction(14);
432  target->AddAura(SPELL_MUTATE_BUG, target);
433  target->SetFullHealth();
434  }
Definition: boss_twinemperors.cpp:39
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:14463
Unit * getHostilTarget()
Definition: ThreatManager.cpp:459
void setFaction(uint32 faction)
Definition: Unit.h:1467
Creature *const me
Definition: CreatureAI.h:71
CreatureAI * AI() const
Definition: Creature.h:525
ThreatManager & getThreatManager()
Definition: Unit.h:1998
void SetFullHealth()
Definition: Unit.h:1440
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29

+ Here is the call graph for this function:

bool boss_veknilash::boss_veknilashAI::IAmVeklor ( )
inlineoverridevirtual

Implements boss_twinemperorsAI.

403 {return false;}
void boss_veknilash::boss_veknilashAI::Initialize ( void  )
inline
410  {
411  UpperCut_Timer = urand(14000, 29000);
412  UnbalancingStrike_Timer = urand(8000, 18000);
413  Scarabs_Timer = urand(7000, 14000);
414  }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
uint32 UpperCut_Timer
Definition: boss_twinemperors.cpp:416
uint32 Scarabs_Timer
Definition: boss_twinemperors.cpp:418
uint32 UnbalancingStrike_Timer
Definition: boss_twinemperors.cpp:417

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_veknilash::boss_veknilashAI::Reset ( )
inlineoverridevirtual

Implements boss_twinemperorsAI.

421  {
422  TwinReset();
423  Initialize();
424  //Added. Can be removed if its included in DB.
426  }
Definition: SharedDefines.h:1863
Definition: SharedDefines.h:303
void Initialize()
Definition: boss_twinemperors.cpp:409
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply)
Definition: Unit.cpp:9615
Creature *const me
Definition: CreatureAI.h:71
void TwinReset()
Definition: boss_twinemperors.cpp:105

+ Here is the call graph for this function:

void boss_veknilash::boss_veknilashAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

437  {
438  //Return since we have no target
439  if (!UpdateVictim())
440  return;
441 
442  if (!TryActivateAfterTTelep(diff))
443  return;
444 
445  //UnbalancingStrike_Timer
446  if (UnbalancingStrike_Timer <= diff)
447  {
449  UnbalancingStrike_Timer = 8000 + rand32() % 12000;
450  } else UnbalancingStrike_Timer -= diff;
451 
452  if (UpperCut_Timer <= diff)
453  {
454  Unit* randomMelee = SelectTarget(SELECT_TARGET_RANDOM, 0, NOMINAL_MELEE_RANGE, true);
455  if (randomMelee)
456  DoCast(randomMelee, SPELL_UPPERCUT);
457  UpperCut_Timer = 15000 + rand32() % 15000;
458  } else UpperCut_Timer -= diff;
459 
460  HandleBugs(diff);
461 
462  //Heal brother when 60yrds close
463  TryHealBrother(diff);
464 
465  //Teleporting to brother
466  if (Teleport_Timer <= diff)
467  {
469  } else Teleport_Timer -= diff;
470 
471  CheckEnrage(diff);
472 
474  }
bool UpdateVictim()
Definition: CreatureAI.cpp:233
bool TryActivateAfterTTelep(uint32 diff)
Definition: boss_twinemperors.cpp:250
Definition: boss_twinemperors.cpp:42
void CheckEnrage(uint32 diff)
Definition: boss_twinemperors.cpp:378
void HandleBugs(uint32 diff)
Definition: boss_twinemperors.cpp:348
void TeleportToMyBrother()
Definition: boss_twinemperors.cpp:215
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
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: boss_twinemperors.cpp:41
#define NOMINAL_MELEE_RANGE
Definition: Object.h:47
uint32 UpperCut_Timer
Definition: boss_twinemperors.cpp:416
uint32 rand32()
Definition: Random.cpp:64
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
uint32 Teleport_Timer
Definition: boss_twinemperors.cpp:93
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
Definition: Unit.h:1305
uint32 UnbalancingStrike_Timer
Definition: boss_twinemperors.cpp:417
void TryHealBrother(uint32 diff)
Definition: boss_twinemperors.cpp:199

+ Here is the call graph for this function:

Member Data Documentation

uint32 boss_veknilash::boss_veknilashAI::Scarabs_Timer
uint32 boss_veknilash::boss_veknilashAI::UnbalancingStrike_Timer
uint32 boss_veknilash::boss_veknilashAI::UpperCut_Timer

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