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

#include <Unit.h>

Public Member Functions

 RedirectThreatInfo ()
 
ObjectGuid GetTargetGUID () const
 
uint32 GetThreatPct () const
 
void Set (ObjectGuid guid, uint32 pct)
 
void ModifyThreatPct (int32 amount)
 

Public Attributes

ObjectGuid _targetGUID
 
uint32 _threatPct
 

Constructor & Destructor Documentation

RedirectThreatInfo::RedirectThreatInfo ( )
inline
1079 : _threatPct(0) { }
uint32 _threatPct
Definition: Unit.h:1081

Member Function Documentation

ObjectGuid RedirectThreatInfo::GetTargetGUID ( ) const
inline
1083 { return _targetGUID; }
ObjectGuid _targetGUID
Definition: Unit.h:1080

+ Here is the caller graph for this function:

uint32 RedirectThreatInfo::GetThreatPct ( ) const
inline
1084 { return _threatPct; }
uint32 _threatPct
Definition: Unit.h:1081
void RedirectThreatInfo::ModifyThreatPct ( int32  amount)
inline
1093  {
1094  amount += _threatPct;
1095  _threatPct = uint32(std::max(0, amount));
1096  }
T max(const T &x, const T &y)
Definition: g3dmath.h:320
uint32_t uint32
Definition: g3dmath.h:168
uint32 _threatPct
Definition: Unit.h:1081

+ Here is the call graph for this function:

void RedirectThreatInfo::Set ( ObjectGuid  guid,
uint32  pct 
)
inline
1087  {
1088  _targetGUID = guid;
1089  _threatPct = pct;
1090  }
ObjectGuid _targetGUID
Definition: Unit.h:1080
uint32 _threatPct
Definition: Unit.h:1081

Member Data Documentation

ObjectGuid RedirectThreatInfo::_targetGUID
uint32 RedirectThreatInfo::_threatPct

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