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

Builder for creating HealInfoStub instances with fluent API. More...

#include "DamageHealInfoStub.h"

Public Member Functions

 HealInfoStubBuilder ()=default
 
HealInfoStubBuilderWithHeal (uint32_t heal)
 
HealInfoStubBuilderWithEffectiveHeal (uint32_t effectiveHeal)
 
HealInfoStubBuilderWithOverheal (uint32_t overheal)
 
HealInfoStubBuilderWithAbsorb (uint32_t absorb)
 
HealInfoStubBuilderWithSpellInfo (SpellInfo const *spellInfo)
 
HealInfoStubBuilderWithHitMask (uint32_t hitMask)
 
HealInfoStub Build ()
 

Private Attributes

HealInfoStub _stub
 

Detailed Description

Builder for creating HealInfoStub instances with fluent API.

Constructor & Destructor Documentation

◆ HealInfoStubBuilder()

HealInfoStubBuilder::HealInfoStubBuilder ( )
default

Member Function Documentation

◆ Build()

HealInfoStub HealInfoStubBuilder::Build ( )
inline
253{ return _stub; }
HealInfoStub _stub
Definition DamageHealInfoStub.h:256

References _stub.

◆ WithAbsorb()

HealInfoStubBuilder & HealInfoStubBuilder::WithAbsorb ( uint32_t  absorb)
inline
236 {
237 _stub.SetAbsorb(absorb);
238 return *this;
239 }
void SetAbsorb(uint32_t absorb)
Definition DamageHealInfoStub.h:116

References _stub, and HealInfoStub::SetAbsorb().

◆ WithEffectiveHeal()

HealInfoStubBuilder & HealInfoStubBuilder::WithEffectiveHeal ( uint32_t  effectiveHeal)
inline
219 {
220 _stub.SetEffectiveHeal(effectiveHeal);
221 return *this;
222 }
void SetEffectiveHeal(uint32_t effectiveHeal)
Definition DamageHealInfoStub.h:115

References _stub, and HealInfoStub::SetEffectiveHeal().

◆ WithHeal()

HealInfoStubBuilder & HealInfoStubBuilder::WithHeal ( uint32_t  heal)
inline
212 {
213 _stub.SetHeal(heal);
214 _stub.SetEffectiveHeal(heal); // Assume all effective unless overridden
215 return *this;
216 }
void SetHeal(uint32_t heal)
Definition DamageHealInfoStub.h:114

References _stub, HealInfoStub::SetEffectiveHeal(), and HealInfoStub::SetHeal().

◆ WithHitMask()

HealInfoStubBuilder & HealInfoStubBuilder::WithHitMask ( uint32_t  hitMask)
inline
248 {
249 _stub.SetHitMask(hitMask);
250 return *this;
251 }
void SetHitMask(uint32_t hitMask)
Definition DamageHealInfoStub.h:124

References _stub, and HealInfoStub::SetHitMask().

◆ WithOverheal()

HealInfoStubBuilder & HealInfoStubBuilder::WithOverheal ( uint32_t  overheal)
inline
225 {
226 // Overheal = Heal - EffectiveHeal
227 // So EffectiveHeal = Heal - Overheal
228 if (_stub.GetHeal() >= overheal)
229 {
230 _stub.SetEffectiveHeal(_stub.GetHeal() - overheal);
231 }
232 return *this;
233 }
uint32_t GetHeal() const
Definition DamageHealInfoStub.h:109

References _stub, HealInfoStub::GetHeal(), and HealInfoStub::SetEffectiveHeal().

◆ WithSpellInfo()

HealInfoStubBuilder & HealInfoStubBuilder::WithSpellInfo ( SpellInfo const *  spellInfo)
inline
242 {
243 _stub.SetSpellInfo(spellInfo);
244 return *this;
245 }
void SetSpellInfo(SpellInfo const *spellInfo)
Definition DamageHealInfoStub.h:120

References _stub, and HealInfoStub::SetSpellInfo().

Member Data Documentation

◆ _stub

HealInfoStub HealInfoStubBuilder::_stub
private

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