diff --git a/ajax/uniqueitems.php b/ajax/uniqueitems.php index 10bec30..e3625c4 100644 --- a/ajax/uniqueitems.php +++ b/ajax/uniqueitems.php @@ -145,8 +145,8 @@ if ($cmd == "getUniqueItem") { $props[$k]['desc'] = array_filter(getIscStrings($v['stat']['stat1'])); } + // SELECT * FROM strings WHERE `Key`='ModStr3a' returns always Amazon Skills - //var_dump($return); // todo: put values in params, so I can get generated string for that prop $counter = 1; @@ -172,7 +172,7 @@ if ($cmd == "getUniqueItem") { } $counter++; } - + $return['props'] = $props; $sqlArmor = "SELECT * FROM armor WHERE code='{$res['code']}'"; diff --git a/img/items/bg.png b/img/items/bg.png index 312c716..355b351 100644 Binary files a/img/items/bg.png and b/img/items/bg.png differ diff --git a/res/app.js b/res/app.js index 9a271c0..965ca2a 100644 --- a/res/app.js +++ b/res/app.js @@ -190,13 +190,18 @@ $(document).ready(function () { // cmd = getUniqueItem $('.uniqueitems-select').change(function () { + $(".item").attr("src", "/img/items/1.png"); $(".item_debug_link").attr('href', "/ajax/uniqueitems.php?cmd=getUniqueItem&index=" + this.value) $.get("/ajax/uniqueitems.php?cmd=getUniqueItem&index=" + this.value, function (data) { debugData = (JSON.stringify(data, null, 4)); $('.debug, .debug_preview').html(syntaxHighlight(debugData)); props = data.props; - $('.item_stats div').html("
"); + + // update preview + $('.item_stats div').hide().html(""); + invImg = "/img/items/" + data.invfile + ".png"; + $(".item").hide().attr("src", invImg).fadeIn(500); type = data["*type"]; @@ -212,8 +217,9 @@ $(document).ready(function () { $('.item_stats p').append(`ITEM PREVIEW