TrinityCore
ReactorAI Class Reference

#include <ReactorAI.h>

Public Member Functions

 ReactorAI (Creature *c)
 
void MoveInLineOfSight (Unit *) override
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from CreatureAI
 CreatureAI (Creature *creature)
 
virtual ~CreatureAI ()
 
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void JustSummonedGameobject (GameObject *)
 
virtual void SummonedGameobjectDespawn (GameObject *)
 
virtual void JustRegisteredDynObject (DynamicObject *)
 
virtual void JustUnregisteredDynObject (DynamicObject *)
 
virtual void JustRegisteredAreaTrigger (AreaTrigger *)
 
virtual void JustUnregisteredAreaTrigger (AreaTrigger *)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHit (GameObject *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (GameObject *, SpellInfo const *)
 
virtual bool IsEscorted () const
 
virtual void JustAppeared ()
 
virtual void MovementInform (uint32, uint32)
 
void OnCharmed (bool apply) override
 
virtual void OnSpellCastInterrupt (SpellInfo const *)
 
virtual void OnSuccessfulSpellCast (SpellInfo const *)
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual Optional< QuestGiverStatusGetDialogStatus (Player *player)
 == Gossip system ================================ More...
 
virtual bool GossipHello (Player *)
 
virtual bool GossipSelect (Player *, uint32, uint32)
 
virtual bool GossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void QuestAccept (Player *, Quest const *)
 
virtual void QuestReward (Player *, Quest const *, LootItemType, uint32)
 
virtual void WaypointPathStarted (uint32)
 == Waypoints system ============================= More...
 
virtual void WaypointStarted (uint32, uint32)
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, uint32)
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual void OnSpellClick (Unit *, bool)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual PlayerAIGetAIForCharmedPlayer (Player *)
 
virtual bool IsEscortNPC (bool) const
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectAggroTarget targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectAggroTarget targetType, uint32 offset, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit *> &targetList, uint32 num, SelectAggroTarget targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit *> &targetList, uint32 num, SelectAggroTarget targetType, uint32 offset, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 
virtual void JustExitedCombat ()
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &)
 
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, CastSpellExtraArgs const &args={})
 
void DoCastSelf (uint32 spellId, CastSpellExtraArgs const &args={})
 
void DoCastVictim (uint32 spellId, CastSpellExtraArgs const &args={})
 
void DoCastAOE (uint32 spellId, CastSpellExtraArgs const &args={})
 
virtual bool ShouldSparWith (Unit const *) const
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spellId)
 
virtual void OnGameEvent (bool, uint16)
 

Static Public Member Functions

static int32 Permissible (Creature const *creature)
 
- 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 ()
 

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES, EVADE_REASON_BOUNDARY, EVADE_REASON_NO_PATH, EVADE_REASON_SEQUENCE_BREAK,
  EVADE_REASON_OTHER
}
 
- Static Public Attributes inherited from UnitAI
static std::unordered_map< std::pair< uint32, Difficulty >, AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
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 _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Constructor & Destructor Documentation

◆ ReactorAI()

ReactorAI::ReactorAI ( Creature c)
inlineexplicit
27 : CreatureAI(c) { }
CreatureAI(Creature *creature)
Definition: CreatureAI.cpp:51

Member Function Documentation

◆ MoveInLineOfSight()

void ReactorAI::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

29 { }
+ Here is the call graph for this function:

◆ Permissible()

int32 ReactorAI::Permissible ( Creature const *  creature)
static
22 {
23  if (creature->IsCivilian() || creature->IsNeutralToAll())
24  return PERMIT_BASE_REACTIVE;
25 
26  return PERMIT_BASE_NO;
27 }
Definition: CreatureAI.h:241
Definition: CreatureAI.h:239
+ Here is the call graph for this function:

◆ UpdateAI()

void ReactorAI::UpdateAI ( uint32  diff)
overridevirtual

Implements UnitAI.

30 {
31  if (!UpdateVictim())
32  return;
33 
35 }
bool UpdateVictim()
Definition: CreatureAI.cpp:197
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:57
+ Here is the call graph for this function:

The documentation for this class was generated from the following files: