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
298{ return _targetGUID; }
ObjectGuid _targetGUID
Definition: ThreatMgr.h:295

References _targetGUID.

Referenced by Unit::GetRedirectThreatTarget().

◆ GetThreatPct()

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

References _threatPct.

Referenced by Unit::GetRedirectThreatPercent().

◆ ModifyThreatPct()

void RedirectThreatInfo::ModifyThreatPct ( int32  amount)
inline
308 {
309 amount += _threatPct;
310 _threatPct = uint32(std::max(0, amount));
311 }
std::uint32_t uint32
Definition: Define.h:107

References _threatPct.

Referenced by Unit::ModifyRedirectThreat().

◆ Set()

void RedirectThreatInfo::Set ( ObjectGuid  guid,
uint32  pct 
)
inline
302 {
303 _targetGUID = guid;
304 _threatPct = pct;
305 }

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 }

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