mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 04:26:03 +00:00
Cleanup, descfunc 13/14 done, I think. Added more baseItemInfo
This commit is contained in:
parent
53c9098f6b
commit
f71ab1fc24
@ -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']}'";
|
||||
|
BIN
img/items/bg.png
BIN
img/items/bg.png
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
17
res/app.js
17
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("<p></p>");
|
||||
|
||||
// update preview
|
||||
$('.item_stats div').hide().html("<p></p>");
|
||||
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(`<li class="code" style="color:grey;">Item Code: ${base.code}</li>`);
|
||||
|
||||
$('.item_stats p').append(`<li class="statlvlreq">Durability: ${base.durability}</li>`);
|
||||
|
||||
if(base.durability){
|
||||
$('.item_stats p').append(`<li class="statlvlreq">Durability: ${base.durability}</li>`);
|
||||
}
|
||||
|
||||
$.each(props, function (i, v) {
|
||||
|
||||
@ -222,8 +228,9 @@ $(document).ready(function () {
|
||||
}
|
||||
});
|
||||
|
||||
invImg = "/img/items/" + data.invfile + ".png";
|
||||
$(".item").attr("src", invImg);
|
||||
|
||||
|
||||
$('.item_stats div').fadeIn(500);
|
||||
|
||||
$.each(data, function (i, v) {
|
||||
$('*[name="' + i.replace(/\s/g, '') + '"]').val(v);
|
||||
|
@ -206,6 +206,17 @@ option {
|
||||
.item_desc span {
|
||||
}
|
||||
|
||||
.item_stats {
|
||||
background: #222;
|
||||
height: 382px;
|
||||
max-width: 520px;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ul, li, ul li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
@ -274,6 +274,7 @@ class D2ItemDesc {
|
||||
|
||||
if ($params['descfunc'] == 13) {
|
||||
$this->str = "+$min to {$this->charClass[$prop]} Skill Levels";
|
||||
$this->str = sprintf($s1,$max);
|
||||
}
|
||||
|
||||
if ($params['descfunc'] == 14) {
|
||||
|
@ -55,7 +55,7 @@
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="item_stats" style="background: #222; margin: 20px; padding: 20px;">
|
||||
<div class="item_stats" style="">
|
||||
<div class=""><p>ITEM PREVIEW</p></div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user