Skip to content

Commit

Permalink
Fix GCC 11 build
Browse files Browse the repository at this point in the history
  • Loading branch information
Shauren committed Jun 18, 2024
1 parent a7e4126 commit 5c4884e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22332,14 +22332,14 @@ void Player::AddSpellMod(SpellModifier* mod, bool apply)
if (mod->type == SPELLMOD_FLAT)
{
modData.ModifierValue = 0.0f;
for (SpellModifier* spellMod : std::ranges::equal_range(m_spellMods, std::make_pair(mod->op, SPELLMOD_FLAT), std::ranges::less(), [](SpellModifier const* sm) { return std::make_pair(sm->op, sm->type); }))
for (SpellModifier* spellMod : std::ranges::equal_range(std::ranges::begin(m_spellMods), std::ranges::end(m_spellMods), std::make_pair(mod->op, SPELLMOD_FLAT), std::ranges::less(), [](SpellModifier const* sm) { return std::make_pair(sm->op, sm->type); }))
if (static_cast<SpellModifierByClassMask const*>(spellMod)->mask[classIndex / 32] & (1u << (classIndex % 32)))
modData.ModifierValue += static_cast<SpellModifierByClassMask const*>(spellMod)->value;
}
else
{
modData.ModifierValue = 1.0f;
for (SpellModifier* spellMod : std::ranges::equal_range(m_spellMods, std::make_pair(mod->op, SPELLMOD_PCT), std::ranges::less(), [](SpellModifier const* sm) { return std::make_pair(sm->op, sm->type); }))
for (SpellModifier* spellMod : std::ranges::equal_range(std::ranges::begin(m_spellMods), std::ranges::end(m_spellMods), std::make_pair(mod->op, SPELLMOD_PCT), std::ranges::less(), [](SpellModifier const* sm) { return std::make_pair(sm->op, sm->type); }))
if (static_cast<SpellModifierByClassMask const*>(spellMod)->mask[classIndex / 32] & (1u << (classIndex % 32)))
modData.ModifierValue *= 1.0f + CalculatePct(1.0f, static_cast<SpellModifierByClassMask const*>(spellMod)->value);
}
Expand Down

0 comments on commit 5c4884e

Please sign in to comment.