AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
AbstractFollower Class Reference

#include "AbstractFollower.h"

Inheritance diagram for AbstractFollower:
ChaseMovementGenerator< T > FollowMovementGenerator< T > FormationMovementGenerator

Public Member Functions

 AbstractFollower (Unit *target=nullptr)
 
virtual ~AbstractFollower ()
 
void SetTarget (Unit *unit)
 
UnitGetTarget () const
 

Private Attributes

Unit_target = nullptr
 

Detailed Description

Constructor & Destructor Documentation

◆ AbstractFollower()

AbstractFollower::AbstractFollower ( Unit target = nullptr)
inlineexplicit
26{ SetTarget(target); }
void SetTarget(Unit *unit)
Definition AbstractFollower.cpp:21

References SetTarget().

◆ ~AbstractFollower()

virtual AbstractFollower::~AbstractFollower ( )
inlinevirtual
27{ SetTarget(nullptr); }

References SetTarget().

Member Function Documentation

◆ GetTarget()

Unit * AbstractFollower::GetTarget ( ) const
inline

◆ SetTarget()

void AbstractFollower::SetTarget ( Unit unit)
22{
23 if (unit == _target)
24 return;
25
26 if (_target)
28
29 _target = unit;
30 if (_target)
32}
void FollowerRemoved(AbstractFollower *f)
Definition Unit.h:1894
void FollowerAdded(AbstractFollower *f)
Definition Unit.h:1893

References _target, Unit::FollowerAdded(), and Unit::FollowerRemoved().

Referenced by AbstractFollower(), and ~AbstractFollower().

Member Data Documentation

◆ _target

Unit* AbstractFollower::_target = nullptr
private

Referenced by GetTarget(), and SetTarget().


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