diff options
| author | Shauren <shauren.trinity@gmail.com> | 2022-01-23 20:31:52 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-01-23 20:31:52 +0100 |
| commit | 596bf2b77218e6b959c1bf7de848c6f09d5a91f0 (patch) | |
| tree | a129c1cf5e01ce8ba04d70348a01790b14105bf2 /src/server/game/Spells/Spell.cpp | |
| parent | 770fbcca0cae18faac981a326d73996afc20b9ba (diff) | |
Core/Misc: Replace boost::optional with std::optional part 2
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 53213475be5..1a4d6c373da 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3049,7 +3049,7 @@ void Spell::DoSpellEffectHit(Unit* unit, SpellEffectInfo const& spellEffectInfo, } } else - hitInfo.AuraDuration = m_spellValue->Duration.get(); + hitInfo.AuraDuration = *m_spellValue->Duration; if (hitInfo.AuraDuration != hitInfo.HitAura->GetMaxDuration()) { @@ -3750,7 +3750,7 @@ void Spell::handle_immediate() m_caster->ModSpellDurationTime(m_spellInfo, duration, this); } else - duration = m_spellValue->Duration.get(); + duration = *m_spellValue->Duration; m_channeledDuration = duration; SendChannelStart(duration); @@ -4900,7 +4900,7 @@ void Spell::SendChannelStart(uint32 duration) if (schoolImmunityMask || mechanicImmunityMask) { - spellChannelStart.InterruptImmunities = boost::in_place(); + spellChannelStart.InterruptImmunities.emplace(); spellChannelStart.InterruptImmunities->SchoolImmunities = schoolImmunityMask; spellChannelStart.InterruptImmunities->Immunities = mechanicImmunityMask; } @@ -7516,7 +7516,7 @@ void Spell::DelayedChannel() bool Spell::HasPowerTypeCost(Powers power) const { - return GetPowerTypeCostAmount(power).is_initialized(); + return GetPowerTypeCostAmount(power).has_value(); } Optional<int32> Spell::GetPowerTypeCostAmount(Powers power) const |
