aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorPeter Keresztes Schmidt <carbenium@outlook.com>2020-07-15 10:22:29 +0200
committerShauren <shauren.trinity@gmail.com>2022-01-23 18:05:59 +0100
commit770fbcca0cae18faac981a326d73996afc20b9ba (patch)
tree2e173ff2e397e56975cb37a10ec11119ec3af41f /src/server/game/Spells/Spell.cpp
parentcd86a015c46f8da581f86857e313d9c596dba7fa (diff)
Core/Misc: Replace boost::optional with std::optional (#25047)
C++17 is already mandatory, so it's a safe thing to do (cherry picked from commit 202fd41389973322f63186fd8e5a368fce3e1b04)
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 43c9b441e7a..53213475be5 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -175,7 +175,7 @@ void SpellCastTargets::Write(WorldPackets::Spells::SpellTargetData& data)
if (m_targetMask & TARGET_FLAG_SOURCE_LOCATION)
{
- data.SrcLocation = boost::in_place();
+ data.SrcLocation.emplace();
data.SrcLocation->Transport = m_src._transportGUID; // relative position guid here - transport for example
if (!m_src._transportGUID.IsEmpty())
data.SrcLocation->Location = m_src._transportOffset;
@@ -185,7 +185,7 @@ void SpellCastTargets::Write(WorldPackets::Spells::SpellTargetData& data)
if (m_targetMask & TARGET_FLAG_DEST_LOCATION)
{
- data.DstLocation = boost::in_place();
+ data.DstLocation.emplace();
data.DstLocation->Transport = m_dst._transportGUID; // relative position guid here - transport for example
if (!m_dst._transportGUID.IsEmpty())
data.DstLocation->Location = m_dst._transportOffset;
@@ -4479,7 +4479,7 @@ void Spell::SendSpellStart()
if (castFlags & CAST_FLAG_RUNE_LIST) // rune cooldowns list
{
- castData.RemainingRunes = boost::in_place();
+ castData.RemainingRunes.emplace();
//TODO: There is a crash caused by a spell with CAST_FLAG_RUNE_LIST casted by a creature
//The creature is the mover of a player, so HandleCastSpellOpcode uses it as the caster
@@ -4593,7 +4593,7 @@ void Spell::SendSpellGo()
if (castFlags & CAST_FLAG_RUNE_LIST) // rune cooldowns list
{
- castData.RemainingRunes = boost::in_place();
+ castData.RemainingRunes.emplace();
Player* player = ASSERT_NOTNULL(m_caster->ToPlayer());
castData.RemainingRunes->Start = m_runesState; // runes state before