diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_rogue.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 5953cab5b56..e5bbd65f069 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -7338,7 +7338,7 @@ void Spell::DelayedChannel() bool Spell::HasPowerTypeCost(Powers power) const { - return GetPowerTypeCostAmount(power).has_value(); + return GetPowerTypeCostAmount(power).is_initialized(); } Optional<int32> Spell::GetPowerTypeCostAmount(Powers power) const diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index a50a6b468ca..da374f536dc 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -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).has_value(); + return GetFinishingMoveCPCost(spell).is_initialized(); } // 53 - Backstab @@ -581,7 +581,7 @@ class spell_rog_rupture : public SpellScriptLoader // Venomous Wounds: if unit dies while being affected by rupture, regain energy based on remaining duration Optional<SpellPowerCost> cost = GetSpellInfo()->CalcPowerCost(POWER_ENERGY, false, caster, GetSpellInfo()->GetSchoolMask(), nullptr); - if (!cost.has_value()) + if (!cost) return; float pct = float(aura->GetDuration()) / float(aura->GetMaxDuration()); |
