Fixed variable name

"k" still refers to the English string, while "lk" carries the translated value.
This commit is contained in:
Andrea Rendine
2015-04-30 16:57:18 +02:00
parent 8042414be7
commit dca3faa2f9
+3 -3
View File
@@ -797,7 +797,7 @@ var Room = {
$SM.set('stores["'+k+'"]', 0);
}
k = _(k);
lk = _(k);
// thieves?
if(typeof $SM.get('game.thieves') == 'undefined' && num > 5000 && $SM.get('features.location.world')) {
@@ -806,14 +806,14 @@ var Room = {
if(row.length === 0 && num > 0) {
row = $('<div>').attr('id', id).addClass('storeRow');
$('<div>').addClass('row_key').text(k).appendTo(row);
$('<div>').addClass('row_key').text(lk).appendTo(row);
$('<div>').addClass('row_val').text(Math.floor(num)).appendTo(row);
$('<div>').addClass('clear').appendTo(row);
var curPrev = null;
location.children().each(function(i) {
var child = $(this);
var cName = child.children('.row_key').text();
if(cName < k) {
if(cName < lk) {
curPrev = child.attr('id');
}
});