feat(character): colored item borders for quality (#20)
|
|
@ -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) {
|
||||
|
|
|
|||
BIN
static/img/icon-border/large/default.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
static/img/icon-border/large/q0.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
static/img/icon-border/large/q1.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
static/img/icon-border/large/q2.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
static/img/icon-border/large/q3.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
static/img/icon-border/large/q4.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
static/img/icon-border/large/q5.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
static/img/icon-border/large/q6.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
static/img/icon-border/large/q7.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
static/img/icon-border/large/q8.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
static/img/icon-border/large/q9.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
BIN
static/img/icon-border/medium/default.png
Normal file
|
After Width: | Height: | Size: 784 B |
BIN
static/img/icon-border/medium/q0.png
Normal file
|
After Width: | Height: | Size: 901 B |
BIN
static/img/icon-border/medium/q1.png
Normal file
|
After Width: | Height: | Size: 946 B |
BIN
static/img/icon-border/medium/q2.png
Normal file
|
After Width: | Height: | Size: 858 B |
BIN
static/img/icon-border/medium/q3.png
Normal file
|
After Width: | Height: | Size: 851 B |
BIN
static/img/icon-border/medium/q4.png
Normal file
|
After Width: | Height: | Size: 883 B |
BIN
static/img/icon-border/medium/q5.png
Normal file
|
After Width: | Height: | Size: 876 B |
BIN
static/img/icon-border/medium/q6.png
Normal file
|
After Width: | Height: | Size: 933 B |
BIN
static/img/icon-border/medium/q7.png
Normal file
|
After Width: | Height: | Size: 933 B |
BIN
static/img/icon-border/medium/q8.png
Normal file
|
After Width: | Height: | Size: 933 B |
BIN
static/img/icon-border/medium/q9.png
Normal file
|
After Width: | Height: | Size: 884 B |
|
|
@ -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 {
|
||||
|
|
|
|||