AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_boss_gothik_minion::npc_boss_gothik_minionAI Struct Reference
Inheritance diagram for npc_boss_gothik_minion::npc_boss_gothik_minionAI:
CombatAI CreatureAI UnitAI

Public Member Functions

 npc_boss_gothik_minionAI (Creature *c)
 
bool IsOnSameSide (Unit const *who) const
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *who) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
- Public Member Functions inherited from CombatAI
 CombatAI (Creature *c)
 
void InitializeAI () override
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
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 (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following:
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast.
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished.
 
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 sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Public Attributes

EventMap events
 
bool livingSide
 

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CombatAI
static int32 Permissible (Creature const *)
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- 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)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CombatAI
EventMap events
 
SpellVct spells
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_boss_gothik_minionAI()

npc_boss_gothik_minion::npc_boss_gothik_minionAI::npc_boss_gothik_minionAI ( Creature c)
inlineexplicit
490 : CombatAI(c)
491 {
493 }
#define IN_LIVE_SIDE(who)
Definition boss_gothik.cpp:174
Definition CombatAI.h:40
Creature *const me
Definition CreatureAI.h:72
bool livingSide
Definition boss_gothik.cpp:495

References IN_LIVE_SIDE, livingSide, and CreatureAI::me.

Member Function Documentation

◆ IsOnSameSide()

bool npc_boss_gothik_minion::npc_boss_gothik_minionAI::IsOnSameSide ( Unit const *  who) const
inline
496{ return livingSide == IN_LIVE_SIDE(who); }

References IN_LIVE_SIDE, and livingSide.

◆ JustDied()

void npc_boss_gothik_minion::npc_boss_gothik_minionAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CombatAI.

535 {
536 switch (me->GetEntry())
537 {
540 break;
543 break;
544 case NPC_LIVING_RIDER:
546 break;
547 }
548 }
@ NPC_LIVING_RIDER
Definition boss_gothik.cpp:80
@ NPC_LIVING_KNIGHT
Definition boss_gothik.cpp:79
@ NPC_LIVING_TRAINEE
Definition boss_gothik.cpp:78
@ SPELL_ANCHOR_1_DK
Definition boss_gothik.cpp:51
@ SPELL_ANCHOR_1_TRAINEE
Definition boss_gothik.cpp:50
@ SPELL_ANCHOR_1_RIDER
Definition boss_gothik.cpp:52
uint32 GetEntry() const
Definition Object.h:115
SpellCastResult DoCastAOE(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:248

References UnitAI::DoCastAOE(), Object::GetEntry(), CreatureAI::me, NPC_LIVING_KNIGHT, NPC_LIVING_RIDER, NPC_LIVING_TRAINEE, SPELL_ANCHOR_1_DK, SPELL_ANCHOR_1_RIDER, and SPELL_ANCHOR_1_TRAINEE.

◆ JustEngagedWith()

void npc_boss_gothik_minion::npc_boss_gothik_minionAI::JustEngagedWith ( Unit who)
inlineoverridevirtual

Called for reaction when initially engaged.

Parameters
whoWho 'me' Engaged combat with

Reimplemented from CombatAI.

506 {
507 switch (me->GetEntry())
508 {
510 events.ScheduleEvent(EVENT_DEATH_PLAGUE, 3s);
511 break;
512 case NPC_DEAD_TRAINEE:
513 events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 2500ms);
514 break;
516 events.ScheduleEvent(EVENT_SHADOW_MARK, 3s);
517 break;
518 case NPC_DEAD_KNIGHT:
519 events.ScheduleEvent(EVENT_WHIRLWIND, 2s);
520 break;
521 case NPC_LIVING_RIDER:
522 events.ScheduleEvent(EVENT_SHADOW_BOLT_VOLLEY, 3s);
523 break;
524 case NPC_DEAD_RIDER:
525 events.ScheduleEvent(EVENT_DRAIN_LIFE, 2000ms, 3500ms);
526 events.ScheduleEvent(EVENT_UNHOLY_FRENZY, 5s, 9s);
527 break;
528 case NPC_DEAD_HORSE:
529 events.ScheduleEvent(EVENT_STOMP, 2s, 5s);
530 break;
531 }
532 }
@ NPC_DEAD_HORSE
Definition boss_gothik.cpp:83
@ NPC_DEAD_TRAINEE
Definition boss_gothik.cpp:81
@ NPC_DEAD_RIDER
Definition boss_gothik.cpp:84
@ NPC_DEAD_KNIGHT
Definition boss_gothik.cpp:82
@ EVENT_SHADOW_MARK
Definition boss_gothik.cpp:102
@ EVENT_DRAIN_LIFE
Definition boss_gothik.cpp:108
@ EVENT_SHADOW_BOLT_VOLLEY
Definition boss_gothik.cpp:106
@ EVENT_UNHOLY_FRENZY
Definition boss_gothik.cpp:109
@ EVENT_WHIRLWIND
Definition boss_gothik.cpp:104
@ EVENT_ARCANE_EXPLOSION
Definition boss_gothik.cpp:100
@ EVENT_STOMP
Definition boss_gothik.cpp:111
@ EVENT_DEATH_PLAGUE
Definition boss_gothik.cpp:98
events
Definition boss_sartura.cpp:43

References EVENT_ARCANE_EXPLOSION, EVENT_DEATH_PLAGUE, EVENT_DRAIN_LIFE, EVENT_SHADOW_BOLT_VOLLEY, EVENT_SHADOW_MARK, EVENT_STOMP, EVENT_UNHOLY_FRENZY, EVENT_WHIRLWIND, Object::GetEntry(), CreatureAI::me, NPC_DEAD_HORSE, NPC_DEAD_KNIGHT, NPC_DEAD_RIDER, NPC_DEAD_TRAINEE, NPC_LIVING_KNIGHT, NPC_LIVING_RIDER, and NPC_LIVING_TRAINEE.

◆ KilledUnit()

void npc_boss_gothik_minion::npc_boss_gothik_minionAI::KilledUnit ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

551 {
552 if (who->IsPlayer())
554 }
void StorePersistentData(uint32 index, uint32 data)
Definition InstanceScript.cpp:422
bool IsPlayer() const
Definition Object.h:200
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1203
@ PERSISTENT_DATA_IMMORTAL_FAIL
Definition naxxramas.h:88

References WorldObject::GetInstanceScript(), Object::IsPlayer(), CreatureAI::me, PERSISTENT_DATA_IMMORTAL_FAIL, and InstanceScript::StorePersistentData().

◆ Reset()

void npc_boss_gothik_minion::npc_boss_gothik_minionAI::Reset ( )
inlineoverridevirtual

Reimplemented from CombatAI.

499 {
501 me->SetNoCallAssistance(false);
502 events.Reset();
503 }
@ REACT_AGGRESSIVE
Definition Unit.h:550
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:95
void SetNoCallAssistance(bool val)
Definition Creature.h:271

References CreatureAI::me, REACT_AGGRESSIVE, Creature::SetNoCallAssistance(), and Creature::SetReactState().

◆ UpdateAI()

void npc_boss_gothik_minion::npc_boss_gothik_minionAI::UpdateAI ( uint32  )
inlineoverridevirtual

Use to start attacking a target. Called just before JustEngagedWith()

Reimplemented from CombatAI.

557 {
558 events.Update(diff);
560 return;
561
562 switch (events.ExecuteEvent())
563 {
566 events.Repeat(4s, 7s);
567 break;
569 if (Unit* victim = me->GetVictim())
570 {
571 if (victim->IsWithinDist(me, 20))
572 {
573 me->CastSpell(victim, SPELL_ARCANE_EXPLOSION, false);
574 }
575 }
576 events.Repeat(2500ms);
577 break;
579 if (Unit* victim = me->GetVictim())
580 {
581 if (victim->IsWithinDist(me, 10))
582 {
583 me->CastSpell(victim, SPELL_SHADOW_MARK, false);
584 }
585 }
586 events.Repeat(5s, 7s);
587 break;
588 case EVENT_WHIRLWIND:
589 if (Unit* victim = me->GetVictim())
590 {
591 if (victim->IsWithinDist(me, 10))
592 {
593 me->CastSpell(victim, SPELL_WHIRLWIND, false);
594 }
595 }
596 events.Repeat(4s, 6s);
597 break;
600 events.Repeat(5s);
601 break;
602 case EVENT_DRAIN_LIFE:
603 if (Unit* victim = me->GetVictim())
604 {
605 if (victim->IsWithinDist(me, 20))
606 {
607 me->CastSpell(victim, SPELL_DRAIN_LIFE, false);
608 }
609 }
610 events.Repeat(8s, 12s);
611 break;
614 events.Repeat(15s, 17s);
615 break;
616 case EVENT_STOMP:
617 if (Unit* victim = me->GetVictim())
618 {
619 if (victim->IsWithinDist(me, 10))
620 {
621 me->CastSpell(victim, SPELL_STOMP, false);
622 }
623 }
624 events.Repeat(4s, 9s);
625 break;
626 }
628 }
@ UNIT_STATE_CASTING
Definition UnitDefines.h:185
@ SPELL_STOMP
Definition boss_gothik.cpp:73
@ SPELL_SHADOW_BOLT_VOLLEY
Definition boss_gothik.cpp:68
@ SPELL_UNHOLY_FRENZY
Definition boss_gothik.cpp:71
@ SPELL_DEATH_PLAGUE
Definition boss_gothik.cpp:60
@ SPELL_ARCANE_EXPLOSION
Definition boss_gothik.cpp:62
@ SPELL_SHADOW_MARK
Definition boss_gothik.cpp:64
@ SPELL_WHIRLWIND
Definition boss_gothik.cpp:66
@ SPELL_DRAIN_LIFE
Definition boss_gothik.cpp:70
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:39
Definition Unit.h:636
Aura * AddAura(uint32 spellId, Unit *target)
Definition Unit.cpp:18915
uint32 GetUnitState() const
Definition Unit.h:709
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1178
Unit * GetVictim() const
Definition Unit.h:862

References Unit::AddAura(), Unit::CastSpell(), UnitAI::DoMeleeAttackIfReady(), EVENT_ARCANE_EXPLOSION, EVENT_DEATH_PLAGUE, EVENT_DRAIN_LIFE, EVENT_SHADOW_BOLT_VOLLEY, EVENT_SHADOW_MARK, EVENT_STOMP, EVENT_UNHOLY_FRENZY, EVENT_WHIRLWIND, Unit::GetUnitState(), Unit::GetVictim(), CreatureAI::me, SPELL_ARCANE_EXPLOSION, SPELL_DEATH_PLAGUE, SPELL_DRAIN_LIFE, SPELL_SHADOW_BOLT_VOLLEY, SPELL_SHADOW_MARK, SPELL_STOMP, SPELL_UNHOLY_FRENZY, SPELL_WHIRLWIND, and UNIT_STATE_CASTING.

Member Data Documentation

◆ events

EventMap npc_boss_gothik_minion::npc_boss_gothik_minionAI::events

◆ livingSide

bool npc_boss_gothik_minion::npc_boss_gothik_minionAI::livingSide

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