diff --git a/android-chrome-192x192.png b/android-chrome-192x192.png new file mode 100644 index 0000000..a36cc36 Binary files /dev/null and b/android-chrome-192x192.png differ diff --git a/android-chrome-512x512.png b/android-chrome-512x512.png new file mode 100644 index 0000000..1cf2385 Binary files /dev/null and b/android-chrome-512x512.png differ diff --git a/apple-touch-icon.png b/apple-touch-icon.png new file mode 100644 index 0000000..a4748f4 Binary files /dev/null and b/apple-touch-icon.png differ diff --git a/favicon-16x16.png b/favicon-16x16.png new file mode 100644 index 0000000..29bf470 Binary files /dev/null and b/favicon-16x16.png differ diff --git a/favicon-32x32.png b/favicon-32x32.png new file mode 100644 index 0000000..a1b2241 Binary files /dev/null and b/favicon-32x32.png differ diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..c844475 Binary files /dev/null and b/favicon.ico differ diff --git a/img/items/invch1.png b/img/items/invch1.png new file mode 100644 index 0000000..45c4a1f Binary files /dev/null and b/img/items/invch1.png differ diff --git a/img/items/invch2.png b/img/items/invch2.png new file mode 100644 index 0000000..d2c2e8a Binary files /dev/null and b/img/items/invch2.png differ diff --git a/img/items/invch3.png b/img/items/invch3.png new file mode 100644 index 0000000..beff391 Binary files /dev/null and b/img/items/invch3.png differ diff --git a/img/items/invch4.png b/img/items/invch4.png new file mode 100644 index 0000000..3e01f24 Binary files /dev/null and b/img/items/invch4.png differ diff --git a/img/items/invch5.png b/img/items/invch5.png new file mode 100644 index 0000000..6b6d109 Binary files /dev/null and b/img/items/invch5.png differ diff --git a/img/items/invch6.png b/img/items/invch6.png new file mode 100644 index 0000000..42b4c4d Binary files /dev/null and b/img/items/invch6.png differ diff --git a/img/items/invch7.png b/img/items/invch7.png new file mode 100644 index 0000000..a635886 Binary files /dev/null and b/img/items/invch7.png differ diff --git a/img/items/invch8.png b/img/items/invch8.png new file mode 100644 index 0000000..a7a69e6 Binary files /dev/null and b/img/items/invch8.png differ diff --git a/img/items/invch9.png b/img/items/invch9.png new file mode 100644 index 0000000..2ec8138 Binary files /dev/null and b/img/items/invch9.png differ diff --git a/img/items/invjaw.png b/img/items/invjaw.png index 985a39a..07709df 100644 Binary files a/img/items/invjaw.png and b/img/items/invjaw.png differ diff --git a/img/items/invjbi.png b/img/items/invjbi.png new file mode 100644 index 0000000..33b9faf Binary files /dev/null and b/img/items/invjbi.png differ diff --git a/img/items/invjw1.png b/img/items/invjw1.png new file mode 100644 index 0000000..15aa7ff Binary files /dev/null and b/img/items/invjw1.png differ diff --git a/img/items/invjw2.png b/img/items/invjw2.png new file mode 100644 index 0000000..fcb5c35 Binary files /dev/null and b/img/items/invjw2.png differ diff --git a/img/items/invjw3.png b/img/items/invjw3.png new file mode 100644 index 0000000..9a80096 Binary files /dev/null and b/img/items/invjw3.png differ diff --git a/img/items/invjw4.png b/img/items/invjw4.png new file mode 100644 index 0000000..bb631a9 Binary files /dev/null and b/img/items/invjw4.png differ diff --git a/img/items/invjw5.png b/img/items/invjw5.png new file mode 100644 index 0000000..533d1eb Binary files /dev/null and b/img/items/invjw5.png differ diff --git a/img/items/invjw6.png b/img/items/invjw6.png new file mode 100644 index 0000000..af2ed9d Binary files /dev/null and b/img/items/invjw6.png differ diff --git a/img/items/invkey.png b/img/items/invkey.png index aacc2ae..c21d07f 100644 Binary files a/img/items/invkey.png and b/img/items/invkey.png differ diff --git a/img/items/invrin1.png b/img/items/invrin1.png new file mode 100644 index 0000000..91aaf86 Binary files /dev/null and b/img/items/invrin1.png differ diff --git a/img/items/invrin2.png b/img/items/invrin2.png new file mode 100644 index 0000000..edbc896 Binary files /dev/null and b/img/items/invrin2.png differ diff --git a/img/items/invrin3.png b/img/items/invrin3.png new file mode 100644 index 0000000..c084e9f Binary files /dev/null and b/img/items/invrin3.png differ diff --git a/img/items/invrin4.png b/img/items/invrin4.png new file mode 100644 index 0000000..97f7d5f Binary files /dev/null and b/img/items/invrin4.png differ diff --git a/img/items/invrin5.png b/img/items/invrin5.png new file mode 100644 index 0000000..31df36d Binary files /dev/null and b/img/items/invrin5.png differ diff --git a/ironman-dev.db-journal b/ironman-dev.db-journal new file mode 100644 index 0000000..eb5f80a Binary files /dev/null and b/ironman-dev.db-journal differ diff --git a/res/app.js b/res/app.js index 233b14d..f103f57 100755 --- a/res/app.js +++ b/res/app.js @@ -123,13 +123,6 @@ $(document).ready(function () { y = document.getElementById('item'); y.value = x; }); - - - w = $('.w-select').val(); - console.log(w); - - - $(".btnconfig").click(function () { $(".ctrl-config").hide(); @@ -441,7 +434,7 @@ $(document).ready(function () { $(".itemlvlreq").html("Level Required: "+$(this).val()); }); - // unique item change function select + // cmd = getUniqueItem $('.uniqueitems-select').change(function () { @@ -456,13 +449,13 @@ $(document).ready(function () { // update preview //$('.item_stats div').hide().html("

"); - + invImg = docpath + '/img/items/' + data.invfile + ".png"; $(".item").attr("src", invImg); $(".item").onerror = function () { invImg = "/img/items/" + data.invfile + ".png"; this.src = invImg; - }; + }; type = data["*type"]; lvlreq = data["lvl req"]; @@ -487,9 +480,6 @@ $(document).ready(function () { } - - $('.a-select, .w-select, .m-select').removeAttr('required'); - /* * THIS LINE BREAKS hidden fields and set them to blank. diff --git a/scc.exe b/scc.exe new file mode 100644 index 0000000..9904158 Binary files /dev/null and b/scc.exe differ diff --git a/site.webmanifest b/site.webmanifest new file mode 100644 index 0000000..45dc8a2 --- /dev/null +++ b/site.webmanifest @@ -0,0 +1 @@ +{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/src/D2ItemData.php b/src/D2ItemData.php index 349a382..19044d4 100755 --- a/src/D2ItemData.php +++ b/src/D2ItemData.php @@ -6,54 +6,43 @@ class D2ItemData { public $images; public function getImages() { - $sql = " - SELECT code,invfile,type,type2 FROM armor + $sql = "SELECT code,uniqueinvfile,invfile,type,type2 FROM armor UNION ALL - SELECT code,invfile,type,type2 FROM misc + SELECT code,uniqueinvfile,invfile,type,type2 FROM misc UNION ALL - SELECT code,invfile,type,type2 FROM weapons - "; - - $res = PDO_FetchAll($sql); - + SELECT code,uniqueinvfile,invfile,type,type2 FROM weapons"; + $res = PDO_FetchAll($sql); $isc = null; foreach ($res as $r) { $isc1[$r['code']] = $r; - $isc1[$r['code']]['code'] = $r['prop']; - + $isc1[$r['code']]['code'] = $r['code']; $isc2[$r['type']] = $r; - $isc2[$r['type']]['type'] = $r['prop']; + $isc2[$r['type']]['type'] = $r['type']; } - $this->images = array_merge($isc1, $isc2); - unset($isc1); unset($isc2); } public function uniqueItems($index, $doc = FALSE) { - - // This is where we get props for each item - $sql = "SELECT * FROM uniqueitems WHERE enabled='1' AND `index`=?"; - - $res = (PDO_FetchRow($sql, [$index])); - - /* - * Get invfile code all 3 item tables wherever it is - * - */ - if (empty($this->images)) { $this->getImages(); + } + // This is where we get props for each item + $sql = "SELECT * FROM uniqueitems WHERE enabled='1' AND `index`=?"; + $res = (PDO_FetchRow($sql, [$index])); + + if (empty($res['uniqueinvfile'])){ + $sql = "SELECT InvGfx1 FROM itemtypes WHERE Code = '{$this->images[$res['code']]['type']}'"; + $invfile = PDO_FetchOne($sql); + } + if (empty($invfile)){ + $invfile = $this->images[$res['code']]['invfile']; } - - $res['invfile'] = $this->images[$res['code']]['invfile']; + $res['invfile'] = $invfile; $return = $res; - - /* - * for all props for this unique item, get ISC strings - */ - + + // for all props for this unique item, get ISC strings $props = array_filter([ "Prop1" => array_filter( ["prop1" => $return['prop1'], "par1" => $return['par1'], "min1" => $return['min1'], "max1" => $return['max1']] diff --git a/src/tabs/Misc.php b/src/tabs/Misc.php index c15826d..49e881c 100644 --- a/src/tabs/Misc.php +++ b/src/tabs/Misc.php @@ -47,7 +47,7 @@
- +