Core/Misc: Replace boost::optional with std::optional part 2

This commit is contained in:
Shauren
2022-01-23 20:31:52 +01:00
parent 770fbcca0c
commit 596bf2b772
77 changed files with 498 additions and 501 deletions

View File

@@ -171,10 +171,10 @@ public:
handler->SetSentErrorMessage(true);
return false;
case 1:
sWorld->SetForcedWarModeFactionBalanceState(TEAM_ALLIANCE, rewardValue.get_value_or(0));
sWorld->SetForcedWarModeFactionBalanceState(TEAM_ALLIANCE, rewardValue.value_or(0));
break;
case 2:
sWorld->SetForcedWarModeFactionBalanceState(TEAM_HORDE, rewardValue.get_value_or(0));
sWorld->SetForcedWarModeFactionBalanceState(TEAM_HORDE, rewardValue.value_or(0));
break;
case 3:
sWorld->SetForcedWarModeFactionBalanceState(TEAM_NEUTRAL);

View File

@@ -1078,7 +1078,7 @@ class spell_pal_righteous_protector : public AuraScript
else
_baseHolyPowerCost.reset();
return _baseHolyPowerCost.is_initialized();
return _baseHolyPowerCost.has_value();
}
void HandleEffectProc(AuraEffect* aurEff, ProcEventInfo& /*eventInfo*/)

View File

@@ -91,7 +91,7 @@ Optional<int32> GetFinishingMoveCPCost(Spell const* spell)
* A finishing move is a spell that cost combo points */
bool IsFinishingMove(Spell const* spell)
{
return GetFinishingMoveCPCost(spell).is_initialized();
return GetFinishingMoveCPCost(spell).has_value();
}
// 53 - Backstab