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
384 : m_healer(_healer), m_target(_target), m_heal(_heal), m_spellInfo(_spellInfo), m_schoolMask(_schoolMask)
385 {
386 m_absorb = 0;
387 m_effectiveHeal = 0;
388 }
uint32 m_effectiveHeal
Definition: Unit.h:378
uint32 m_absorb
Definition: Unit.h:379
Unit *const m_target
Definition: Unit.h:376
SpellInfo const *const m_spellInfo
Definition: Unit.h:380
Unit *const m_healer
Definition: Unit.h:375
uint32 m_heal
Definition: Unit.h:377
SpellSchoolMask const m_schoolMask
Definition: Unit.h:381

References m_absorb, and m_effectiveHeal.

Member Function Documentation

◆ AbsorbHeal()

void HealInfo::AbsorbHeal ( uint32  amount)
inline
391 {
392 amount = std::min(amount, GetHeal());
393 m_absorb += amount;
394 m_heal -= amount;
395
396 amount = std::min(amount, GetEffectiveHeal());
397 m_effectiveHeal -= amount;
398 }
uint32 GetEffectiveHeal() const
Definition: Unit.h:413
uint32 GetHeal() const
Definition: Unit.h:412

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

References m_healer.

Referenced by Unit::HealBySpell().

◆ GetSchoolMask()

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

References m_schoolMask.

◆ GetSpellInfo()

◆ GetTarget()

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

References m_target.

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

◆ SetEffectiveHeal()

void HealInfo::SetEffectiveHeal ( uint32  amount)
inline
406 {
407 m_effectiveHeal = amount;
408 }

References m_effectiveHeal.

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

◆ SetHeal()

void HealInfo::SetHeal ( uint32  amount)
inline
401 {
402 m_heal = amount;
403 }

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