aboutsummaryrefslogtreecommitdiffstats
path: root/js/craftmine.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/craftmine.js')
-rw-r--r--js/craftmine.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/craftmine.js b/js/craftmine.js
index 912d10c..dc4ee9a 100644
--- a/js/craftmine.js
+++ b/js/craftmine.js
@@ -44,9 +44,10 @@ function withdrawMine() {
}
function initCraftMine() {
- sendRequest("craftmine.php", "op=getCraftMine", function(xhr) {
- var ret = xhr;
- data.gold = parseInt(ret); // Server's response is a string
+ sendRequest("craftmine.php", "op=getCraftMine", function(ret) {
+ data.gold = parseInt(ret.gold); // Server's response is a string
+ if(ret.shop) displayShop(ret.shop);
+ displayInventory(ret.inventory);
updateData("gold");
})
}