item another one >.<

This commit is contained in:
Sarjuuk
2013-10-03 23:05:49 +02:00
parent 360f2e6878
commit 2d736fc785
143 changed files with 3956 additions and 2364 deletions

View File

@@ -1649,7 +1649,7 @@ function fi_getExtraCols(wt, gm, pu) {
for (var i = 0; i < wt.length && i < nColsMax; ++i) {
var a = fi_Lookup(wt[i]);
if (a && a.name && a.type == 'num') {
if (a && a.name && a.type == 'num' && a.name != 'buyprice') {
var b = {
id: a.name,
value: a.name,
@@ -1659,14 +1659,14 @@ function fi_getExtraCols(wt, gm, pu) {
};
// Fix display of decimal columns
if (a.name.indexOf('dps') != -1 || a.name.indexOf('speed') != -1) {
if (/dps|speed/i.test(a.name)) {
b.compute = function (item, td) {
return (item[a.name] || 0).toFixed(2);
}
}
// Fix display of money columns
if (a.name.indexOf('money') != -1) {
if (/money|price|cost/i.test(a.name)) {
b.compute = function (item, td) {
td.innerHTML = g_getMoneyHtml(item[a.name] || 0);
}