Fixing Ticket#215

Unit's stats (attack, defense) is rounded so there is no decimal digits
shown.

This was SVN commit r6526.
This commit is contained in:
freenity 2008-12-06 15:21:14 +00:00
parent 2bfa84aef5
commit 2f5125e4d0

View file

@ -177,7 +177,12 @@ function updateStat (baseName, cellSheet, cell, statistic)
textStat.sprite = "snIconSheet" + cellSheet;
textStat.cell_id = cellGroup[cellSheet][cell].id;
textStat.tooltip = cellGroup[cellSheet][cell].name;
var iconStat = getGUIObjectByName (baseName + (statCurr + 1))
var iconStat = getGUIObjectByName (baseName + (statCurr + 1));
if (!isNaN(statistic)) {
statistic = Math.ceil(statistic);
}
iconStat.caption = statistic;
iconStat.tooltip = cellGroup[cellSheet][cell].name + ": " + statistic + ".";
statCurr = (statCurr + 2);