Some overall fixes:

* Fix to market constraints.
* Fixed bug with skill percent not rounding.
* Dereference textEdit variable properly.
* Fix to the outfit window regarding mounts.
* Added enableResize to UIMiniWindow.
* Some minor edits.
This commit is contained in:
BeniS
2012-08-23 02:21:02 +12:00
parent 9eef114779
commit ecd1ec5c0d
8 changed files with 41 additions and 24 deletions

View File

@@ -268,7 +268,7 @@ function onStaminaChange(localPlayer, stamina)
if minutes < 10 then
minutes = '0' .. minutes
end
local percent = 100 * stamina / (42 * 60) -- max is 42 hours
local percent = math.floor(100 * stamina / (42 * 60)) -- max is 42 hours
setSkillValue('stamina', hours .. ":" .. minutes)
setSkillPercent('stamina', percent, tr('You have %s percent', percent))
@@ -293,13 +293,13 @@ function onRegenerationChange(localPlayer, regenerationTime)
if not g_game.getFeature(GamePlayerRegenerationTime) or regenerationTime < 0 then
return
end
local hours = math.floor(regenerationTime / 60)
local minutes = regenerationTime % 60
if minutes < 10 then
minutes = '0' .. minutes
local minutes = math.floor(regenerationTime / 60)
local seconds = regenerationTime % 60
if seconds < 10 then
seconds = '0' .. seconds
end
setSkillValue('regenerationTime', hours .. ":" .. minutes)
setSkillValue('regenerationTime', minutes .. ":" .. seconds)
checkAlert('regenerationTime', regenerationTime, false, 300)
end