Skip to content

Commit

Permalink
Fix paint cooldown
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectroHeavenVN committed Jul 3, 2024
1 parent d371844 commit fa74436
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1126,10 +1126,9 @@ internal static bool OnSkillPaint(Skill skill, int x, int y, mGraphics g)
g.fillRect(realX, realY, 22, 22);
float coolDownRatio = 1 - coolingDown / (float)skill.coolDown;
CustomGraphics.drawCooldownRect(x, y, 22, 22, coolDownRatio, color);
string cooldownStr = $"{(skill.coolDown - coolingDown) / 1000f:#.0}";
string cooldownStr = $"{(skill.coolDown - coolingDown) / 1000f:#.0}".Replace(',', '.');
if (cooldownStr.Length > 4)
cooldownStr = cooldownStr.Substring(0, cooldownStr.IndexOf(','));
cooldownStr = cooldownStr.Replace(',', '.');
cooldownStr = cooldownStr.Substring(0, cooldownStr.IndexOf('.'));
mFont.tahoma_7_yellow.drawString(g, cooldownStr, x + 1, y - 12 + mFont.tahoma_7.getHeight() / 2, mFont.CENTER);
}
else
Expand Down

0 comments on commit fa74436

Please sign in to comment.