Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
HostileReference Class Reference

#include <ThreatManager.h>

Inheritance diagram for HostileReference:
Collaboration diagram for HostileReference:

Public Member Functions

void addTempThreat (float threat)
void addThreat (float modThreat)
void addThreatPercent (int32 percent)
float getTempThreatModifier () const
float getThreat () const
uint64 getUnitGuid () const
 HostileReference (Unit *refUnit, ThreatManager *threatManager, float threat)
bool isAccessible () const
bool isOnline () const
HostileReferencenext ()
bool operator== (const HostileReference &hostileRef) const
void removeReference ()
void resetTempThreat ()
void setAccessibleState (bool isAccessible)
void setOnlineOfflineState (bool isOnline)
void setTempThreat (float threat)
void setThreat (float threat)
void sourceObjectDestroyLink ()
void targetObjectBuildLink ()
void targetObjectDestroyLink ()
void updateOnlineStatus ()
Public Member Functions inherited from Reference< Unit, ThreatManager >
ThreatManagerGetSource () const
UnitgetTarget () const
void invalidate ()
bool isValid () const
void link (Unit *toObj, ThreatManager *fromObj)
Reference< Unit, ThreatManager > * next ()
Reference< Unit, ThreatManager > * nocheck_next ()
Reference< Unit, ThreatManager > * nocheck_prev ()
Unitoperator-> () const
Reference< Unit, ThreatManager > * prev ()
 Reference ()
void unlink ()
virtual ~Reference ()
Public Member Functions inherited from LinkedListElement
void delink ()
bool hasNext () const
bool hasPrev () const
void insertAfter (LinkedListElement *pElem)
void insertBefore (LinkedListElement *pElem)
bool isInList () const
 LinkedListElement ()
LinkedListElementnext ()
LinkedListElement const * next () const
LinkedListElementnocheck_next ()
LinkedListElement const * nocheck_next () const
LinkedListElementnocheck_prev ()
LinkedListElement const * nocheck_prev () const
LinkedListElementprev ()
LinkedListElement const * prev () const
virtual ~LinkedListElement ()

Private Member Functions

void fireStatusChanged (ThreatRefStatusChangeEvent &threatRefStatusChangeEvent)
UnitGetSourceUnit ()

Private Attributes

bool iAccessible
bool iOnline
float iTempThreatModifier
float iThreat
uint64 iUnitGuid

Detailed Description

Definition at line 27 of file ThreatManager.h.

Constructor & Destructor Documentation

◆ HostileReference()

HostileReference::HostileReference ( Unit * refUnit,
ThreatManager * threatManager,
float threat )

Member Function Documentation

◆ addTempThreat()

void HostileReference::addTempThreat ( float threat)
inline

Definition at line 54 of file ThreatManager.h.

References addThreat(), and iTempThreatModifier.

Referenced by HostileRefManager::addTempThreat(), and setTempThreat().

◆ addThreat()

◆ addThreatPercent()

void HostileReference::addThreatPercent ( int32 percent)

◆ fireStatusChanged()

void HostileReference::fireStatusChanged ( ThreatRefStatusChangeEvent & threatRefStatusChangeEvent)
private

◆ GetSourceUnit()

Unit * HostileReference::GetSourceUnit ( )
private

Definition at line 245 of file ThreatManager.cpp.

References Reference< Unit, ThreatManager >::GetSource().

Referenced by updateOnlineStatus().

◆ getTempThreatModifier()

float HostileReference::getTempThreatModifier ( ) const
inline

Definition at line 70 of file ThreatManager.h.

References iTempThreatModifier.

Referenced by HostileRefManager::addTempThreat(), and ThreatManager::tauntApply().

◆ getThreat()

◆ getUnitGuid()

uint64 HostileReference::getUnitGuid ( ) const
inline

◆ isAccessible()

bool HostileReference::isAccessible ( ) const
inline

Definition at line 45 of file ThreatManager.h.

References iAccessible.

Referenced by setAccessibleState().

◆ isOnline()

bool HostileReference::isOnline ( ) const
inline

Definition at line 41 of file ThreatManager.h.

References iOnline.

Referenced by addThreat(), ThreatManager::processThreatEvent(), and setOnlineOfflineState().

◆ next()

◆ operator==()

bool HostileReference::operator== ( const HostileReference & hostileRef) const
inline

Definition at line 81 of file ThreatManager.h.

References getUnitGuid(), and HostileReference().

◆ removeReference()

◆ resetTempThreat()

void HostileReference::resetTempThreat ( )
inline

◆ setAccessibleState()

void HostileReference::setAccessibleState ( bool isAccessible)

◆ setOnlineOfflineState()

◆ setTempThreat()

void HostileReference::setTempThreat ( float threat)
inline

Definition at line 49 of file ThreatManager.h.

References addTempThreat(), and getThreat().

Referenced by ThreatManager::tauntApply().

◆ setThreat()

void HostileReference::setThreat ( float threat)
inline

Definition at line 35 of file ThreatManager.h.

References addThreat(), and getThreat().

Referenced by ThreatManager::resetAggro().

◆ sourceObjectDestroyLink()

void HostileReference::sourceObjectDestroyLink ( )
virtual

Implements Reference< Unit, ThreatManager >.

Definition at line 121 of file ThreatManager.cpp.

References setOnlineOfflineState().

◆ targetObjectBuildLink()

void HostileReference::targetObjectBuildLink ( )
virtual

◆ targetObjectDestroyLink()

void HostileReference::targetObjectDestroyLink ( )
virtual

◆ updateOnlineStatus()

Member Data Documentation

◆ iAccessible

bool HostileReference::iAccessible
private

Definition at line 116 of file ThreatManager.h.

Referenced by HostileReference(), isAccessible(), and setAccessibleState().

◆ iOnline

bool HostileReference::iOnline
private

Definition at line 115 of file ThreatManager.h.

Referenced by HostileReference(), isOnline(), and setOnlineOfflineState().

◆ iTempThreatModifier

float HostileReference::iTempThreatModifier
private

◆ iThreat

float HostileReference::iThreat
private

Definition at line 112 of file ThreatManager.h.

Referenced by addThreat(), addThreatPercent(), getThreat(), and HostileReference().

◆ iUnitGuid

uint64 HostileReference::iUnitGuid
private

Definition at line 114 of file ThreatManager.h.

Referenced by getUnitGuid(), and HostileReference().


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