Get rid of ListBox.last

This commit is contained in:
Eric Fredricksen
2010-07-12 13:36:15 -07:00
parent ff09796ec5
commit b68ad48c6b
+2 -6
View File
@@ -321,7 +321,7 @@ function Dequeue() {
game.queue.shift(); game.queue.shift();
if (a == 'plot') { if (a == 'plot') {
CompleteAct(); CompleteAct();
s = 'Loading ' + Plots.last().text(); s = 'Loading ' + game.bestplot;
} }
Task(s, n * 1000); Task(s, n * 1000);
} else { } else {
@@ -473,10 +473,6 @@ function ListBox(id, columns, fixedkeys) {
return result; return result;
}; };
this.last = function () {
return this.rows().last();
};
this.scrollToTop = function () { this.scrollToTop = function () {
this.box.parents(".scroll").scrollTop(0); this.box.parents(".scroll").scrollTop(0);
}; };
@@ -641,7 +637,7 @@ function WinItem() {
function CompleteQuest() { function CompleteQuest() {
QuestBar.reset(50 + RandomLow(1000)); QuestBar.reset(50 + RandomLow(1000));
if (Quests.length()) { if (Quests.length()) {
Log('Quest completed: ' + Quests.last().text()); Log('Quest completed: ' + game.bestquest);
Quests.rows().find("input:checkbox").attr("checked", "true"); Quests.rows().find("input:checkbox").attr("checked", "true");
[WinSpell,WinEquip,WinStat,WinItem][Random(4)](); [WinSpell,WinEquip,WinStat,WinItem][Random(4)]();
} }