Items load from mod, else d2modder. broken res/ folder fixed

This commit is contained in:
Hash Borgir
2022-06-26 01:34:18 -06:00
parent c4229d4336
commit eb3bc1cb7d
35 changed files with 25 additions and 45 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 962 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.
+3 -13
View File
@@ -123,13 +123,6 @@ $(document).ready(function () {
y = document.getElementById('item'); y = document.getElementById('item');
y.value = x; y.value = x;
}); });
w = $('.w-select').val();
console.log(w);
$(".btnconfig").click(function () { $(".btnconfig").click(function () {
$(".ctrl-config").hide(); $(".ctrl-config").hide();
@@ -441,7 +434,7 @@ $(document).ready(function () {
$(".itemlvlreq").html("Level Required: "+$(this).val()); $(".itemlvlreq").html("Level Required: "+$(this).val());
}); });
// unique item change function select
// cmd = getUniqueItem // cmd = getUniqueItem
$('.uniqueitems-select').change(function () { $('.uniqueitems-select').change(function () {
@@ -456,13 +449,13 @@ $(document).ready(function () {
// update preview // update preview
//$('.item_stats div').hide().html("<p></p>"); //$('.item_stats div').hide().html("<p></p>");
invImg = docpath + '/img/items/' + data.invfile + ".png"; invImg = docpath + '/img/items/' + data.invfile + ".png";
$(".item").attr("src", invImg); $(".item").attr("src", invImg);
$(".item").onerror = function () { $(".item").onerror = function () {
invImg = "/img/items/" + data.invfile + ".png"; invImg = "/img/items/" + data.invfile + ".png";
this.src = invImg; this.src = invImg;
}; };
type = data["*type"]; type = data["*type"];
lvlreq = data["lvl req"]; 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. * THIS LINE BREAKS hidden fields and set them to blank.
BIN
View File
Binary file not shown.
+1
View File
@@ -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"}
+20 -31
View File
@@ -6,54 +6,43 @@ class D2ItemData {
public $images; public $images;
public function getImages() { public function getImages() {
$sql = " $sql = "SELECT code,uniqueinvfile,invfile,type,type2 FROM armor
SELECT code,invfile,type,type2 FROM armor
UNION ALL UNION ALL
SELECT code,invfile,type,type2 FROM misc SELECT code,uniqueinvfile,invfile,type,type2 FROM misc
UNION ALL UNION ALL
SELECT code,invfile,type,type2 FROM weapons SELECT code,uniqueinvfile,invfile,type,type2 FROM weapons";
"; $res = PDO_FetchAll($sql);
$res = PDO_FetchAll($sql);
$isc = null; $isc = null;
foreach ($res as $r) { foreach ($res as $r) {
$isc1[$r['code']] = $r; $isc1[$r['code']] = $r;
$isc1[$r['code']]['code'] = $r['prop']; $isc1[$r['code']]['code'] = $r['code'];
$isc2[$r['type']] = $r; $isc2[$r['type']] = $r;
$isc2[$r['type']]['type'] = $r['prop']; $isc2[$r['type']]['type'] = $r['type'];
} }
$this->images = array_merge($isc1, $isc2); $this->images = array_merge($isc1, $isc2);
unset($isc1); unset($isc1);
unset($isc2); unset($isc2);
} }
public function uniqueItems($index, $doc = FALSE) { 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)) { if (empty($this->images)) {
$this->getImages(); $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'] = $invfile;
$res['invfile'] = $this->images[$res['code']]['invfile'];
$return = $res; $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([ $props = array_filter([
"Prop1" => array_filter( "Prop1" => array_filter(
["prop1" => $return['prop1'], "par1" => $return['par1'], "min1" => $return['min1'], "max1" => $return['max1']] ["prop1" => $return['prop1'], "par1" => $return['par1'], "min1" => $return['min1'], "max1" => $return['max1']]
+1 -1
View File
@@ -47,7 +47,7 @@
<div class="" style="text-align: center; margin: 0 auto;"> <div class="" style="text-align: center; margin: 0 auto;">
<a style="margin-top: 60px; text-align: center;" target="_blank" href="/genDocs.php?cmd=genDocMisc" class=""> <a style="margin-top: 60px; text-align: center;" target="_blank" href="/genDocs.php?cmd=genDocMisc" class="">
<div style="height: 100px;"> <div style="height: 100px;">
<img style="height: 56px;" class="img-fluid" src="/img/items/invbok.png"> <img style="height: 56px;" class="img-fluid" src="/img/items/invtbk.png">
<img style="height: 28px;" class="img-fluid" src="/img/items/invkey.png"> <img style="height: 28px;" class="img-fluid" src="/img/items/invkey.png">
</div> </div>
</a> </a>