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

#include "Unit.h"

Public Member Functions

 HealInfo (Unit *_healer, Unit *_target, uint32 _heal, SpellInfo const *_spellInfo, SpellSchoolMask _schoolMask)
 
void AbsorbHeal (uint32 amount)
 
void SetHeal (uint32 amount)
 
UnitGetHealer () const
 
UnitGetTarget () const
 
uint32 GetHeal () const
 
uint32 GetAbsorb () const
 
SpellInfo const * GetSpellInfo () const
 
SpellSchoolMask GetSchoolMask () const
 

Private Attributes

Unit *const m_healer
 
Unit *const m_target
 
uint32 m_heal
 
uint32 m_absorb
 
SpellInfo const *const m_spellInfo
 
SpellSchoolMask const m_schoolMask
 

Detailed Description

Constructor & Destructor Documentation

◆ HealInfo()

HealInfo::HealInfo ( Unit _healer,
Unit _target,
uint32  _heal,
SpellInfo const *  _spellInfo,
SpellSchoolMask  _schoolMask 
)
inlineexplicit
814 : m_healer(_healer), m_target(_target), m_heal(_heal), m_spellInfo(_spellInfo), m_schoolMask(_schoolMask)
815 {
816 m_absorb = 0;
817 }
uint32 m_absorb
Definition: Unit.h:809
Unit *const m_target
Definition: Unit.h:807
SpellInfo const *const m_spellInfo
Definition: Unit.h:810
Unit *const m_healer
Definition: Unit.h:806
uint32 m_heal
Definition: Unit.h:808
SpellSchoolMask const m_schoolMask
Definition: Unit.h:811

References m_absorb.

Member Function Documentation

◆ AbsorbHeal()

void HealInfo::AbsorbHeal ( uint32  amount)
inline
819 {
820 amount = std::min(amount, GetHeal());
821 m_absorb += amount;
822 m_heal -= amount;
823 }
uint32 GetHeal() const
Definition: Unit.h:832

References GetHeal(), m_absorb, and m_heal.

Referenced by Unit::CalcHealAbsorb().

◆ GetAbsorb()

uint32 HealInfo::GetAbsorb ( ) const
inline
833{ return m_absorb; }

References m_absorb.

Referenced by AuraEffect::HandlePeriodicHealAurasTick(), and Unit::HealBySpell().

◆ GetHeal()

◆ GetHealer()

Unit * HealInfo::GetHealer ( ) const
inline
830{ return m_healer; }

References m_healer.

Referenced by Unit::HealBySpell().

◆ GetSchoolMask()

SpellSchoolMask HealInfo::GetSchoolMask ( ) const
inline
835{ return m_schoolMask; };

References m_schoolMask.

◆ GetSpellInfo()

SpellInfo const * HealInfo::GetSpellInfo ( ) const
inline

◆ GetTarget()

Unit * HealInfo::GetTarget ( ) const
inline
831{ return m_target; }

References m_target.

Referenced by Unit::CalcHealAbsorb(), and Unit::HealBySpell().

◆ SetHeal()

void HealInfo::SetHeal ( uint32  amount)
inline
826 {
827 m_heal = amount;
828 }

References m_heal.

Referenced by Unit::HealBySpell().

Member Data Documentation

◆ m_absorb

uint32 HealInfo::m_absorb
private

Referenced by AbsorbHeal(), GetAbsorb(), and HealInfo().

◆ m_heal

uint32 HealInfo::m_heal
private

Referenced by AbsorbHeal(), GetHeal(), and SetHeal().

◆ m_healer

Unit* const HealInfo::m_healer
private

Referenced by GetHealer().

◆ m_schoolMask

SpellSchoolMask const HealInfo::m_schoolMask
private

Referenced by GetSchoolMask().

◆ m_spellInfo

SpellInfo const* const HealInfo::m_spellInfo
private

Referenced by GetSpellInfo().

◆ m_target

Unit* const HealInfo::m_target
private

Referenced by GetTarget().