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)
 
void SetEffectiveHeal (uint32 amount)
 
UnitGetHealer () const
 
UnitGetTarget () const
 
uint32 GetHeal () const
 
uint32 GetEffectiveHeal () 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_effectiveHeal
 
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
815 : m_healer(_healer), m_target(_target), m_heal(_heal), m_spellInfo(_spellInfo), m_schoolMask(_schoolMask)
816 {
817 m_absorb = 0;
818 m_effectiveHeal = 0;
819 }
uint32 m_effectiveHeal
Definition: Unit.h:809
uint32 m_absorb
Definition: Unit.h:810
Unit *const m_target
Definition: Unit.h:807
SpellInfo const *const m_spellInfo
Definition: Unit.h:811
Unit *const m_healer
Definition: Unit.h:806
uint32 m_heal
Definition: Unit.h:808
SpellSchoolMask const m_schoolMask
Definition: Unit.h:812

References m_absorb, and m_effectiveHeal.

Member Function Documentation

◆ AbsorbHeal()

void HealInfo::AbsorbHeal ( uint32  amount)
inline
822 {
823 amount = std::min(amount, GetHeal());
824 m_absorb += amount;
825 m_heal -= amount;
826
827 amount = std::min(amount, GetEffectiveHeal());
828 m_effectiveHeal -= amount;
829 }
uint32 GetEffectiveHeal() const
Definition: Unit.h:844
uint32 GetHeal() const
Definition: Unit.h:843

References GetEffectiveHeal(), GetHeal(), m_absorb, m_effectiveHeal, and m_heal.

Referenced by Unit::CalcHealAbsorb().

◆ GetAbsorb()

uint32 HealInfo::GetAbsorb ( ) const
inline

◆ GetEffectiveHeal()

uint32 HealInfo::GetEffectiveHeal ( ) const
inline

◆ GetHeal()

◆ GetHealer()

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

References m_healer.

Referenced by Unit::HealBySpell().

◆ GetSchoolMask()

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

References m_schoolMask.

◆ GetSpellInfo()

◆ GetTarget()

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

References m_target.

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

◆ SetEffectiveHeal()

void HealInfo::SetEffectiveHeal ( uint32  amount)
inline
837 {
838 m_effectiveHeal = amount;
839 }

References m_effectiveHeal.

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

◆ SetHeal()

void HealInfo::SetHeal ( uint32  amount)
inline
832 {
833 m_heal = amount;
834 }

References m_heal.

Referenced by Unit::HealBySpell().

Member Data Documentation

◆ m_absorb

uint32 HealInfo::m_absorb
private

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

◆ m_effectiveHeal

uint32 HealInfo::m_effectiveHeal
private

◆ 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().