-
+
wizard
1
diff --git a/src/client/ui/templates/death/styles.css b/src/client/ui/templates/death/styles.css
deleted file mode 100644
index 6ac75cb4..00000000
--- a/src/client/ui/templates/death/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiDeath{display:none;width:400px;background-color:#3c3f4c;border:4px solid #929398;text-align:center;padding:16px 16px 0 16px}.uiDeath .msg{color:#f2f5f5}.uiDeath .msg .inner{display:inline-block;color:#ff6942}.uiDeath .btn{color:#f2f5f5;width:100%;height:32px;background-color:#3fa7dd;margin:16px 0;padding-top:8px;cursor:pointer}.uiDeath .btn:hover{background-color:#80c5e9;color:#2d2136}.uiDeath.permadeath .buttons .btn-respawn{display:none}.uiDeath.permadeath .buttons .btn-logout{display:block}.uiDeath .buttons .btn-logout{display:none}
\ No newline at end of file
diff --git a/src/client/ui/templates/dialogue/styles.css b/src/client/ui/templates/dialogue/styles.css
deleted file mode 100644
index 615d427a..00000000
--- a/src/client/ui/templates/dialogue/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiDialogue{position:absolute;bottom:16px;width:calc(320px + (8px * 2));padding:8px;background-color:rgba(107,79,76,0.5);display:none}.uiDialogue .portraitBox{float:left;margin-right:12px;display:none}.uiDialogue .portraitBox .portrait{width:64px;height:64px}.uiDialogue .textBox{width:calc(100%);float:left;height:100%;color:#f2f5f5;text-align:center;filter:drop-shadow(0 -2px 0 #312136) drop-shadow(0 2px 0 #312136) drop-shadow(2px 0 0 #312136) drop-shadow(-2px 0 0 #312136)}
\ No newline at end of file
diff --git a/src/client/ui/templates/equipment/equipment.js b/src/client/ui/templates/equipment/equipment.js
index 40b38322..7e7714b8 100644
--- a/src/client/ui/templates/equipment/equipment.js
+++ b/src/client/ui/templates/equipment/equipment.js
@@ -81,6 +81,9 @@ define([
items = items || this.items;
this.items = items;
+ if (!this.shown)
+ return;
+
this.find('.slot').addClass('empty');
var skipSpellId = 0;
@@ -113,12 +116,14 @@ define([
slot = 'rune-' + spellId;
}
+ var spritesheet = item.spritesheet || '../../../images/items.png';
+
var elSlot = this.find('[slot="' + slot + '"]');
elSlot
.data('item', item)
.removeClass('empty')
.find('.icon')
- .css('background', 'url(../../../images/items.png) ' + imgX + 'px ' + imgY + 'px')
+ .css('background', 'url("' + spritesheet + '") ' + imgX + 'px ' + imgY + 'px')
.off()
.on('mousemove', this.onHoverItem.bind(this, elSlot, item, null))
.on('mouseleave', this.onHoverItem.bind(this, null, null))
@@ -159,7 +164,7 @@ define([
.forEach(function(item) {
var sprite = item.sprite || [7, 0];
- var spriteSheet = item.empty ? 'uiIcons' : 'items';
+ var spriteSheet = item.empty ? '../../../images/uiIcons.png' : item.spritesheet || '../../../images/items.png';
var imgX = -sprite[0] * 64;
var imgY = -sprite[1] * 64;
@@ -168,7 +173,7 @@ define([
el
.find('.icon')
- .css('background', 'url(../../../images/' + spriteSheet + '.png) ' + imgX + 'px ' + imgY + 'px')
+ .css('background', 'url("' + spriteSheet + '") ' + imgX + 'px ' + imgY + 'px')
.on('mousemove', this.onHoverItem.bind(this, el, item, null))
.on('mouseleave', this.onHoverItem.bind(this, null, null))
.on('click', this.equipItem.bind(this, item));
@@ -246,8 +251,13 @@ define([
},
onGetStats: function(stats) {
- stats = stats || this.stats;
- this.stats = stats;
+ if (stats)
+ this.stats = stats;
+
+ stats = this.stats;
+
+ if (!this.shown)
+ return;
var container = this.el.find('.stats');
@@ -262,7 +272,7 @@ define([
level: stats.level,
'next level': xpRemaining + 'xp',
gap1: '',
- gold: 0, //window.player.trade.gold,
+ gold: window.player.trade.gold,
gap2: '',
hp: ~~stats.hp + '/' + stats.hpMax,
mana: ~~stats.mana + '/' + stats.manaMax,
diff --git a/src/client/ui/templates/equipment/styles.css b/src/client/ui/templates/equipment/styles.css
deleted file mode 100644
index 71bb50dc..00000000
--- a/src/client/ui/templates/equipment/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiEquipment{display:none;z-index:2;border:5px solid #3c3f4c;text-align:center;width:458px;height:534px}.uiEquipment>.heading{color:#f2f5f5;width:100%;height:36px;background-color:#3c3f4c}.uiEquipment>.heading .heading-text{padding-top:8px;margin:auto}.uiEquipment .bottom{height:calc(100% - 36px);background-color:#373041}.uiEquipment .bottom .tabs{width:100%;height:40px;padding:8px 8px 0 8px}.uiEquipment .bottom .tabs .tab{cursor:pointer;background-color:#3c3f4c;color:#f2f5f5;margin-right:8px;float:left;height:100%;padding-top:8px;padding-left:8px;padding-right:8px;width:calc((100% - 24px) / 4)}.uiEquipment .bottom .tabs .tab:hover{background-color:#505360}.uiEquipment .bottom .tabs .tab.selected{background-color:#505360;color:#48edff}.uiEquipment .bottom .tabs .tab:last-child{margin-right:0}.uiEquipment .bottom .left,.uiEquipment .bottom .stats,.uiEquipment .bottom .right{float:left;height:440px}.uiEquipment .bottom .left,.uiEquipment .bottom .right,.uiEquipment .bottom .itemList,.uiEquipment .bottom .runes{width:96px;padding:8px}.uiEquipment .bottom .left .slot,.uiEquipment .bottom .right .slot,.uiEquipment .bottom .itemList .slot,.uiEquipment .bottom .runes .slot{width:80px;height:80px;background-color:#312136;margin-bottom:8px;cursor:pointer;padding:8px}.uiEquipment .bottom .left .slot:last-child,.uiEquipment .bottom .right .slot:last-child,.uiEquipment .bottom .itemList .slot:last-child,.uiEquipment .bottom .runes .slot:last-child{margin-bottom:0}.uiEquipment .bottom .left .slot .icon,.uiEquipment .bottom .right .slot .icon,.uiEquipment .bottom .itemList .slot .icon,.uiEquipment .bottom .runes .slot .icon{height:100%}.uiEquipment .bottom .left .slot:hover .icon,.uiEquipment .bottom .right .slot:hover .icon,.uiEquipment .bottom .itemList .slot:hover .icon,.uiEquipment .bottom .runes .slot:hover .icon{filter:brightness(160%)}.uiEquipment .bottom .left .slot:hover.empty,.uiEquipment .bottom .right .slot:hover.empty,.uiEquipment .bottom .itemList .slot:hover.empty,.uiEquipment .bottom .runes .slot:hover.empty{background-color:rgba(72,237,255,0.1)}.uiEquipment .bottom .middle{float:left;width:calc(100% - (2 * 96px))}.uiEquipment .bottom .middle .stats{width:100%;padding-top:16px;height:calc(440px - 80px)}.uiEquipment .bottom .middle .stats .stat{height:22px;filter:drop-shadow(0 -2px 0 #312136) drop-shadow(0 2px 0 #312136) drop-shadow(2px 0 0 #312136) drop-shadow(-2px 0 0 #312136)}.uiEquipment .bottom .middle .stats .stat.blueText>font{color:#3fa7dd}.uiEquipment .bottom .middle .stats .stat.empty{height:22px}.uiEquipment .bottom .middle .stats .stat.gold font{color:#faac45}.uiEquipment .bottom .middle .runes{width:100%;height:80px;padding-left:calc((100% - (80px * 2) - 8px) / 2)}.uiEquipment .bottom .middle .runes .slot{float:left;margin-right:8px}.uiEquipment .bottom .middle .runes .slot:last-child{margin-right:0}.uiEquipment .bottom .itemList{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#373041;padding:0}.uiEquipment .bottom .itemList .slot{float:left;margin:8px 0 0 8px}.uiEquipment .bottom .itemList .slot .icon{position:relative}.uiEquipment .bottom .itemList .slot .icon.eq:before{content:'eq';left:-2px;bottom:-3px;position:absolute;color:#f2f5f5;filter:drop-shadow(0 -2px 0 #312136) drop-shadow(0 2px 0 #312136) drop-shadow(2px 0 0 #312136) drop-shadow(-2px 0 0 #312136)}
\ No newline at end of file
diff --git a/src/client/ui/templates/help/styles.css b/src/client/ui/templates/help/styles.css
deleted file mode 100644
index 754ad09b..00000000
--- a/src/client/ui/templates/help/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiHelp{display:none;width:400px;background-color:#3c3f4c;border:4px solid #929398;text-align:center}.uiHelp .row{color:#aabebe;padding:16px}.uiHelp .row .topic{color:#f2f5f5}
\ No newline at end of file
diff --git a/src/client/ui/templates/hud/styles.css b/src/client/ui/templates/hud/styles.css
deleted file mode 100644
index 60b939df..00000000
--- a/src/client/ui/templates/hud/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiHud{position:absolute;left:10px;top:10px;width:calc(280px + (8px * 2));padding:8px;background-color:rgba(58,59,74,0.9)}.uiHud .portraitBox{float:left;margin-right:12px}.uiHud .portraitBox .portrait{visibility:hidden;width:64px;height:64px}.uiHud .boxes{width:calc(100% - 76px);float:left;height:100%}.uiHud .boxes .statBox{width:100%;height:18px;margin-bottom:5px;position:relative}.uiHud .boxes .statBox:last-child{margin-bottom:0}.uiHud .boxes .statBox [class^="stat"]{position:absolute;left:0;top:0;height:100%}.uiHud .boxes .statBox .text{position:absolute;left:0;top:0;width:100%;height:100%;text-align:center;color:#f2f5f5;padding:2px 0;text-shadow:2px 0 #2d2136,-2px 0 #2d2136,0 -2px #2d2136,0 2px #2d2136,-2px -2px #2d2136,-2px 2px #2d2136,2px -2px #2d2136,2px 2px #2d2136}.uiHud .boxes .statBox:nth-child(1){background-color:#802343}.uiHud .boxes .statBox:nth-child(2){background-color:#42548d}.uiHud .boxes .statBox:nth-child(3){background-color:#386646}.uiHud .boxes .statBox .statHp{background-color:#d43346}.uiHud .boxes .statBox .statMana{background-color:#3fa7dd}.uiHud .boxes .statBox .statXp{background-color:#4ac441}
\ No newline at end of file
diff --git a/src/client/ui/templates/inventory/inventory.js b/src/client/ui/templates/inventory/inventory.js
index b16cc343..99f8b80f 100644
--- a/src/client/ui/templates/inventory/inventory.js
+++ b/src/client/ui/templates/inventory/inventory.js
@@ -119,7 +119,7 @@ define([
var itemEl = $(tplItem)
.appendTo(container);
- var spritesheet = 'items';
+ var spritesheet = item.spritesheet || 'items';
if (item.material)
spritesheet = 'materials';
else if (item.quest)
@@ -282,14 +282,16 @@ define([
}
}
- if ((!item.quest) && (!item.eq)) {
- if ((window.player.stash.active) && (!item.noSalvage))
- config.push(menuItems.stash);
+ if (!item.eq) {
+ if (!item.quest) {
+ if ((window.player.stash.active) && (!item.noSalvage))
+ config.push(menuItems.stash);
- config.push(menuItems.drop);
+ config.push(menuItems.drop);
- if ((!item.material) && (!item.noSalvage))
- config.push(menuItems.salvage);
+ if ((!item.material) && (!item.noSalvage))
+ config.push(menuItems.salvage);
+ }
config.push(menuItems.destroy);
}
diff --git a/src/client/ui/templates/inventory/styles.css b/src/client/ui/templates/inventory/styles.css
deleted file mode 100644
index 1e4bbb1a..00000000
--- a/src/client/ui/templates/inventory/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiInventory{display:none;z-index:2;width:818px;border:5px solid #3c3f4c;text-align:center;position:relative}.uiInventory>.heading{color:#48edff;width:100%;height:36px;background-color:#3c3f4c}.uiInventory>.heading .heading-text{padding-top:8px;margin:auto}.uiInventory .grid{float:left;width:808px;height:408px;overflow:hidden;padding:4px;position:relative;background-color:#373041}.uiInventory .grid .item{width:72px;height:72px;float:left;position:relative;cursor:pointer;box-sizing:border-box;margin:4px;background-color:#312136}.uiInventory .grid .item.hover{background-color:rgba(72,237,255,0.1)}.uiInventory .grid .item.dragging{position:absolute;opacity:.5;pointer-events:none;background-color:transparent}.uiInventory .grid .item.dragging .icon{filter:brightness(100%) drop-shadow(0 -4px 0 #312136) drop-shadow(0 4px 0 #312136) drop-shadow(4px 0 0 #312136) drop-shadow(-4px 0 0 #312136)}.uiInventory .grid .item .quantity{left:6px;bottom:3px;position:absolute;color:#f2f5f5;filter:drop-shadow(0 -2px 0 #312136) drop-shadow(0 2px 0 #312136) drop-shadow(2px 0 0 #312136) drop-shadow(-2px 0 0 #312136)}.uiInventory .grid .item .icon{width:64px;height:64px;position:absolute;left:4px;top:4px}.uiInventory .grid .item.eq .quantity{color:#ffeb38}.uiInventory .grid .item.new .quantity{color:#80f643}.uiInventory .grid .item:hover .icon{filter:brightness(160%)}.uiInventory .tooltip{display:none;position:absolute;border:4px solid #808496;margin-left:-4px;margin-top:-4px;background-color:rgba(49,33,54,0.95);pointer-events:none;padding:6px;color:white;text-align:center;width:212px;line-height:18px}.uiInventory .tooltip .name{margin-bottom:8px}.uiInventory .tooltip .stats{color:#b8c9c9;margin-bottom:8px}.uiInventory .tooltip .stats .gainStat{color:#80f643}.uiInventory .tooltip .stats .loseStat{color:#d43346}.uiInventory .tooltip .level{color:#7f9c9c}.uiInventory .tooltip .material{color:#7f9c9c;display:none}.uiInventory .tooltip .info{color:#4f6666}.uiInventory .tooltip.no-compare .info{display:none}
\ No newline at end of file
diff --git a/src/client/ui/templates/leaderboard/styles.css b/src/client/ui/templates/leaderboard/styles.css
deleted file mode 100644
index e1211071..00000000
--- a/src/client/ui/templates/leaderboard/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiLeaderboard{display:none;width:600px;height:385px;border:5px solid rgba(60,63,76,0.9);text-align:center}.uiLeaderboard>.heading{color:#48edff;width:100%;height:36px;background-color:rgba(60,63,76,0.9)}.uiLeaderboard>.heading .heading-text{padding-top:8px;margin:auto}.uiLeaderboard .result{background-color:rgba(55,48,65,0.9);float:left;width:400px;height:calc(100% - 36px);padding:5px}.uiLeaderboard .result .headings{width:100%;height:36px}.uiLeaderboard .result .headings .col{text-align:left;padding:5px 10px;width:50%;float:left;color:#f2f5f5}.uiLeaderboard .result .list{height:calc(100% - 26px - 36px)}.uiLeaderboard .result .list .row{width:100%;height:26px}.uiLeaderboard .result .list .row.self .col{color:#80f643}.uiLeaderboard .result .list .row .col{padding:5px 10px;float:left;text-align:left;width:50%;color:#c0c3cf;height:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.uiLeaderboard .result .buttons{width:calc(100% - 26px);height:26px}.uiLeaderboard .result .buttons .btn{width:calc((100% - (13px * 3)) / 4);margin-right:13px;float:left;height:100%;color:#f2f5f5;padding-top:5px;cursor:pointer;background-color:#7a3ad3}.uiLeaderboard .result .buttons .btn:hover{background-color:#a24eff}.uiLeaderboard .result .buttons .btn:last-child{margin-right:0}.uiLeaderboard .prophecies{float:left;width:calc(100% - 400px);height:calc(100% - 36px);position:relative;background-color:rgba(55,48,65,0.9);padding:5px}.uiLeaderboard .prophecies .heading{width:100%;height:36px;color:#3fa7dd}.uiLeaderboard .prophecies .heading .heading-text{margin:auto}.uiLeaderboard .prophecies .prophecy,.uiLeaderboard .prophecies .button{cursor:pointer}.uiLeaderboard .prophecies .prophecy{width:100%;padding:5px 10px;background-color:#69696e;color:#f2f5f5;margin-bottom:15px}.uiLeaderboard .prophecies .prophecy.selected{color:#80f643}.uiLeaderboard .prophecies .prophecy:hover{background-color:#929398}.uiLeaderboard .prophecies .prophecy.prophecy-mine,.uiLeaderboard .prophecies .prophecy.prophecy-none{background-color:#929398}.uiLeaderboard .prophecies .prophecy.prophecy-mine:hover,.uiLeaderboard .prophecies .prophecy.prophecy-none:hover{background-color:#c0c3cf}.uiLeaderboard .prophecies .button{width:calc(100% - 10px);background-color:#3a71ba;padding:5px 10px;position:absolute;bottom:5px;color:#f2f5f5}.uiLeaderboard .prophecies .button:hover{background-color:#3fa7dd}
\ No newline at end of file
diff --git a/src/client/ui/templates/login/styles.css b/src/client/ui/templates/login/styles.css
deleted file mode 100644
index 77024df4..00000000
--- a/src/client/ui/templates/login/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiLogin{display:none;width:832px;height:634px;margin-top:-30px}.uiLogin .logo{width:562px;height:200px;margin-left:136.5px;margin-bottom:48px}.uiLogin .left,.uiLogin .right,.uiLogin .news{height:370px;float:left;background-color:#3a3b4a}.uiLogin .left{width:400px;padding:16px}.uiLogin .right{width:400px;padding:16px;margin-left:32px}.uiLogin .right .textbox,.uiLogin .right input:-webkit-autofill{box-shadow:0 0 0 1000px #1a1c21 inset;width:100%;color:#f2f5f5;-webkit-text-fill-color:#f2f5f5;margin-bottom:16px}.uiLogin .right .message{height:16px;width:100%;margin-top:16px;float:left;text-align:center;color:#ff4252}.uiLogin .right .top-buttons{width:100%;height:35px}.uiLogin .right .top-buttons .button{background-color:#7a3ad3;width:calc((100% - 16px) / 2);float:left;margin-right:16px;color:#f2f5f5}.uiLogin .right .top-buttons .button:last-child{margin-right:0}.uiLogin .right .top-buttons .button:hover{background-color:#a24eff}.uiLogin .right .buttons{width:100%;height:35px;margin-top:80px}.uiLogin .right .buttons .button{width:100%;margin-bottom:calc(16px / 2);background-color:#3a71ba;color:#f2f5f5}.uiLogin .right .buttons .button:hover{background-color:#3fa7dd}.uiLogin .news{width:400px;padding:16px}.uiLogin .news .heading{background-color:#69696e;width:100%;color:#f2f5f5;margin-bottom:8px;text-align:center;height:35px;padding-top:9px}.uiLogin .news .list{overflow-y:auto;padding:16px}.uiLogin .news .list .item{text-align:justify;color:#c0c3cf;margin-bottom:22px}.uiLogin .spacer-h{height:61px}
\ No newline at end of file
diff --git a/src/client/ui/templates/menu/styles.css b/src/client/ui/templates/menu/styles.css
deleted file mode 100644
index 93c0aeb8..00000000
--- a/src/client/ui/templates/menu/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiMenu{position:absolute;right:10px;bottom:10px;width:336px;height:144px;padding:8px;background-color:rgba(55,48,65,0.9)}.uiMenu [class^="btn"]{width:64px;height:64px;margin:0 8px;float:left;cursor:pointer;position:relative}.uiMenu [class^="btn"]:hover{background-color:rgba(242,245,245,0.1)}.uiMenu [class^="btn"] .icon{pointer-events:none;position:absolute;left:0;top:0;width:100%;height:100%}.uiMenu [class^="btn"].btnInventory .icon{background:url('../../../images/uiIcons.png') 0 0}.uiMenu [class^="btn"].btnEquipment .icon{background:url('../../../images/uiIcons.png') -192px 0}.uiMenu [class^="btn"].btnSmithing .icon{background:url('../../../images/uiIcons.png') -128px -64px}.uiMenu [class^="btn"].btnOnline .icon{background:url('../../../images/uiIcons.png') -64px 0}.uiMenu [class^="btn"].btnHelp .icon{background:url('../../../images/uiIcons.png') -128px 0}.uiMenu [class^="btn"].btnLeaderboard .icon{background:url('../../../images/uiIcons.png') -256px 0}.uiMenu [class^="btn"].btnReputation .icon{background:url('../../../images/uiIcons.png') -320px 0}.uiMenu [class^="btn"].btnOptions .icon{background:url('../../../images/uiIcons.png') 0 -64px}
\ No newline at end of file
diff --git a/src/client/ui/templates/messages/styles.css b/src/client/ui/templates/messages/styles.css
deleted file mode 100644
index 3f91ac24..00000000
--- a/src/client/ui/templates/messages/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiMessages{position:absolute;left:10px;bottom:10px;width:480px;padding:8px;pointer-events:none}.uiMessages.typing .el.message{display:block}.uiMessages.typing .filters{pointer-events:all;display:block}.uiMessages.typing .list{overflow-y:auto;background-color:#373041}.uiMessages.typing .list .list-message{filter:none}.uiMessages.active .list-message{opacity:1 !important}.uiMessages .filters{display:none;width:100%;height:26px;margin-bottom:10px}.uiMessages .filters .filter{height:100%;background-color:#373041;float:left;color:#505360;margin-right:10px;padding:5px 10px;cursor:pointer}.uiMessages .filters .filter:hover{background-color:#3c3f4c;color:#69696e}.uiMessages .filters .filter.active{background-color:#3c3f4c;color:#80f643}.uiMessages .filters .filter.active:hover{background-color:#505360;color:#c0c3cf}.uiMessages .list{overflow-y:hidden;width:100%;max-height:320px}.uiMessages .list .list-message{width:100%;padding:5px 10px;color:white;filter:drop-shadow(0 -2px 0 #312136) drop-shadow(0 2px 0 #312136) drop-shadow(2px 0 0 #312136) drop-shadow(-2px 0 0 #312136);word-wrap:break-word;line-height:18px;display:none}.uiMessages .list .list-message.q0{color:#f2f5f5}.uiMessages .list .list-message.q1{color:#3fa7dd}.uiMessages .list .list-message a,.uiMessages .list .list-message.q2{color:#ffeb38}.uiMessages .list .list-message.q3{color:#a24eff}.uiMessages .list .list-message.q4{color:#ff6942}.uiMessages .list .list-message.color-green{color:#80f643}.uiMessages .list.rep .list-message.rep{display:block}.uiMessages .list.chat .list-message.chat{display:block}.uiMessages .list.info .list-message.info{display:block}.uiMessages .list.loot .list-message.loot{display:block}.uiMessages .el.message{display:none;text-align:left;background-color:#3c3f4c;width:100%;color:#f2f5f5;padding:5px 10px}
\ No newline at end of file
diff --git a/src/client/ui/templates/messages/styles.less b/src/client/ui/templates/messages/styles.less
index 2ec54ee8..e7af65a9 100644
--- a/src/client/ui/templates/messages/styles.less
+++ b/src/client/ui/templates/messages/styles.less
@@ -113,6 +113,14 @@
color: @green;
}
+ &.color-red {
+ color: @red;
+ }
+
+ &.color-cyan {
+ color: @blueA;
+ }
+
display: none;
}
diff --git a/src/client/ui/templates/online/styles.css b/src/client/ui/templates/online/styles.css
deleted file mode 100644
index 7fbd230c..00000000
--- a/src/client/ui/templates/online/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiOnline{display:none;width:400px;height:400px;background-color:#3c3f4c;padding:32px;border:4px solid #929398;text-align:center}.uiOnline .list{width:100%;height:100%;overflow-y:auto;background-color:#373041}.uiOnline .list .onlineUser{color:#f2f5f5;height:24px;cursor:pointer}.uiOnline .list .onlineUser>div{float:left;padding:4px}.uiOnline .list .onlineUser>div:nth-child(1){width:10%}.uiOnline .list .onlineUser>div:nth-child(2){width:60%}.uiOnline .list .onlineUser>div:nth-child(3){width:30%}.uiOnline .list .onlineUser:hover{background-color:#75668a}
\ No newline at end of file
diff --git a/src/client/ui/templates/options/styles.css b/src/client/ui/templates/options/styles.css
deleted file mode 100644
index 4ec8ae0e..00000000
--- a/src/client/ui/templates/options/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiOptions{display:none;width:400px;background-color:#3c3f4c;border:4px solid #929398;text-align:center;padding:0 16px}.uiOptions .btn{color:#f2f5f5;width:100%;height:32px;background-color:#3fa7dd;margin:16px 0;padding-top:8px;cursor:pointer}.uiOptions .btn:hover{background-color:#80c5e9;color:#2d2136}
\ No newline at end of file
diff --git a/src/client/ui/templates/overlay/styles.css b/src/client/ui/templates/overlay/styles.css
deleted file mode 100644
index 88f3e3a0..00000000
--- a/src/client/ui/templates/overlay/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiOverlay{display:none;position:absolute;left:0;top:0;background-color:rgba(60,63,76,0.55);width:100%;height:100%;z-index:99999}
\ No newline at end of file
diff --git a/src/client/ui/templates/party/styles.css b/src/client/ui/templates/party/styles.css
deleted file mode 100644
index a0763003..00000000
--- a/src/client/ui/templates/party/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiParty .party{position:absolute;left:16px;top:104px}.uiParty .party .member{width:160px;margin-bottom:8px;background-color:#3a3b4a;color:#f2f5f5;padding:8px;cursor:pointer}.uiParty .party .member.differentZone{opacity:.4}.uiParty .party .member.differentZone .statBox [class^="stat"]{width:0 !important}.uiParty .party .member:last-child{margin-bottom:0}.uiParty .party .member .statBox{width:100%;height:18px;background-color:#3c3f4c;position:relative;margin-bottom:5px}.uiParty .party .member .statBox:last-child{margin-bottom:0}.uiParty .party .member .statBox [class^="stat"]{position:absolute;left:0;top:0;height:100%}.uiParty .party .member .statBox .text{position:absolute;left:0;top:0;width:100%;height:100%;text-align:center;color:#f2f5f5;padding:2px 8px;overflow:hidden;text-overflow:ellipsis;text-shadow:2px 0 #2d2136,-2px 0 #2d2136,0 -2px #2d2136,0 2px #2d2136,-2px -2px #2d2136,-2px 2px #2d2136,2px -2px #2d2136,2px 2px #2d2136}.uiParty .party .member .statBox:nth-child(1){background-color:#802343}.uiParty .party .member .statBox:nth-child(2){background-color:#42548d}.uiParty .party .member .statBox .statHp{background-color:#d43346}.uiParty .party .member .statBox .statMana{background-color:#3fa7dd}.uiParty .invite{position:absolute;right:16px;bottom:112px;background-color:#3c3f4c;border:4px solid #929398;padding:8px;color:#f2f5f5}.uiParty .invite .text{height:16px;margin-bottom:16px}.uiParty .invite .buttons [class^='btn']{width:96px;background-color:#929398;text-align:center;padding:8px;cursor:pointer}.uiParty .invite .buttons [class^='btn']:hover{background-color:#c6c7ca;color:#2d2136}.uiParty .invite .buttons [class^='btn'].btnDecline{float:left}.uiParty .invite .buttons [class^='btn'].btnAccept{float:right}
\ No newline at end of file
diff --git a/src/client/ui/templates/partyLoot/styles.css b/src/client/ui/templates/partyLoot/styles.css
deleted file mode 100644
index 998a2cb0..00000000
--- a/src/client/ui/templates/partyLoot/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiPartyLoot{position:absolute;width:392px;left:50%;transform:translateX(-50%);bottom:16px}.uiPartyLoot .item,.uiPartyLoot .result{position:relative;height:96px;border:4px solid #505360;padding:8px;background-color:rgba(49,33,54,0.95);margin-top:8px}.uiPartyLoot .item .left,.uiPartyLoot .result .left,.uiPartyLoot .item .right,.uiPartyLoot .result .right{float:left}.uiPartyLoot .item .left .icon,.uiPartyLoot .result .left .icon{width:64px;height:64px;position:relative;float:left;cursor:pointer}.uiPartyLoot .item .left .icon .image,.uiPartyLoot .result .left .icon .image{position:absolute;left:-4px;top:-4px;width:100%;height:100%;background:url('../../../images/items.png') 0 0}.uiPartyLoot .item .left .description,.uiPartyLoot .result .left .description{width:192px;float:left;text-align:center;line-height:18px}.uiPartyLoot .item .left .description .name,.uiPartyLoot .result .left .description .name{margin-top:0}.uiPartyLoot .item .right,.uiPartyLoot .result .right{width:104px;margin-left:8px}.uiPartyLoot .item .right>*,.uiPartyLoot .result .right>*{float:left}.uiPartyLoot .result{height:80px;border-color:#d43346}.uiPartyLoot .result .name{margin-top:-2px}.uiPartyLoot .result .winText{margin-bottom:4px;color:#f2f5f5}.uiPartyLoot .result.winner{border-color:#80f643}.uiPartyLoot .result .roll{width:100%;height:24px;float:left;margin-bottom:8px;position:relative}.uiPartyLoot .result .roll>*{position:absolute;left:0;top:0;width:100%;height:100%;text-align:center;color:#f2f5f5}.uiPartyLoot .result .roll .bar{background-color:#505360;width:50%}.uiPartyLoot .result .roll.winner .bar{background-color:#3c3f4c}.uiPartyLoot .result .roll .text{padding-top:3px}.uiPartyLoot .item .right .leftButtons{width:72px}.uiPartyLoot .item .right .button{height:24px;text-align:center;margin-bottom:8px;padding-top:4px;background-color:#505360;color:#f2f5f5}.uiPartyLoot .item .right .button:hover{background-color:#3fa7dd}.uiPartyLoot .item .right .button:hover.btnPass{background-color:#d43346}.uiPartyLoot .item .right .rightButtons{margin-left:8px;height:56px;width:24px;padding-top:20px}.uiPartyLoot .item .bottom{width:100%;height:8px;position:relative;background-color:rgba(55,48,65,0.95);float:left}.uiPartyLoot .item .bottom .bar{width:100%;height:100%;position:absolute;left:0;top:0;background-color:#f2f5f5}
\ No newline at end of file
diff --git a/src/client/ui/templates/progressBar/styles.css b/src/client/ui/templates/progressBar/styles.css
deleted file mode 100644
index 68e78aa0..00000000
--- a/src/client/ui/templates/progressBar/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiProgressBar{pointer-events:none;position:absolute;left:0;top:0;width:192px;left:calc(50% - 96px);top:calc(50% + 142px)}.uiProgressBar .barContainer{width:100%;height:28px;background-color:#42548d;border:2px solid #312136}.uiProgressBar .barContainer .bar{background-color:#3fa7dd;height:100%}.uiProgressBar .barContainer .text{padding-top:7px;color:#f2f5f5;position:absolute;left:0;top:0;text-align:center;width:100%;height:100%;z-index:1;text-shadow:2px 0 #2d2136,-2px 0 #2d2136,0 -2px #2d2136,0 2px #2d2136,-2px -2px #2d2136,-2px 2px #2d2136,2px -2px #2d2136,2px 2px #2d2136}
\ No newline at end of file
diff --git a/src/client/ui/templates/quests/styles.css b/src/client/ui/templates/quests/styles.css
deleted file mode 100644
index 45609f94..00000000
--- a/src/client/ui/templates/quests/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiQuests{position:absolute;right:10px;top:100px}.uiQuests .heading{color:#ffeb38;padding:8px;background-color:rgba(58,59,74,0.9)}.uiQuests .list .quest{cursor:pointer;padding:8px;background-color:rgba(58,59,74,0.9)}.uiQuests .list .quest:hover{background-color:rgba(92,93,117,0.9)}.uiQuests .list .quest .name{color:#f2f5f5}.uiQuests .list .quest .description{color:#8da7a7}.uiQuests .list .quest .ready-text{display:none}.uiQuests .list .quest.active .name{color:#3fa7dd}.uiQuests .list .quest.ready .name{color:#80f643}.uiQuests .list .quest.ready .description{display:none}.uiQuests .list .quest.ready .ready-text{display:block;color:#f2f5f5}
\ No newline at end of file
diff --git a/src/client/ui/templates/reputation/styles.css b/src/client/ui/templates/reputation/styles.css
deleted file mode 100644
index 5bfedb52..00000000
--- a/src/client/ui/templates/reputation/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiReputation{display:none;width:600px;height:385px;border:5px solid rgba(60,63,76,0.9);text-align:center}.uiReputation>.heading{color:#48edff;width:100%;height:36px;background-color:rgba(60,63,76,0.9)}.uiReputation>.heading .heading-text{padding-top:8px;margin:auto}.uiReputation .list,.uiReputation .info{background-color:rgba(55,48,65,0.9);float:left;height:calc(100% - 36px)}.uiReputation .list{width:40%;padding:15px 0 15px 15px}.uiReputation .list .faction{width:100%;padding:5px 10px;background-color:#69696e;color:#f2f5f5;margin-bottom:15px;cursor:pointer}.uiReputation .list .faction.selected{color:#80f643}.uiReputation .list .faction:hover{background-color:#929398}.uiReputation .info{width:60%;padding:15px 15px 15px 0}.uiReputation .info .heading{width:100%;height:36px;color:#3fa7dd}.uiReputation .info .heading .heading-bottom{margin:auto}.uiReputation .info .description{color:#c0c3cf;height:calc(100% - 36px - 25px);text-align:center}.uiReputation .info .bar-outer{width:100%;margin:auto;height:25px;position:relative}.uiReputation .info .bar-outer .back{width:100%;height:100%;background-color:#533399}.uiReputation .info .bar-outer .front{width:50%;height:100%;position:absolute;left:0;top:0;background-color:#7a3ad3}.uiReputation .info .bar-outer .tier{width:100%;height:100%;color:#f2f5f5;text-align:center;position:absolute;left:0;top:5px;filter:drop-shadow(0 -2px 0 #312136) drop-shadow(0 2px 0 #312136) drop-shadow(2px 0 0 #312136) drop-shadow(-2px 0 0 #312136)}
\ No newline at end of file
diff --git a/src/client/ui/templates/smithing/smithing.js b/src/client/ui/templates/smithing/smithing.js
index 1b135b36..e2994310 100644
--- a/src/client/ui/templates/smithing/smithing.js
+++ b/src/client/ui/templates/smithing/smithing.js
@@ -220,7 +220,7 @@ define([
var imgX = -item.sprite[0] * 64;
var imgY = -item.sprite[1] * 64;
- var spritesheet = 'items';
+ var spritesheet = item.spritesheet || 'items';
if (item.material)
spritesheet = 'materials';
else if (item.quest)
diff --git a/src/client/ui/templates/smithing/styles.css b/src/client/ui/templates/smithing/styles.css
deleted file mode 100644
index 5fc70a31..00000000
--- a/src/client/ui/templates/smithing/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiSmithing{display:none;background-color:#3c3f4c;border:5px solid #c0c3cf;padding:10px}.uiSmithing .top{margin-bottom:20px}.uiSmithing .top .heading{color:#ff6942;text-align:center;padding-bottom:10px}.uiSmithing .col{float:left;margin-right:10px}.uiSmithing .col:last-child{margin-right:0}.uiSmithing .col .heading{width:80px;height:16px;color:#f2f5f5;text-align:center;margin-bottom:10px}.uiSmithing .col .content{width:80px;height:80px;background-color:#312136}.uiSmithing .col .content.chance{padding-top:32px;color:#f2f5f5;text-align:center}.uiSmithing .col .content.item-picker,.uiSmithing .col .content.actionButton{cursor:pointer}.uiSmithing .col .content.item-picker:hover,.uiSmithing .col .content.actionButton:hover{background-color:#373041}.uiSmithing .col .content.item-picker>.icon{margin:8px;display:inline-block;width:64px;height:64px;background:url('../../../images/uiIcons.png') -256px -64px}.uiSmithing .col .content.actionButton{padding:8px}.uiSmithing .col .content.actionButton .icon{width:64px;height:64px;background:url('../../../images/uiIcons.png') -192px -64px}.uiSmithing .col .content .item{width:100%;height:100%;float:left;position:relative;cursor:pointer;box-sizing:border-box}.uiSmithing .col .content .item .quantity{left:6px;bottom:3px;position:absolute;color:#f2f5f5;filter:drop-shadow(0 -2px 0 #312136) drop-shadow(0 2px 0 #312136) drop-shadow(2px 0 0 #312136) drop-shadow(-2px 0 0 #312136)}.uiSmithing .col .content .item .quantity.red{color:#d43346}.uiSmithing .col .content .item .icon{width:64px;height:64px;position:absolute;left:8px;top:8px;filter:brightness(100%) drop-shadow(0 -4px 0 #312136) drop-shadow(0 4px 0 #312136) drop-shadow(4px 0 0 #312136) drop-shadow(-4px 0 0 #312136)}.uiSmithing .col:first-child .heading{width:160px}.uiSmithing .col:first-child .content{width:160px;background-color:transparent}.uiSmithing .col:first-child .content .col-btn{height:calc((100% - 10px) / 2);width:100%;color:#f2f5f5;text-align:center;padding-top:10px;background-color:#312136;margin-bottom:10px;cursor:pointer}.uiSmithing .col:first-child .content .col-btn.selected{color:#3fa7dd}.uiSmithing .col:first-child .content .col-btn:hover{background-color:#373041}
\ No newline at end of file
diff --git a/src/client/ui/templates/spells/spells.js b/src/client/ui/templates/spells/spells.js
index 5abd6fb7..5bff7b83 100644
--- a/src/client/ui/templates/spells/spells.js
+++ b/src/client/ui/templates/spells/spells.js
@@ -43,9 +43,10 @@ define([
.on('mouseover', this.onShowTooltip.bind(this, el, spells[i]))
.on('mouseleave', this.onHideTooltip.bind(this, el));
+ var spritesheet = spells[i].spritesheet || '../../../images/abilityIcons.png';
el
.find('.icon').css({
- 'background': 'url("../../../images/abilityIcons.png") ' + x + 'px ' + y + 'px'
+ 'background': 'url("' + spritesheet + '") ' + x + 'px ' + y + 'px'
})
.next().html(i + 1);
diff --git a/src/client/ui/templates/spells/styles.css b/src/client/ui/templates/spells/styles.css
deleted file mode 100644
index 5299a6c8..00000000
--- a/src/client/ui/templates/spells/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiSpells{position:absolute;right:10px;top:10px;height:80px;padding:8px;background-color:rgba(58,59,74,0.9)}.uiSpells .spell{width:64px;height:64px;float:left;margin:0 8px;cursor:pointer;position:relative}.uiSpells .spell:hover{background-color:rgba(242,245,245,0.1)}.uiSpells .spell .icon{position:absolute;left:0;top:0;width:100%;height:100%}.uiSpells .spell .cooldown{position:absolute;left:0;top:0;width:0;height:100%;background-color:rgba(212,51,70,0.75)}.uiSpells .spell .hotkey{position:absolute;left:-2px;bottom:-6px;color:#f2f5f5;font-size:18px;text-shadow:2px 2px 0 #2d2136,-2px -2px 0 #2d2136,2px -2px 0 #2d2136,-2px 2px 0 #2d2136,2px 2px 0 #2d2136}.uiSpells .spell .hotkey.no-mana{color:#d43346}
\ No newline at end of file
diff --git a/src/client/ui/templates/stash/styles.css b/src/client/ui/templates/stash/styles.css
deleted file mode 100644
index 303a3df3..00000000
--- a/src/client/ui/templates/stash/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiStash{display:none;background-color:#3c3f4c;position:relative}.uiStash .grid{float:left;width:584px;height:424px;overflow-y:scroll;background-color:#3c3f4c;margin:16px 0 0 16px}.uiStash .grid .item{width:64px;height:64px;float:left;position:relative;cursor:pointer;box-sizing:border-box;background-color:#373041;margin:0 8px 8px 0}.uiStash .grid .item:nth-child(8n){margin:0 0 8px 0}.uiStash .grid .item .quantity{left:3px;bottom:0;position:absolute;color:#f2f5f5;text-shadow:2px 2px 0 #2d2136,-2px -2px 0 #2d2136,2px -2px 0 #2d2136,-2px 2px 0 #2d2136,2px 2px 0 #2d2136}.uiStash .grid .item.eq{border:4px solid #595d6b}.uiStash .grid .item.eq .icon{left:-4px;top:-4px}.uiStash .grid .item.new{background-color:rgba(242,245,245,0.25)}.uiStash .grid .item:hover{background-color:rgba(242,245,245,0.1)}.uiStash .grid .item .icon{width:100%;height:100%;position:absolute;left:0;top:0}
\ No newline at end of file
diff --git a/src/client/ui/templates/talk/styles.css b/src/client/ui/templates/talk/styles.css
deleted file mode 100644
index 44c430c4..00000000
--- a/src/client/ui/templates/talk/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiTalk{border:5px solid rgba(60,63,76,0.9);width:400px;display:none;text-align:center;position:absolute;top:10px}.uiTalk .source{padding:5px 5px;background-color:rgba(60,63,76,0.9)}.uiTalk .source .name{color:#48edff;margin-bottom:5px}.uiTalk .source .msg{color:#f2f5f5;line-height:22px}.uiTalk .options{padding:5px;background-color:rgba(55,48,65,0.9)}.uiTalk .options .option{color:#3fa7dd;padding:5px 5px;cursor:pointer;line-height:22px}.uiTalk .options .option:hover{color:#f2f5f5}
\ No newline at end of file
diff --git a/src/client/ui/templates/target/styles.css b/src/client/ui/templates/target/styles.css
deleted file mode 100644
index 1a601aab..00000000
--- a/src/client/ui/templates/target/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiTarget{position:absolute;left:328px;top:10px;width:calc(200px + (8px * 2));padding:8px;background-color:rgba(58,59,74,0.9);display:none}.uiTarget .boxes{width:100%;float:left;height:100%}.uiTarget .boxes .infoBox{color:#f2f5f5;width:100%;height:18px;margin-bottom:5px;position:relative}.uiTarget .boxes .infoBox>*{float:left}.uiTarget .boxes .infoBox .infoName{width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uiTarget .boxes .infoBox .infoLevel{width:30%;text-align:right}.uiTarget .boxes .infoBox .infoLevel.high-level{text-shadow:2px 0 #d43346,-2px 0 #d43346,0 -2px #d43346,0 2px #d43346,-2px -2px #d43346,-2px 2px #d43346,2px -2px #d43346,2px 2px #d43346}.uiTarget .boxes .statBox{width:100%;height:18px;margin-bottom:5px;position:relative}.uiTarget .boxes .statBox:last-child{margin-bottom:0}.uiTarget .boxes .statBox [class^="stat"]{position:absolute;left:0;top:0;height:100%}.uiTarget .boxes .statBox .text{position:absolute;left:0;top:0;width:100%;height:100%;text-align:center;color:#f2f5f5;padding:2px 0;text-shadow:2px 0 #2d2136,-2px 0 #2d2136,0 -2px #2d2136,0 2px #2d2136,-2px -2px #2d2136,-2px 2px #2d2136,2px -2px #2d2136,2px 2px #2d2136}.uiTarget .boxes .statBox:nth-child(2){background-color:#802343}.uiTarget .boxes .statBox:nth-child(3){background-color:#42548d}.uiTarget .boxes .statBox .statHp{background-color:#d43346}.uiTarget .boxes .statBox .statMana{background-color:#3fa7dd}
\ No newline at end of file
diff --git a/src/client/ui/templates/target/target.js b/src/client/ui/templates/target/target.js
index 8c935682..76dee48a 100644
--- a/src/client/ui/templates/target/target.js
+++ b/src/client/ui/templates/target/target.js
@@ -21,7 +21,9 @@ define([
onContextMenu: function(e) {
var target = this.target;
- if ((e.button != 2) || (!target) || (!target.dialogue) || (target == window.player) || (target.player))
+ //This is kind of a hack. We check if the target has a prophecies component since we can't check for
+ // target.player (only the logged-in player has a player component)
+ if ((e.button != 2) || (!target) || (!target.dialogue) || (target == window.player) || (target.prophecies))
return;
var context = [
diff --git a/src/client/ui/templates/tooltipInfo/styles.css b/src/client/ui/templates/tooltipInfo/styles.css
deleted file mode 100644
index f906c4dc..00000000
--- a/src/client/ui/templates/tooltipInfo/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiTooltipInfo{position:absolute;right:11px;bottom:164px;background-color:rgba(55,48,65,0.9);padding:8px 32px;line-height:20px;color:#f2f5f5;text-align:center}
\ No newline at end of file
diff --git a/src/client/ui/templates/tooltipItem/styles.css b/src/client/ui/templates/tooltipItem/styles.css
deleted file mode 100644
index 5514c5d0..00000000
--- a/src/client/ui/templates/tooltipItem/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiTooltipItem .tooltip{display:none;position:absolute;margin-left:-4px;margin-top:-4px;background-color:rgba(60,63,76,0.95);pointer-events:none;padding:10px;color:#f2f5f5;text-align:center;line-height:18px;z-index:999999;max-width:300px}.uiTooltipItem .tooltip .name{margin-bottom:8px}.uiTooltipItem .tooltip .name .power{color:#80f643;display:none}.uiTooltipItem .tooltip .stats{color:#b8c9c9;margin-bottom:8px}.uiTooltipItem .tooltip .stats .gainStat{color:#80f643}.uiTooltipItem .tooltip .stats .loseStat{color:#d43346}.uiTooltipItem .tooltip .effects{color:#44cb95;margin-bottom:8px}.uiTooltipItem .tooltip .faction{color:#7f9c9c;margin-bottom:8px}.uiTooltipItem .tooltip .level{color:#7f9c9c}.uiTooltipItem .tooltip .level.high-level{color:#d43346}.uiTooltipItem .tooltip .material{color:#7f9c9c;display:none}.uiTooltipItem .tooltip .quest{color:#7f9c9c;display:none}.uiTooltipItem .tooltip .info{color:#4f6666}.uiTooltipItem .tooltip .worth{display:none}.uiTooltipItem .tooltip .worth.no-afford{color:#d43346}.uiTooltipItem .tooltip.no-compare .info{display:none}
\ No newline at end of file
diff --git a/src/client/ui/templates/tooltips/styles.css b/src/client/ui/templates/tooltips/styles.css
deleted file mode 100644
index 69b85137..00000000
--- a/src/client/ui/templates/tooltips/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiTooltips .tooltip{display:none;z-index:2;background-color:rgba(58,59,74,0.85);position:absolute;padding:8px;color:#f2f5f5;text-align:justify}.uiTooltips .tooltip.bright{background-color:#3a71ba;color:#f2f5f5}.uiTooltips .tooltip .hidden{display:none}
\ No newline at end of file
diff --git a/src/client/ui/templates/trade/styles.css b/src/client/ui/templates/trade/styles.css
deleted file mode 100644
index fb8bb47c..00000000
--- a/src/client/ui/templates/trade/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}[class^="ui"] .el{height:35px;text-align:center;padding:0 0 0 0;background-color:transparent}[class^="ui"] .textbox{border:none;outline:none;font-size:16px}[class^="ui"] div.textbox{padding-top:6px}[class^="ui"] .button{cursor:pointer;padding-top:10px}[class^="ui"] .button:hover{background-color:#473456}[class^="ui"] .spacer-h{width:100%}.uiTrade{width:auto}.uiTrade .no-afford{position:absolute;left:5px;top:5px;width:calc(100% - 10px);height:calc(100% - 10px);background-color:rgba(212,51,70,0.15)}
\ No newline at end of file
diff --git a/src/client/ui/templates/trade/trade.js b/src/client/ui/templates/trade/trade.js
index cb786760..3aebcea8 100644
--- a/src/client/ui/templates/trade/trade.js
+++ b/src/client/ui/templates/trade/trade.js
@@ -62,7 +62,7 @@ define([
var size = 64;
var offset = 0;
- var spritesheet = 'items';
+ var spritesheet = item.spritesheet || 'items';
if (item.material)
spritesheet = 'materials';
else if (item.quest)
diff --git a/src/server/combat/combat.js b/src/server/combat/combat.js
index fd0c3ba8..deba7b97 100644
--- a/src/server/combat/combat.js
+++ b/src/server/combat/combat.js
@@ -56,9 +56,6 @@ define([
isCrit = true;
amount *= 1.5;
}
-
- if (isCrit)
- amount *= 1.5;
}
return {
diff --git a/src/server/components/aggro.js b/src/server/components/aggro.js
index e1e0ffe0..3d9eadbd 100644
--- a/src/server/components/aggro.js
+++ b/src/server/components/aggro.js
@@ -119,6 +119,9 @@ define([
},
willAttack: function(target) {
+ if (this.obj == target)
+ return false;
+
var faction = target.aggro.faction;
if (faction == null)
return false;
diff --git a/src/server/components/auth.js b/src/server/components/auth.js
index 7df5c54e..6b7e8ef8 100644
--- a/src/server/components/auth.js
+++ b/src/server/components/auth.js
@@ -55,7 +55,15 @@ define([
var sLen = statKeys.length;
for (var i = 0; i < sLen; i++) {
var s = statKeys[i];
- if ((s.indexOf('xp') > -1) || (s == 'level') || (s == 'hp') || (s == 'mana'))
+ if (
+ (
+ (s.indexOf('xp') > -1) &&
+ (s != 'xpIncrease')
+ ) ||
+ (s == 'level') ||
+ (s == 'hp') ||
+ (s == 'mana')
+ )
continue;
delete stats.values[s];
@@ -115,8 +123,8 @@ define([
var result = characters
.map(c => ({
- name: c,
- level: leaderboard.getLevel(c)
+ name: c.name ? c.name : c,
+ level: leaderboard.getLevel(c.name ? c.name : c)
}));
data.callback(result);
@@ -282,6 +290,11 @@ define([
createCharacter: function(msg) {
var data = msg.data;
+ if ((data.name.length < 3) || (data.name.length > 12)) {
+ msg.callback(messages.createCharacter.nameLength);
+ return;
+ }
+
io.get({
ent: data.name,
field: 'character',
@@ -300,14 +313,8 @@ define([
this.obj.class = data.class;
this.obj.costume = data.costume;
- var tiles = {
- wizard: [2, 3],
- cleric: [4, 5],
- thief: [6, 7],
- warrior: [9, 10]
- };
-
- this.obj.cell = tiles[data.class][data.costume];
+ this.obj.cell = skins.getCell(this.obj.class, this.obj.costume);
+ this.obj.previewSpritesheet = skins.getSpritesheet(this.obj.class);
var simple = this.obj.getSimple(true);
simple.components.push({
@@ -360,10 +367,16 @@ define([
},
onDeleteCharacter: function(msg, result) {
this.characterList.spliceWhere(c => c == msg.data.name);
+ var characterList = this.characterList
+ .map(c => ({
+ name: c.name ? c.name : c,
+ level: leaderboard.getLevel(c.name ? c.name : c)
+ }));
+
io.set({
ent: this.username,
field: 'characterList',
- value: JSON.stringify(this.characterList),
+ value: JSON.stringify(characterList),
callback: this.onRemoveFromList.bind(this, msg)
});
diff --git a/src/server/components/dialogue.js b/src/server/components/dialogue.js
index d2dae95e..090b7648 100644
--- a/src/server/components/dialogue.js
+++ b/src/server/components/dialogue.js
@@ -86,7 +86,7 @@ define([
console.log('NO DIALOGUE STATES?!?!??!');
console.log('NO DIALOGUE STATES?!?!??!');
console.log('NO DIALOGUE STATES?!?!??!');
- console.log(this.obj);
+ console.log(this.obj);
return null;
}
var stateConfig = this.states[state];
diff --git a/src/server/components/extensions/factionVendor.js b/src/server/components/extensions/factionVendor.js
index a4eac0a2..9ce59d1d 100644
--- a/src/server/components/extensions/factionVendor.js
+++ b/src/server/components/extensions/factionVendor.js
@@ -140,9 +140,16 @@ define([
}
},
- canBuy: function(itemId, requestedBy) {
- var item = this.findItem(itemId, requestedBy.name);
- var result = requestedBy.reputation.canEquipItem(item);
+ canBuy: function(itemId, requestedBy, action) {
+ var item = null;
+ if (action == 'buy')
+ item = this.findItem(itemId, requestedBy.name);
+ else if (action == 'buyback')
+ item = this.findBuyback(itemId, requestedBy.name);
+
+ var result = true;
+ if (item.faction)
+ result = requestedBy.reputation.canEquipItem(item);
if (!result) {
requestedBy.instance.syncer.queue('onGetMessages', {
diff --git a/src/server/components/inventory.js b/src/server/components/inventory.js
index 02217d1e..42ccdc64 100644
--- a/src/server/components/inventory.js
+++ b/src/server/components/inventory.js
@@ -11,7 +11,6 @@ define([
objects,
classes
) {
-
return {
type: 'inventory',
@@ -196,6 +195,8 @@ define([
if (!item)
return;
+ amount = amount || item.quantity;
+
if (item.eq)
this.obj.equipment.unequip(id);
@@ -214,6 +215,8 @@ define([
if (this.obj.player)
this.getDefaultAbilities();
+ this.obj.fireEvent('afterDestroyItem', item, amount);
+
return item;
},
@@ -480,42 +483,38 @@ define([
else
this.obj.equipment.equip(item.id);
} else {
- var didEq = false;
- //if ((item.slot) && (this.obj.equipment)) {
- // didEq = this.obj.equipment.autoEquip(item.id);
- //}
- if (!didEq) {
- if (!item.effects)
- this.obj.syncer.setArray(true, 'inventory', 'getItems', item);
- else {
- var result = extend(true, {}, item);
- result.effects = result.effects.map(e => ({
- factionId: e.factionId,
- text: e.text,
- properties: e.properties
- }));
- var reputation = this.obj.reputation;
-
- if (result.factions) {
- result.factions = result.factions.map(function(f) {
- var faction = reputation.getBlueprint(f.id);
- var factionTier = reputation.getTier(f.id);
-
- var noEquip = null;
- if (factionTier < f.tier)
- noEquip = true;
-
- return {
- name: faction.name,
- tier: f.tier,
- tierName: ['Hated', 'Hostile', 'Unfriendly', 'Neutral', 'Friendly', 'Honored', 'Revered', 'Exalted'][f.tier],
- noEquip: noEquip
- };
- }, this);
- }
-
- this.obj.syncer.setArray(true, 'inventory', 'getItems', result);
+ if (!item.effects)
+ this.obj.syncer.setArray(true, 'inventory', 'getItems', item);
+ else {
+ var result = extend(true, {}, item);
+ result.effects = result.effects.map(e => ({
+ factionId: e.factionId,
+ text: e.text,
+ properties: e.properties
+ }));
+
+ var reputation = this.obj.reputation;
+
+ //Don't do this check if we don't have a reputation cpn. That means this is most likely a bag
+ if ((reputation) && (result.factions)) {
+ result.factions = result.factions.map(function(f) {
+ var faction = reputation.getBlueprint(f.id);
+ var factionTier = reputation.getTier(f.id);
+
+ var noEquip = null;
+ if (factionTier < f.tier)
+ noEquip = true;
+
+ return {
+ name: faction.name,
+ tier: f.tier,
+ tierName: ['Hated', 'Hostile', 'Unfriendly', 'Neutral', 'Friendly', 'Honored', 'Revered', 'Exalted'][f.tier],
+ noEquip: noEquip
+ };
+ }, this);
}
+
+ this.obj.syncer.setArray(true, 'inventory', 'getItems', result);
}
}
diff --git a/src/server/components/player.js b/src/server/components/player.js
index efe75a97..c35d6321 100644
--- a/src/server/components/player.js
+++ b/src/server/components/player.js
@@ -26,9 +26,10 @@ define([
spawn: function(character) {
var obj = this.obj;
extend(true, obj, {
- sheetName: 'characters',
+ sheetName: classes.getSpritesheet(character.class),
layerName: 'mobs',
cell: character.cell,
+ previewSpritesheet: character.previewSpritesheet,
name: character.name,
class: character.class,
zoneName: character.zoneName || 'tutorial-cove',
@@ -62,7 +63,7 @@ define([
obj.addComponent('spellbook');
obj.addComponent('dialogue');
- obj.addComponent('trade');
+ obj.addComponent('trade', character.components.find(c => c.type == 'trade'));
obj.addComponent('reputation', character.components.find(c => c.type == 'reputation'));
obj.addComponent('social');
diff --git a/src/server/components/social.js b/src/server/components/social.js
index 86106a99..d7b5c2fc 100644
--- a/src/server/components/social.js
+++ b/src/server/components/social.js
@@ -1,7 +1,9 @@
define([
- 'world/atlas'
+ 'world/atlas',
+ 'config/roles'
], function(
- atlas
+ atlas,
+ roles
) {
return {
type: 'social',
@@ -33,6 +35,20 @@ define([
},
sendPartyMessage: function(msg) {
+ if (!this.party) {
+ this.obj.socket.emit('events', {
+ onGetMessages: [{
+ messages: [{
+ class: 'q0',
+ message: 'you are not in a party',
+ type: 'info'
+ }]
+ }]
+ });
+
+ return;
+ }
+
var charname = this.obj.auth.charname;
var message = msg.data.message.substr(1);
@@ -61,7 +77,7 @@ define([
else
level = 0;
- var msgStyle = 'q' + level;
+ var msgStyle = roles.getRoleMessageStyle(this.obj) || ('q' + level);
var messageString = msg.data.message;
if (messageString[0] == '@') {
@@ -106,12 +122,14 @@ define([
} else if (messageString[0] == '%') {
this.sendPartyMessage(msg);
} else {
+ var prefix = roles.getRoleMessagePrefix(this.obj) || '';
+
io.sockets.emit('event', {
event: 'onGetMessages',
data: {
messages: [{
class: msgStyle,
- message: charname + ': ' + msg.data.message,
+ message: prefix + charname + ': ' + msg.data.message,
type: 'chat'
}]
}
diff --git a/src/server/components/spellbook.js b/src/server/components/spellbook.js
index 73095a31..e7e45892 100644
--- a/src/server/components/spellbook.js
+++ b/src/server/components/spellbook.js
@@ -2,12 +2,14 @@ define([
'./../config/spells/spellTemplate',
'./../config/animations',
'./../config/spells',
- './../config/spellsConfig'
+ './../config/spellsConfig',
+ 'misc/events'
], function(
spellTemplate,
animations,
playerSpells,
- playerSpellsConfig
+ playerSpellsConfig,
+ events
) {
return {
type: 'spellbook',
@@ -82,9 +84,15 @@ define([
var type = options.type[0].toUpperCase() + options.type.substr(1);
- var typeTemplate = require('./config/spells/spell' + type);
+ var typeTemplate = {
+ type: type,
+ template: null
+ };
+ events.emit('onBeforeGetSpellTemplate', typeTemplate);
+ if (!typeTemplate.template)
+ typeTemplate.template = require('./config/spells/spell' + type);
- var builtSpell = extend(true, {}, spellTemplate, typeTemplate, options);
+ var builtSpell = extend(true, {}, spellTemplate, typeTemplate.template, options);
builtSpell.obj = this.obj;
builtSpell.baseDamage = builtSpell.damage;
builtSpell.damage += (options.damageAdd || 0);
diff --git a/src/server/components/stats.js b/src/server/components/stats.js
index 848950ad..159c1438 100644
--- a/src/server/components/stats.js
+++ b/src/server/components/stats.js
@@ -232,11 +232,8 @@ define([
if (a.obj.stats)
a.obj.stats.getXp(inc);
- else {
- console.log('give xp to???');
- console.log(a.obj);
- }
-
+
+
a.obj.fireEvent('afterKillMob', target);
}
diff --git a/src/server/components/trade.js b/src/server/components/trade.js
index d9a57310..fa34e98c 100644
--- a/src/server/components/trade.js
+++ b/src/server/components/trade.js
@@ -11,7 +11,7 @@ define([
maxBuyback: 10,
- gold: 1000,
+ gold: 0,
target: null,
@@ -21,6 +21,8 @@ define([
},
init: function(blueprint) {
+ this.gold = blueprint.gold;
+
if (!blueprint.items)
return;
@@ -132,7 +134,7 @@ define([
return;
}
- if (!targetTrade.canBuy(msg.itemId, this.obj)) {
+ if (!targetTrade.canBuy(msg.itemId, this.obj, msg.action)) {
this.resolveCallback(msg);
return;
}
@@ -260,7 +262,7 @@ define([
return this.items;
},
- canBuy: function(itemId, requestedBy) {
+ canBuy: function(itemId, requestedBy, action) {
return true;
},
diff --git a/src/server/config/classes.js b/src/server/config/classes.js
index ac68917b..c46080aa 100644
--- a/src/server/config/classes.js
+++ b/src/server/config/classes.js
@@ -1,9 +1,9 @@
define([
-
+ 'misc/events'
], function(
-
+ events
) {
- return {
+ var classes = {
spells: {
wizard: ['ice spear'],
cleric: ['healing circle'],
@@ -41,6 +41,13 @@ define([
cleric: 'Mace',
thief: 'Dagger',
warrior: 'Axe'
+ },
+
+ getSpritesheet: function(className) {
+ return this.stats[className].spritesheet || 'characters';
}
};
+
+ events.emit('onBeforeGetClasses', classes);
+ return classes;
});
\ No newline at end of file
diff --git a/src/server/config/clientConfig.js b/src/server/config/clientConfig.js
new file mode 100644
index 00000000..5625e440
--- /dev/null
+++ b/src/server/config/clientConfig.js
@@ -0,0 +1,17 @@
+define([
+ 'misc/events'
+], function(
+ events
+) {
+ return {
+ resourceList: [],
+
+ init: function() {
+ events.emit('onBeforeGetResourceList', this.resourceList);
+ },
+
+ getResourcesList: function(msg) {
+ msg.callback(this.resourceList);
+ }
+ };
+});
\ No newline at end of file
diff --git a/src/server/config/factions/gaekatla.js b/src/server/config/factions/gaekatla.js
index 274ae422..72199f48 100644
--- a/src/server/config/factions/gaekatla.js
+++ b/src/server/config/factions/gaekatla.js
@@ -57,7 +57,7 @@ define([
// return;
//Spawn a mob
- var mob = spawners.spawn({
+ var mob = mob.instance.spawners.spawn({
amountLeft: 1,
blueprint: {
x: mob.x,
diff --git a/src/server/config/maps/tutorial/dialogues.js b/src/server/config/maps/tutorial/dialogues.js
index fcfd1b3e..540fc427 100644
--- a/src/server/config/maps/tutorial/dialogues.js
+++ b/src/server/config/maps/tutorial/dialogues.js
@@ -15,7 +15,7 @@ module.exports = {
goto: 3
},
'1.3': {
- msg: `Have you scanvenged anything worth selling lately?`,
+ msg: `Have you scavenged anything worth selling lately?`,
goto: 'tradeBuy'
},
'1.4': {
diff --git a/src/server/config/quests/templates/questKillX.js b/src/server/config/quests/templates/questKillX.js
index 585300c3..9503822c 100644
--- a/src/server/config/quests/templates/questKillX.js
+++ b/src/server/config/quests/templates/questKillX.js
@@ -12,19 +12,36 @@ define([
type: 'killX',
build: function() {
- if (!this.mobName) {
+ //If we're not in the correct zone, don't do this check, it'll just crash the server
+ // since the mob won't be available (most likely) in the zoneFile
+ if (this.obj.zoneName == this.zoneName) {
var mobTypes = this.obj.instance.spawners.zone.mobs;
- var mobCounts = this.obj.instance.spawners.mobTypes;
- var keys = Object.keys(mobTypes).filter(function(m) {
- return (m != 'default');
- });
- this.mobType = keys[~~(Math.random() * keys.length)];
- var needMax = 8;
- this.mobName = this.mobType.replace(/\w\S*/g, function(txt) {
- return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
- });
-
- this.need = Math.max(1, ~~((needMax * 0.2) + (Math.random() * needMax * 0.8)));
+ if (this.mobName) {
+ var mobType = mobTypes[this.mobName.toLowerCase()];
+ //Maybe the zoneFile changed in the meantime. If so, regenerate
+ if ((!mobType) || (mobType.attackable == false))
+ this.mobName = null;
+ }
+
+ if (!this.mobName) {
+ var mobCounts = this.obj.instance.spawners.mobTypes;
+ var keys = Object.keys(mobTypes).filter(function(m) {
+ return (
+ (m != 'default') &&
+ (
+ (mobTypes[m].attackable) ||
+ (mobTypes[m].attackable == null)
+ )
+ );
+ });
+ this.mobType = keys[~~(Math.random() * keys.length)];
+ var needMax = 8;
+ this.mobName = this.mobType.replace(/\w\S*/g, function(txt) {
+ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
+ });
+
+ this.need = Math.max(1, ~~((needMax * 0.2) + (Math.random() * needMax * 0.8)));
+ }
}
this.description = 'Kill ' + this.have + '/' + this.need + ' ' + this.mobName;
diff --git a/src/server/config/quests/templates/questLootGen.js b/src/server/config/quests/templates/questLootGen.js
index 1c87e17d..3badb2a8 100644
--- a/src/server/config/quests/templates/questLootGen.js
+++ b/src/server/config/quests/templates/questLootGen.js
@@ -68,6 +68,18 @@ define([
if (this.have == this.need)
this.ready();
+ this.description = 'Loot ' + this.have + '/' + this.need + ' ' + this.item.name + ' from ' + this.mobName;
+ this.obj.syncer.setArray(true, 'quests', 'updateQuests', this.simplify(true));
+ },
+
+ afterDestroyItem: function(item, quantity) {
+ if (item.name.toLowerCase() != this.item.name.toLowerCase())
+ return;
+
+ this.have -= quantity;
+ if (this.have < 0)
+ this.have = 0;
+
this.description = 'Loot ' + this.have + '/' + this.need + ' ' + this.item.name + ' from ' + this.mobName;
this.obj.syncer.setArray(true, 'quests', 'updateQuests', this.simplify(true));
}
diff --git a/src/server/config/roles.js b/src/server/config/roles.js
index a1e3d370..e07e9f16 100644
--- a/src/server/config/roles.js
+++ b/src/server/config/roles.js
@@ -7,6 +7,8 @@ define([
accounts: {
admin: {
level: 10,
+ messageStyle: 'color-cyan',
+ messagePrefix: '(dev) ',
items: [{
type: 'key',
name: 'Key to the world',
@@ -55,6 +57,16 @@ define([
return success;
},
+ getRoleMessageStyle: function(player) {
+ var account = player.account;
+ return this.accounts[account] ? this.accounts[account].messageStyle : null;
+ },
+
+ getRoleMessagePrefix: function(player) {
+ var account = player.account;
+ return this.accounts[account] ? this.accounts[account].messagePrefix : null;
+ },
+
sendMessage: function(player, msg) {
msg = 'Only certain roles can ' + msg + ' at the moment';
diff --git a/src/server/config/skins.js b/src/server/config/skins.js
index 888f6a16..9b218218 100644
--- a/src/server/config/skins.js
+++ b/src/server/config/skins.js
@@ -1,7 +1,7 @@
define([
-
+ 'misc/events'
], function(
-
+ events
) {
var config = {
'wizard 1': {
@@ -60,6 +60,8 @@ define([
}
};
+ events.emit('onBeforeGetSkins', config);
+
return {
getBlueprint: function(skinId) {
return config[skinId];
@@ -79,10 +81,35 @@ define([
if (!result[l.class])
result[l.class] = [];
- result[l.class].push(l.sprite[0] + ',' + l.sprite[1]);
+ result[l.class].push({
+ sprite: l.sprite[0] + ',' + l.sprite[1],
+ spritesheet: l.spritesheet
+ });
});
return result;
+ },
+
+ getCell: function(className, costume) {
+ var res = Object.keys(config)
+ .filter(function(s) {
+ return (config[s].class == className);
+ })
+ .map(function(s) {
+ return config[s];
+ })[costume];
+
+ return (res.sprite[1] * 8) + res.sprite[0];
+ },
+
+ getSpritesheet: function(className) {
+ return Object.keys(config)
+ .filter(function(s) {
+ return (config[s].class == className);
+ })
+ .map(function(s) {
+ return config[s];
+ })[0].spritesheet;
}
};
});
\ No newline at end of file
diff --git a/src/server/config/spells.js b/src/server/config/spells.js
index 762add35..01baa07c 100644
--- a/src/server/config/spells.js
+++ b/src/server/config/spells.js
@@ -1,9 +1,9 @@
define([
-
+ 'misc/events'
], function(
-
+ events
) {
- return [{
+ var spells = [{
name: 'Magic Missile',
description: 'Launches an orb of unfocussed energy at your target.',
type: 'projectile',
@@ -382,4 +382,7 @@ define([
chance: 0.02
}
}];
+
+ events.emit('onBeforeGetSpellsInfo', spells);
+ return spells;
});
\ No newline at end of file
diff --git a/src/server/config/spells/spellSlowBlast.js b/src/server/config/spells/spellSlowBlast.js
index 8306a40d..3d2d7276 100644
--- a/src/server/config/spells/spellSlowBlast.js
+++ b/src/server/config/spells/spellSlowBlast.js
@@ -128,7 +128,6 @@ define([
},
cast: function(action) {
- console.log(1);
this.castingEffect = this.obj.effects.addEffect({
type: 'casting'
});
diff --git a/src/server/config/spells/spellWarnBlast.js b/src/server/config/spells/spellWarnBlast.js
index a6fef14b..fcadfc5c 100644
--- a/src/server/config/spells/spellWarnBlast.js
+++ b/src/server/config/spells/spellWarnBlast.js
@@ -82,8 +82,6 @@ define([
}]
};
- console.log(this.particles);
-
syncer.queue('onGetObject', effect);
this.queueCallback(this.onWarningOver.bind(this, x, y), this.delay * 350);
diff --git a/src/server/config/spellsConfig.js b/src/server/config/spellsConfig.js
index cb09914f..69092cc5 100644
--- a/src/server/config/spellsConfig.js
+++ b/src/server/config/spellsConfig.js
@@ -1,9 +1,9 @@
define([
-
+ 'misc/events'
], function(
-
+ events
) {
- return {
+ var spells = {
'magic missile': {
statType: 'int',
statMult: 0.216,
@@ -172,4 +172,7 @@ define([
}
}
};
+
+ events.emit('onBeforeGetSpellsConfig', spells);
+ return spells;
});
\ No newline at end of file
diff --git a/src/server/globals.js b/src/server/globals.js
index 93ec4a85..3713eed8 100644
--- a/src/server/globals.js
+++ b/src/server/globals.js
@@ -4,14 +4,16 @@ define([
'misc/helpers',
'items/lootRoller',
'world/atlas',
- 'leaderboard/leaderboard'
+ 'leaderboard/leaderboard',
+ 'config/clientConfig'
], function(
extend,
cons,
helpers,
lootRoller,
atlas,
- leaderboard
+ leaderboard,
+ clientConfig
) {
return {
init: function() {
@@ -21,6 +23,9 @@ define([
global.lootRoller = lootRoller;
global.atlas = atlas;
global.leaderboard = leaderboard;
+ global.clientConfig = clientConfig;
+
+ clientConfig.init();
}
};
});
\ No newline at end of file
diff --git a/src/server/items/config/types.js b/src/server/items/config/types.js
index 450fca0c..4b5715f6 100644
--- a/src/server/items/config/types.js
+++ b/src/server/items/config/types.js
@@ -1,9 +1,9 @@
define([
-
+ 'misc/events'
], function(
-
+ events
) {
- return {
+ var types = {
head: {
'Helmet': {
sprite: [0, 0],
@@ -191,4 +191,7 @@ define([
}
}
}
+
+ events.emit('onBeforeGetItemTypes', types);
+ return types;
});
\ No newline at end of file
diff --git a/src/server/items/generators/types.js b/src/server/items/generators/types.js
index ba49e4c5..b251c4a8 100644
--- a/src/server/items/generators/types.js
+++ b/src/server/items/generators/types.js
@@ -15,6 +15,8 @@ define([
item.type = type;
item.sprite = typeBlueprint.sprite;
+ if (typeBlueprint.spritesheet)
+ item.spritesheet = typeBlueprint.spritesheet;
if (typeBlueprint.spellName)
blueprint.spellName = typeBlueprint.spellName;
diff --git a/src/server/misc/events.js b/src/server/misc/events.js
new file mode 100644
index 00000000..edda6923
--- /dev/null
+++ b/src/server/misc/events.js
@@ -0,0 +1,62 @@
+define([
+
+], function(
+
+) {
+ return {
+ events: {},
+ queue: [],
+ on: function(event, callback) {
+ var list = this.events[event] || (this.events[event] = []);
+ list.push(callback);
+
+ for (var i = 0; i < this.queue.length; i++) {
+ var q = this.queue[i];
+ if (q.event != event)
+ continue;
+
+ this.queue.splice(i, 1);
+ i--;
+
+ q.args.splice(0, 0, event);
+
+ this.emit.apply(this, q.args);
+ }
+
+ return callback;
+ },
+ off: function(event, callback) {
+ var list = this.events[event] || [];
+ var lLen = list.length;
+ for (var i = 0; i < lLen; i++) {
+ if (list[i] == callback) {
+ list.splice(i, 1);
+ i--;
+ lLen--;
+ }
+ }
+
+ if (lLen == 0)
+ delete this.events[event];
+ },
+ emit: function(event) {
+ var args = [].slice.call(arguments, 1);
+
+ var list = this.events[event];
+ if (!list) {
+ this.queue.push({
+ event: event,
+ args: args
+ });
+
+ return;
+ }
+
+ var len = list.length
+ for (var i = 0; i < len; i++) {
+ var l = list[i];
+ l.apply(null, args);
+ }
+ }
+ };
+});
\ No newline at end of file
diff --git a/src/server/misc/fileLister.js b/src/server/misc/fileLister.js
index 8342b5fb..b4bd2ac7 100644
--- a/src/server/misc/fileLister.js
+++ b/src/server/misc/fileLister.js
@@ -10,6 +10,16 @@ define([
return fs.readdirSync(path).filter(function(file) {
return !fs.statSync(fsPath.join(path, file)).isDirectory();
});
+ },
+
+ getFolderList: function(path) {
+ try {
+ return fs.readdirSync(path).filter(function(file) {
+ return fs.statSync(fsPath.join(path, file)).isDirectory();
+ });
+ } catch (e) {
+ return [];
+ }
}
};
});
\ No newline at end of file
diff --git a/src/server/misc/messages.js b/src/server/misc/messages.js
index b904acd2..93c6e182 100644
--- a/src/server/misc/messages.js
+++ b/src/server/misc/messages.js
@@ -10,6 +10,9 @@ define([
illegal: 'illegal characters in username/password',
incorrect: 'invalid username and password',
charExists: 'character name is taken'
- }
+ },
+ createCharacter: {
+ nameLength: 'name must be between 3 and 12 characters'
+ }
};
});
\ No newline at end of file
diff --git a/src/server/misc/mods.js b/src/server/misc/mods.js
new file mode 100644
index 00000000..13fbefea
--- /dev/null
+++ b/src/server/misc/mods.js
@@ -0,0 +1,38 @@
+define([
+ 'misc/fileLister',
+ 'misc/events'
+], function(
+ fileLister,
+ events
+) {
+ return {
+ init: function() {
+ var modList = fileLister.getFolderList('mods');
+
+ modList.forEach(function(m) {
+ var mod = null;
+ try {
+ mod = require('mods/' + m + '/index');
+ }
+ catch (e) {}
+
+ if (mod) {
+ mod.events = events;
+ mod.folderName = 'server/mods/' + m;
+ mod.relativeFolderName = 'mods/' + m;
+
+ (mod.extraScripts || []).forEach(function(e) {
+ try {
+ var script = require('mods/' + m + '/' + e);
+ script.folderName = mod.folderName;
+ script.relativeFolderName = mod.relativeFolderName;
+ }
+ catch (e) {}
+ }, this);
+
+ mod.init();
+ }
+ }, this);
+ }
+ };
+});
\ No newline at end of file
diff --git a/src/server/server.js b/src/server/server.js
index ed2f7037..12b0e561 100644
--- a/src/server/server.js
+++ b/src/server/server.js
@@ -10,7 +10,10 @@ define([
global.io = require('socket.io')(server);
app.use(function(req, res, next) {
- req.url = '/client/' + req.url;
+ if (req.url.indexOf('/server') != 0)
+ req.url = '/client/' + req.url;
+ else
+ req.url.substr(7);
next();
});
diff --git a/src/server/startup.js b/src/server/startup.js
index 0f937ee0..35308852 100644
--- a/src/server/startup.js
+++ b/src/server/startup.js
@@ -4,14 +4,16 @@ define([
'world/atlas',
'components/components',
'leaderboard/leaderboard',
- 'security/io'
+ 'security/io',
+ 'misc/mods'
], function(
globals,
server,
atlas,
components,
leaderboard,
- io
+ io,
+ mods
) {
return {
init: function() {
@@ -30,6 +32,7 @@ define([
server.init(this.onServerReady.bind(this));
},
onServerReady: function() {
+ mods.init();
atlas.init();
leaderboard.init();
}
diff --git a/src/server/world/map.js b/src/server/world/map.js
index 2e329f1f..ddedf8cc 100644
--- a/src/server/world/map.js
+++ b/src/server/world/map.js
@@ -87,7 +87,7 @@ define([
mapFile = require('../config/maps/' + this.name + '/map');
this.mapFile = mapFile;
-
+ this.mapFile.properties = this.mapFile.properties || {};
mapScale = mapFile.tilesets[0].tileheight;
this.instanced = mapFile.properties.instanced;
@@ -310,7 +310,7 @@ define([
x: cell.x / mapScale,
y: (cell.y / mapScale) - 1,
name: name,
- properties: cell.properties
+ properties: cell.properties || {}
};
if ((this.zone) && (this.zone.objects) && (this.zone.objects[objZoneName.toLowerCase()]))
diff --git a/src/server/world/mobBuilder.js b/src/server/world/mobBuilder.js
index 86aecc8d..bcc2e368 100644
--- a/src/server/world/mobBuilder.js
+++ b/src/server/world/mobBuilder.js
@@ -179,7 +179,7 @@ define([
if (level < 10) {
hpMult *= [0.005, 0.01, 0.1, 0.2, 0.5, 0.65, 0.75, 0.85, 0.95][level - 1];
- dmgMult *= [0.2, 0.45, 0.7, 0.8, 0.9, 0.92, 0.94, 9.6, 9.8][level - 1]
+ dmgMult *= [0.2, 0.45, 0.7, 0.8, 0.9, 0.92, 0.94, 0.96, 0.98][level - 1]
}
if (mob.isRare) {
diff --git a/src/server/world/worker.js b/src/server/world/worker.js
index 1616887e..acf56164 100644
--- a/src/server/world/worker.js
+++ b/src/server/world/worker.js
@@ -9,9 +9,9 @@ global.io = true;
var instancer = null;
requirejs([
- 'extend', 'misc/helpers', 'components/components', 'world/instancer', 'security/io'
+ 'extend', 'misc/helpers', 'components/components', 'world/instancer', 'security/io', 'misc/mods'
], function(
- extend, helpers, components, _instancer, io
+ extend, helpers, components, _instancer, io, mods
) {
var onDbReady = function() {
global.extend = extend;
@@ -26,6 +26,8 @@ requirejs([
});
});
+ mods.init();
+
setInterval(function() {
global.gc();
}, 60000);