Skip to content

Commit

Permalink
fix: compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas authored Dec 7, 2023
1 parent 6220889 commit 3e460e2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/creatures/combat/spells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ void Spell::applyCooldownConditions(std::shared_ptr<Player> player) const {
WheelSpellGrade_t spellGrade = player->wheel()->getSpellUpgrade(getName());
bool isUpgraded = getWheelOfDestinyUpgraded() && static_cast<uint8_t>(spellGrade) > 0;
// Safety check to prevent division by zero
auto rate_cooldown = g_configManager().getFloat(RATE_SPELL_COOLDOWN, __FUNCTION__);
if (std::abs(rate_cooldown) < std::numeric_limits<float>::epsilon()) {
rate_cooldown = 0.1; // Safe minimum value
}
Expand Down

0 comments on commit 3e460e2

Please sign in to comment.