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

Public Member Functions

 npc_webwrapAI (Creature *creature)
 
void InitializeAI () override
 
void SetGUID (ObjectGuid guid, int32) override
 
void UpdateAI (uint32 diff) override
 
void JustDied (Unit *) override
 
- Public Member Functions inherited from NullCreatureAI
 NullCreatureAI (Creature *c)
 
void MoveInLineOfSight (Unit *) override
 
void AttackStart (Unit *) override
 
void EnterEvadeMode (EvadeReason) override
 
void OnCharmed (bool) override
 
- 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 EnterCombat (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
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 Reset ()
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
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 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, 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

ObjectGuid victimGUID
 
uint32 visibleTimer
 

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 NullCreatureAI
static int Permissible (const Creature *)
 
- 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

npc_webwrap::npc_webwrapAI::npc_webwrapAI ( Creature creature)
inline
201 : NullCreatureAI(creature), visibleTimer(0) { }
uint32 visibleTimer
Definition: boss_maexxna.cpp:204
NullCreatureAI(Creature *c)
Definition: PassiveAI.cpp:24

Member Function Documentation

void npc_webwrap::npc_webwrapAI::InitializeAI ( )
inlineoverridevirtual

Reimplemented from UnitAI.

207  {
208  me->SetVisible(false);
209  }
Creature *const me
Definition: CreatureAI.h:71
void SetVisible(bool x)
Definition: Unit.cpp:10368

+ Here is the call graph for this function:

void npc_webwrap::npc_webwrapAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

238  {
239  if (!victimGUID.IsEmpty())
240  if (Unit* victim = ObjectAccessor::GetUnit(*me, victimGUID))
241  victim->RemoveAurasDueToSpell(SPELL_WEB_WRAP, me->GetGUID());
242 
244  }
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
Definition: Creature.cpp:1774
Definition: boss_maexxna.cpp:26
ObjectGuid victimGUID
Definition: boss_maexxna.cpp:203
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
Creature *const me
Definition: CreatureAI.h:71
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: Common.h:103
Definition: Unit.h:1305
bool IsEmpty() const
Definition: ObjectGuid.h:242

+ Here is the call graph for this function:

void npc_webwrap::npc_webwrapAI::SetGUID ( ObjectGuid  guid,
int32   
)
inlineoverridevirtual

Reimplemented from UnitAI.

212  {
213  if (!guid)
214  return;
215  victimGUID = guid;
216  if (Unit* victim = ObjectAccessor::GetUnit(*me, victimGUID))
217  {
219  victim->CastSpell(victim, SPELL_WEB_WRAP, true, NULL, NULL, me->GetGUID());
220  }
221  }
Definition: boss_maexxna.cpp:26
ObjectGuid victimGUID
Definition: boss_maexxna.cpp:203
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
arena_t NULL
Definition: jemalloc_internal.h:624
Creature *const me
Definition: CreatureAI.h:71
uint32 visibleTimer
Definition: boss_maexxna.cpp:204
ObjectGuid const & GetGUID() const
Definition: Object.h:105
float GetDistance2d(WorldObject const *obj) const
Definition: Object.cpp:1612
Definition: Common.h:103
const float WEB_WRAP_MOVE_SPEED
Definition: boss_maexxna.cpp:70
Definition: Unit.h:1305

+ Here is the call graph for this function:

void npc_webwrap::npc_webwrapAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from NullCreatureAI.

224  {
225  if (!visibleTimer)
226  return;
227 
228  if (diff >= visibleTimer)
229  {
230  visibleTimer = 0;
231  me->SetVisible(true);
232  }
233  else
234  visibleTimer -= diff;
235  }
Creature *const me
Definition: CreatureAI.h:71
void SetVisible(bool x)
Definition: Unit.cpp:10368
uint32 visibleTimer
Definition: boss_maexxna.cpp:204

+ Here is the call graph for this function:

Member Data Documentation

ObjectGuid npc_webwrap::npc_webwrapAI::victimGUID
uint32 npc_webwrap::npc_webwrapAI::visibleTimer

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