Skip to content

Commit

Permalink
Don't show texture selection if all filedataids are 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Marlamin committed Sep 26, 2020
1 parent 9ae77f5 commit 13f4478
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ indent_size = 4
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
end_of_line = lf
1 change: 1 addition & 0 deletions dbc/scripts/updateHotfixes.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@

if (!in_array($md5, $processedMD5s)) {
$insertMD5->execute([$md5]);
$processedMD5s[] = $md5;
echo "[Hotfix updater] [" . date("Y-m-d H:i:s") . "] Inserted " . $md5 . " as processed cache\n";
}
}
4 changes: 4 additions & 0 deletions mv/modelviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ function loadModelTextures() {
if (!data.hasOwnProperty(displayId)) continue;

var intArray = data[displayId];
if (intArray.every(fdid => fdid === 0)){
continue;
}

// Open controls overlay
$("#js-controls").removeClass("closed");
Expand All @@ -482,6 +485,7 @@ function loadModelTextures() {
})
.done(function( filename ) {
var textureFileDataIDs = decodeURIComponent(this.url.replace("https://wow.tools/files/scripts/filedata_api.php?filename=1&filedataid=", '')).split(',');

var textureFileDataID = textureFileDataIDs[0];

var optionHTML = '<option value="' + textureFileDataIDs + '"';
Expand Down

0 comments on commit 13f4478

Please sign in to comment.