AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
RedirectThreatInfo Struct Reference

#include "ThreatMgr.h"

Public Member Functions

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

Public Attributes

ObjectGuid _targetGUID
 
uint32 _threatPct { 0 }
 

Detailed Description

Constructor & Destructor Documentation

◆ RedirectThreatInfo()

RedirectThreatInfo::RedirectThreatInfo ( )
default

Member Function Documentation

◆ GetTargetGUID()

ObjectGuid RedirectThreatInfo::GetTargetGUID ( ) const
inline
302{ return _targetGUID; }
ObjectGuid _targetGUID
Definition ThreatMgr.h:299

References _targetGUID.

Referenced by Unit::GetRedirectThreatTarget().

◆ GetThreatPct()

uint32 RedirectThreatInfo::GetThreatPct ( ) const
inline
303{ return _threatPct; }
uint32 _threatPct
Definition ThreatMgr.h:300

References _threatPct.

Referenced by Unit::GetRedirectThreatPercent().

◆ ModifyThreatPct()

void RedirectThreatInfo::ModifyThreatPct ( int32  amount)
inline
312 {
313 amount += _threatPct;
314 _threatPct = uint32(std::max(0, amount));
315 }
std::uint32_t uint32
Definition Define.h:107

References _threatPct.

Referenced by Unit::ModifyRedirectThreat().

◆ Set()

void RedirectThreatInfo::Set ( ObjectGuid  guid,
uint32  pct 
)
inline
306 {
307 _targetGUID = guid;
308 _threatPct = pct;
309 }

References _targetGUID, and _threatPct.

Referenced by Unit::SetRedirectThreat().

Member Data Documentation

◆ _targetGUID

ObjectGuid RedirectThreatInfo::_targetGUID

Referenced by GetTargetGUID(), and Set().

◆ _threatPct

uint32 RedirectThreatInfo::_threatPct { 0 }
300{ 0 };

Referenced by GetThreatPct(), ModifyThreatPct(), and Set().


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