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
391 : m_healer(_healer), m_target(_target), m_heal(_heal), m_spellInfo(_spellInfo), m_schoolMask(_schoolMask)
392 {
393 m_absorb = 0;
394 m_effectiveHeal = 0;
395 }
uint32 m_effectiveHeal
Definition Unit.h:385
uint32 m_absorb
Definition Unit.h:386
Unit *const m_target
Definition Unit.h:383
SpellInfo const *const m_spellInfo
Definition Unit.h:387
Unit *const m_healer
Definition Unit.h:382
uint32 m_heal
Definition Unit.h:384
SpellSchoolMask const m_schoolMask
Definition Unit.h:388

References m_absorb, and m_effectiveHeal.

Member Function Documentation

◆ AbsorbHeal()

void HealInfo::AbsorbHeal ( uint32  amount)
inline
398 {
399 amount = std::min(amount, GetHeal());
400 m_absorb += amount;
401 m_heal -= amount;
402
403 amount = std::min(amount, GetEffectiveHeal());
404 m_effectiveHeal -= amount;
405 }
uint32 GetEffectiveHeal() const
Definition Unit.h:420
uint32 GetHeal() const
Definition Unit.h:419

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
417{ return m_healer; }

References m_healer.

Referenced by Unit::HealBySpell().

◆ GetSchoolMask()

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

References m_schoolMask.

◆ GetSpellInfo()

◆ GetTarget()

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

References m_target.

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

◆ SetEffectiveHeal()

void HealInfo::SetEffectiveHeal ( uint32  amount)
inline
413 {
414 m_effectiveHeal = amount;
415 }

References m_effectiveHeal.

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

◆ SetHeal()

void HealInfo::SetHeal ( uint32  amount)
inline
408 {
409 m_heal = amount;
410 }

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


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