mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 05:43:12 +01:00
Core/Misc: Replace boost::optional with std::optional part 2
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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*/)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user