feat(character): colored item borders for quality (#20)

This commit is contained in:
Axel Cocat 2022-05-07 17:33:42 +02:00 committed by GitHub
parent 08009a575c
commit 1156ceb17f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 21 additions and 5 deletions

View file

@ -134,10 +134,11 @@
characterModel.items.push(...items);
}
function createItemSlot(item, invSlot, icon, rel, container) {
function createItemSlot(item, invSlot, icon, quality, rel, container) {
const $item = $itemSlotTemplate.clone();
$item
.data("icon", icon)
.data("quality", quality)
.find(".inventory-slot")
.css("background-image", `url("{{websiteRoot}}/img/inventory-slot/${invSlot}.png")`);
if (item !== undefined) {
@ -168,7 +169,7 @@
rel.push("rand=" + item.randomPropertyId);
}
}
createItemSlot(item?.itemEntry, slot, item?.icon?.toLowerCase(), rel.join("&"), side.element);
createItemSlot(item?.itemEntry, slot, item?.icon?.toLowerCase(), item?.quality, rel.join("&"), side.element);
}
}
const nbItemRows = Math.max($("#equipment-col-left").children().length, $("#equipment-col-right").children().length);
@ -186,9 +187,13 @@
const $item = $(el);
const item = $item.data("item");
const icon = $item.data("icon");
const quality = $item.data("quality");
if (item !== undefined) {
$item.find(".icon").css("background-image", `url("{{aowow}}/static/images/wow/icons/${iconSize}/${icon}.jpg")`);
}
if (quality !== undefined) {
$item.find(".border").css("background-image", `url("{{websiteRoot}}/img/icon-border/${iconSize}/q${quality}.png")`);
}
});
if (!init) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 876 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

View file

@ -1,7 +1,7 @@
<link rel="stylesheet" type="text/css" href="{{websiteRoot}}/css/icons.css">
<style>
.iconlarge .border {
background-image: url("{{aowow}}/static/images/Icon/large/border/default.png");
background-image: url("{{websiteRoot}}/img/icon-border/large/default.png");
}
.iconlarge a {
@ -9,7 +9,7 @@
}
.iconmedium .border {
background-image: url("{{aowow}}/static/images/Icon/medium/border/default.png");
background-image: url("{{websiteRoot}}/img/icon-border/medium/default.png");
}
.iconmedium a {