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. More...
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *who) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
- Public Member Functions inherited from CombatAI
 CombatAI (Creature *c)
 
void InitializeAI () override
 
void Reset () override
 
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged. More...
 
void JustDied (Unit *killer) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
- 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. More...
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
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 JustEngagedWith (Unit *)
 Called for reaction when initially engaged. More...
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
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. More...
 
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 ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
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 *)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 Called when unit is charmed. More...
 
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: More...
 
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. More...
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat. More...
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 Called at any Damage to any victim (before damage apply) More...
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply) More...
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal. More...
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates. More...
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals. More...
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations. More...
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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
538 : CombatAI(c)
539 {
541 }
#define IN_LIVE_SIDE(who)
Definition: boss_gothik.cpp:174
Definition: CombatAI.h:40
Creature *const me
Definition: CreatureAI.h:73
bool livingSide
Definition: boss_gothik.cpp:543

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
544{ 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.

583 {
584 switch (me->GetEntry())
585 {
588 break;
591 break;
592 case NPC_LIVING_RIDER:
594 break;
595 }
596 }
@ 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
SpellCastResult DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:248
uint32 GetEntry() const
Definition: Object.h:112

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.

554 {
555 switch (me->GetEntry())
556 {
558 events.ScheduleEvent(EVENT_DEATH_PLAGUE, 3s);
559 break;
560 case NPC_DEAD_TRAINEE:
561 events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 2500ms);
562 break;
564 events.ScheduleEvent(EVENT_SHADOW_MARK, 3s);
565 break;
566 case NPC_DEAD_KNIGHT:
567 events.ScheduleEvent(EVENT_WHIRLWIND, 2s);
568 break;
569 case NPC_LIVING_RIDER:
570 events.ScheduleEvent(EVENT_SHADOW_BOLT_VOLLEY, 3s);
571 break;
572 case NPC_DEAD_RIDER:
573 events.ScheduleEvent(EVENT_DRAIN_LIFE, 2000ms, 3500ms);
574 events.ScheduleEvent(EVENT_UNHOLY_FRENZY, 5s, 9s);
575 break;
576 case NPC_DEAD_HORSE:
577 events.ScheduleEvent(EVENT_STOMP, 2s, 5s);
578 break;
579 }
580 }
events
Definition: boss_sartura.cpp:43
@ 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

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.

599 {
600 if (who->IsPlayer() && me->GetInstanceScript())
601 {
603 }
604 }
@ DATA_IMMORTAL_FAIL
Definition: naxxramas.h:74
bool IsPlayer() const
Definition: Object.h:197
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53

References DATA_IMMORTAL_FAIL, WorldObject::GetInstanceScript(), Object::IsPlayer(), CreatureAI::me, and ZoneScript::SetData().

◆ Reset()

void npc_boss_gothik_minion::npc_boss_gothik_minionAI::Reset ( )
inlineoverridevirtual

Reimplemented from CombatAI.

547 {
549 me->SetNoCallAssistance(false);
550 events.Reset();
551 }
@ REACT_AGGRESSIVE
Definition: Unit.h:550
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:97
void SetNoCallAssistance(bool val)
Definition: Creature.h:268

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.

607 {
608 events.Update(diff);
610 return;
611
612 switch (events.ExecuteEvent())
613 {
616 events.Repeat(4s, 7s);
617 break;
619 if (Unit* victim = me->GetVictim())
620 {
621 if (victim->IsWithinDist(me, 20))
622 {
623 me->CastSpell(victim, SPELL_ARCANE_EXPLOSION, false);
624 }
625 }
626 events.Repeat(2500ms);
627 break;
629 if (Unit* victim = me->GetVictim())
630 {
631 if (victim->IsWithinDist(me, 10))
632 {
633 me->CastSpell(victim, SPELL_SHADOW_MARK, false);
634 }
635 }
636 events.Repeat(5s, 7s);
637 break;
638 case EVENT_WHIRLWIND:
639 if (Unit* victim = me->GetVictim())
640 {
641 if (victim->IsWithinDist(me, 10))
642 {
643 me->CastSpell(victim, SPELL_WHIRLWIND, false);
644 }
645 }
646 events.Repeat(4s, 6s);
647 break;
650 events.Repeat(5s);
651 break;
652 case EVENT_DRAIN_LIFE:
653 if (Unit* victim = me->GetVictim())
654 {
655 if (victim->IsWithinDist(me, 20))
656 {
657 me->CastSpell(victim, SPELL_DRAIN_LIFE, false);
658 }
659 }
660 events.Repeat(8s, 12s);
661 break;
664 events.Repeat(15s, 17s);
665 break;
666 case EVENT_STOMP:
667 if (Unit* victim = me->GetVictim())
668 {
669 if (victim->IsWithinDist(me, 10))
670 {
671 me->CastSpell(victim, SPELL_STOMP, false);
672 }
673 }
674 events.Repeat(4s, 9s);
675 break;
676 }
678 }
@ UNIT_STATE_CASTING
Definition: UnitDefines.h:164
@ 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:630
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:18780
uint32 GetUnitState() const
Definition: Unit.h:741
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:1154
Unit * GetVictim() const
Definition: Unit.h:727

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