TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GridNotifiers.cpp File Reference
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "UpdateData.h"
#include "Transport.h"
#include "ObjectAccessor.h"
#include "CellImpl.h"
+ Include dependency graph for GridNotifiers.cpp:

Functions

void CreatureUnitRelocationWorker (Creature *c, Unit *u)
 

Function Documentation

void CreatureUnitRelocationWorker ( Creature c,
Unit u 
)
inline
130 {
131  if (!u->IsAlive() || !c->IsAlive() || c == u || u->IsInFlight())
132  return;
133 
135  {
136  if (c->IsAIEnabled && c->CanSeeOrDetect(u, false, true))
137  c->AI()->MoveInLineOfSight_Safe(u);
138  else
139  if (u->GetTypeId() == TYPEID_PLAYER && u->HasStealthAura() && c->IsAIEnabled && c->CanSeeOrDetect(u, false, true, true))
140  c->AI()->TriggerAlert(u);
141  }
142 }
bool HasStealthAura() const
Definition: Unit.h:1597
Definition: Unit.h:1131
bool IsInFlight() const
Definition: Unit.h:1582
bool HasReactState(ReactStates state) const
Definition: Creature.h:504
bool IsTrigger() const
Definition: Creature.h:496
bool IsAIEnabled
Definition: Unit.h:2161
TypeID GetTypeId() const
Definition: Object.h:113
void TriggerAlert(Unit const *who) const
Definition: CreatureAI.cpp:145
bool IsAlive() const
Definition: Unit.h:1692
CreatureAI * AI() const
Definition: Creature.h:525
void MoveInLineOfSight_Safe(Unit *who)
== Reactions At =================================
Definition: CreatureAI.cpp:119
Definition: Unit.h:589
Definition: ObjectGuid.h:33
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1395
bool CanSeeOrDetect(WorldObject const *obj, bool ignoreStealth=false, bool distanceCheck=false, bool checkAlert=false) const
Definition: Object.cpp:1940

+ Here is the call graph for this function:

+ Here is the caller graph for this function: