Merging issues into master Closes #52, #49, #41, #42, #43, #35, #22, #7, #33, #19, #29, #16, #4, #15, #9, #12, and #6 See merge request !37tags/v0.1.2
@@ -1,2 +1,6 @@ | |||
node_modules | |||
storage.db | |||
storage.db | |||
*.sublime-project | |||
*.sublime-workspace | |||
*.css |
@@ -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}body{margin:0;width:100vw;height:100vh;background-color:#2d2136;overflow:hidden}.ui-container{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;overflow:hidden}@font-face{font-family:bitty;src:url('../fonts/bitty.ttf')}*{box-sizing:border-box;font-family:bitty;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.canvasContainer{position:relative;float:left}.canvasContainer.visible{opacity:1;transition:1s}.canvasContainer canvas{left:0;top:0}.disabled{opacity:.4 !important;pointer-events:none !important}::-webkit-scrollbar{width:16px}::-webkit-scrollbar-track{background-color:#3c3f4c;-webkit-border-radius:0;border-radius:0}::-webkit-scrollbar-thumb{-webkit-border-radius:10px;border-radius:0;background:#929398} |
@@ -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}body{margin:0;width:100vw;height:100vh;background-color:#eee}.ui-container{width:100%;height:100%;position:absolute;left:0;top:0}*{box-sizing:border-box;font-family:bitty} |
@@ -1,6 +1,14 @@ | |||
@import "colors.less"; | |||
[class^="ui"] { | |||
input, textarea { | |||
-webkit-user-select: text; | |||
-khtml-user-select: text; | |||
-moz-user-select: text; | |||
-ms-user-select: text; | |||
user-select: text; | |||
} | |||
.el { | |||
height: 35px; | |||
text-align: center; | |||
@@ -30,4 +38,4 @@ | |||
.spacer-h { | |||
width: 100%; | |||
} | |||
} | |||
} |
@@ -10,7 +10,7 @@ define([ | |||
action: 'buy', | |||
init: function(blueprint) { | |||
}, | |||
extend: function(blueprint) { | |||
@@ -35,8 +35,23 @@ define([ | |||
hasFocus: true, | |||
init: function() { | |||
client.init(this.onClientReady.bind(this)); | |||
}, | |||
onClientReady: function() { | |||
client.request({ | |||
module: 'clientConfig', | |||
method: 'getResourcesList', | |||
callback: this.onGetResourceList.bind(this) | |||
}); | |||
}, | |||
onGetResourceList: function(list) { | |||
resources.init(list); | |||
events.on('onResourcesLoaded', this.start.bind(this)); | |||
}, | |||
start: function() { | |||
window.onfocus = this.onFocus.bind(this, true); | |||
window.onblur = this.onFocus.bind(this, false); | |||
@@ -46,7 +61,6 @@ define([ | |||
}); | |||
objects.init(); | |||
client.init(); | |||
renderer.init(); | |||
input.init(); | |||
@@ -97,7 +97,13 @@ define([ | |||
this.stage.addChild(layers[l]) | |||
}, this); | |||
['sprites', 'tiles', 'mobs', 'bosses', 'bigObjects', 'objects', 'characters', 'attacks', 'auras', 'walls', 'ui', 'animChar', 'animMob', 'animBoss'].forEach(function(t) { | |||
var spriteNames = ['sprites', 'tiles', 'mobs', 'bosses', 'bigObjects', 'objects', 'characters', 'attacks', 'auras', 'walls', 'ui', 'animChar', 'animMob', 'animBoss']; | |||
resources.spriteNames.forEach(function(s) { | |||
if (s.indexOf('.png') > -1) | |||
spriteNames.push(s); | |||
}); | |||
spriteNames.forEach(function(t) { | |||
this.textures[t] = new pixi.BaseTexture(resources.sprites[t].image); | |||
this.textures[t].scaleMode = pixi.SCALE_MODES.NEAREST; | |||
}, this); | |||
@@ -28,13 +28,17 @@ define([ | |||
], | |||
sprites: {}, | |||
ready: false, | |||
init: function() { | |||
init: function(list) { | |||
list.forEach(function(l) { | |||
this.spriteNames.push(l); | |||
}, this); | |||
this.spriteNames.forEach(function(s) { | |||
var sprite = { | |||
image: (new Image()), | |||
ready: false | |||
}; | |||
sprite.image.src = 'images/' + s + '.png'; | |||
sprite.image.src = s.indexOf('png') > -1 ? s : 'images/' + s + '.png'; | |||
sprite.image.onload = this.onSprite.bind(this, sprite); | |||
this.sprites[s] = sprite; | |||
@@ -59,7 +63,5 @@ define([ | |||
} | |||
}; | |||
resources.init(); | |||
return resources; | |||
}); |
@@ -8,7 +8,7 @@ define([ | |||
var client = { | |||
doneConnect: false, | |||
init: function() { | |||
init: function(onReady) { | |||
var tType = 'websocket'; | |||
if (window.location.href.indexOf('polling') > -1) | |||
tType = 'polling'; | |||
@@ -17,17 +17,20 @@ define([ | |||
transports: [ tType ] | |||
}); | |||
this.socket.on('connect', this.onConnected.bind(this)); | |||
this.socket.on('connect', this.onConnected.bind(this, onReady)); | |||
this.socket.on('handshake', this.onHandshake.bind(this)); | |||
this.socket.on('event', this.onEvent.bind(this)); | |||
this.socket.on('events', this.onEvents.bind(this)); | |||
this.socket.on('dc', this.onDisconnect.bind(this)); | |||
}, | |||
onConnected: function() { | |||
onConnected: function(onReady) { | |||
if (this.doneConnect) | |||
this.onDisconnect(); | |||
else | |||
this.doneConnect = true; | |||
if (onReady) | |||
onReady(); | |||
}, | |||
onDisconnect: function() { | |||
window.location = window.location; | |||
@@ -630,9 +630,6 @@ if (!Array.prototype.random) { | |||
this.rawPosition.x += this.velocity.x * delta; | |||
this.rawPosition.y += this.velocity.y * delta; | |||
//if (isNaN(this.velocity.x)) | |||
// console.log(this.startSpeed + ' ' + this.endSpeed); | |||
this.position.x = ~~(this.rawPosition.x / 2) * 2; | |||
this.position.y = ~~(this.rawPosition.y / 2) * 2; | |||
} | |||
@@ -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%}.uiAnnouncements{pointer-events:none;position:absolute;left:0;top:0;width:100%;top:calc(50% + 92px)}.uiAnnouncements .list{position:relative;width:100%}.uiAnnouncements .list .message{position:absolute;height:36px;left:50%;transform:translateX(-50%);text-align:center;color:#f2f5f5;font-size:18px;background-color:rgba(49,33,54,0.1);padding:8px;text-shadow:2px 2px 0 #312136,-2px -2px 0 #312136,2px -2px 0 #312136,-2px 2px 0 #312136,2px 2px 0 #312136;animation:.5s ease-in-out infinite bounce}.uiAnnouncements .list .message.success{color:#80f643}.uiAnnouncements .list .message.failure{color:#d43346}@keyframes bounce{0%{top:0}50%{top:4px}100%{top:0}} |
@@ -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%}.uiBuffs{position:absolute;left:16px;top:104px}.uiBuffs .icon{width:32px;height:32px;background:url('../../../images/statusIcons.png') 0 0;margin-right:16px;float:left} |
@@ -135,8 +135,10 @@ define([ | |||
spirteX = -(spirteX * 32); | |||
spriteY = -(spriteY * 32); | |||
var spritesheet = result.previewSpritesheet || '../../../images/charas.png'; | |||
this.find('.sprite') | |||
.css('background', 'url("../../../images/charas.png") ' + spirteX + 'px ' + spriteY + 'px') | |||
.css('background', 'url("' + spritesheet + '") ' + spirteX + 'px ' + spriteY + 'px') | |||
.show(); | |||
this.find('.name').html(name); | |||
@@ -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%}.uiCharacters{width:835px;height:640px}.uiCharacters .logo{width:562px;height:200px;margin-left:138px;margin-bottom:70px}.uiCharacters .left,.uiCharacters .right{height:300px;float:left;background-color:#3a3b4a}.uiCharacters .left{width:400px;overflow-y:auto}.uiCharacters .left .character{height:50px;width:100%;text-align:center;color:#f2f5f5;padding:17px 0 0 0;cursor:pointer}.uiCharacters .left .character:hover{background-color:rgba(242,245,245,0.15)}.uiCharacters .left .character.selected{background-color:rgba(242,245,245,0.25)}.uiCharacters .right{width:400px;padding:16px;margin-left:35px}.uiCharacters .right .portrait{width:100%;height:160px;background-color:#2d2136;padding:16px 0 0 120px}.uiCharacters .right .portrait .sprite{width:32px;height:32px;zoom:4;image-rendering:pixelated;display:none}.uiCharacters .right .info{height:57px;padding-top:16px;margin-bottom:16px;background-color:#2d2136;color:#f2f5f5}.uiCharacters .right .info *{float:left;padding:12px 16px}.uiCharacters .right .info .name{width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uiCharacters .right .info .class{width:40%;text-align:right;color:#aabebe}.uiCharacters .right .button{background-color:#3a71ba;width:calc((100% - (16px * 2)) / 3);float:left;margin-right:16px;color:#f2f5f5}.uiCharacters .right .button:last-child{margin-right:0}.uiCharacters .right .button:hover{background-color:#3fa7dd}.uiCharacters .right .button.deleting{background-color:#d43346;color:#f2f5f5}.uiCharacters .right .spacer-h{height:91px}.uiCharacters .message{height:35px;width:100%;margin-top:35px;float:left;text-align:center;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)} |
@@ -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%}.uiContext{display:none;position:absolute;padding:4px;z-index:999999;border:4px solid #f2f5f5;background-color:rgba(49,33,54,0.95);padding:6px;color:#f2f5f5;text-align:center;line-height:18px}.uiContext .list{width:100%;height:100%}.uiContext .list .option{width:100%;padding:4px;color:#f2f5f5;cursor:pointer}.uiContext .list .option:hover:not(.no-hover){background-color:#929398}.uiContext .list .option.no-hover{line-height:2px;color:#3fa7dd} |
@@ -15,12 +15,7 @@ define([ | |||
tpl: template, | |||
centered: true, | |||
classSprites: { | |||
warrior: [1, 1], | |||
wizard: [2, 0], | |||
thief: [6, 0], | |||
cleric: [4, 0] | |||
}, | |||
classSprites: null, | |||
class: 'wizard', | |||
costume: 0, | |||
@@ -172,13 +167,15 @@ define([ | |||
}, | |||
setSprite: function() { | |||
var classSprite = this.classSprites[this.class]; | |||
var costume = classSprite[this.costume].split(','); | |||
var classSprite = this.classSprites[this.class][this.costume]; | |||
var costume = classSprite.sprite.split(','); | |||
var spirteX = -costume[0] * 32; | |||
var spriteY = -costume[1] * 32; | |||
var spritesheet = classSprite.spritesheet || '../../../images/charas.png'; | |||
this.find('.sprite') | |||
.css('background', 'url("../../../images/charas.png") ' + spirteX + 'px ' + spriteY + 'px'); | |||
.css('background', 'url("' + spritesheet + '") ' + spirteX + 'px ' + spriteY + 'px'); | |||
} | |||
}; | |||
}); |
@@ -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%}.uiCreateCharacter{width:1040px;height:584px}.uiCreateCharacter .logo{width:562px;height:200px;margin-left:240.5px;margin-bottom:54px}.uiCreateCharacter .box-left{float:left;height:276px;width:613px;background-color:#3a3b4a}.uiCreateCharacter .box-left .left,.uiCreateCharacter .box-left .right{float:left;height:100%}.uiCreateCharacter .box-left .left{width:calc(100% - (27px * 2) - 160px);padding:27px 0 27px 27px}.uiCreateCharacter .box-left .left .txtClass,.uiCreateCharacter .box-left .left .txtCostume{cursor:pointer;-webkit-user-select:none}.uiCreateCharacter .box-left .left .txtClass:active,.uiCreateCharacter .box-left .left .txtCostume:active{background-color:#0f1013}.uiCreateCharacter .box-left .left .txtCostume:before{content:'costume '}.uiCreateCharacter .box-left .right{width:calc(160px + (27px * 2));padding:27px 27px 27px 27px}.uiCreateCharacter .box-left .portrait{width:100%;height:160px;background-color:#2d2136;padding:16px 0 0 16px;margin-bottom:27px}.uiCreateCharacter .box-left .portrait .sprite{width:32px;height:32px;zoom:4;image-rendering:pixelated;background:url('../../../images/charas.png') -64px 0}.uiCreateCharacter .box-left .textbox{width:100%;background-color:#1a1c21;border:3px solid #757b92;color:#f2f5f5;margin-bottom:27px}.uiCreateCharacter .box-left .button{background-color:#3a71ba;width:calc((100% - 27px) / 2);float:left;margin-right:27px;color:#f2f5f5}.uiCreateCharacter .box-left .button:last-child{margin-right:0}.uiCreateCharacter .box-left .button:hover{background-color:#3fa7dd}.uiCreateCharacter .box-left .message{height:27px;width:100%;margin-top:27px;float:left;text-align:center;color:#ff4252}.uiCreateCharacter .box-right{padding:27px 27px 27px 27px;float:left;height:276px;width:400px;margin-left:27px;background-color:#3a3b4a}.uiCreateCharacter .box-right .top{width:100%;color:#f2f5f5}.uiCreateCharacter .box-right .top>*{width:100%;text-align:center}.uiCreateCharacter .box-right .top .heading{margin-bottom:27px;color:#48edff}.uiCreateCharacter .box-right .top .list .prophecy{padding-top:0;width:50%;float:left;height:24px;margin-bottom:24px;color:#ff4252;cursor:pointer}.uiCreateCharacter .box-right .top .list .prophecy:after{content:' ✗'}.uiCreateCharacter .box-right .top .list .prophecy.active{color:#80f643}.uiCreateCharacter .box-right .top .list .prophecy.active:after{content:' ✔'}.uiCreateCharacter .box-right .top .list .prophecy.disabled{color:#f2f5f5}.uiCreateCharacter .box-right .top .list .prophecy:hover{color:#f2f5f5} |
@@ -2,7 +2,7 @@ | |||
<img class="logo" src="images/logo_4.png" alt=""> | |||
<div class="box-left"> | |||
<div class="left"> | |||
<input type="text" class="el textbox txtName" placeholder="name"> | |||
<input type="text" class="el textbox txtName" placeholder="name" maxlength="12"> | |||
<div class="el textbox txtClass">wizard</div> | |||
<div class="el textbox txtCostume">1</div> | |||
<div class="message"></div> | |||
@@ -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} |
@@ -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)} |
@@ -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, | |||
@@ -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)} |
@@ -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} |
@@ -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} |
@@ -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); | |||
} | |||
@@ -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} |
@@ -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} |
@@ -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} |
@@ -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} |
@@ -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} |
@@ -113,6 +113,14 @@ | |||
color: @green; | |||
} | |||
&.color-red { | |||
color: @red; | |||
} | |||
&.color-cyan { | |||
color: @blueA; | |||
} | |||
display: none; | |||
} | |||
@@ -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} |
@@ -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} |
@@ -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} |
@@ -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} |
@@ -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} |
@@ -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} |
@@ -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} |
@@ -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)} |
@@ -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) | |||
@@ -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} |
@@ -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); | |||
@@ -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} |
@@ -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} |
@@ -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} |
@@ -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} |
@@ -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 = [ | |||
@@ -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} |
@@ -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} |
@@ -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} |
@@ -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)} |
@@ -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) | |||
@@ -56,9 +56,6 @@ define([ | |||
isCrit = true; | |||
amount *= 1.5; | |||
} | |||
if (isCrit) | |||
amount *= 1.5; | |||
} | |||
return { | |||
@@ -119,6 +119,9 @@ define([ | |||
}, | |||
willAttack: function(target) { | |||
if (this.obj == target) | |||
return false; | |||
var faction = target.aggro.faction; | |||
if (faction == null) | |||
return false; | |||
@@ -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) | |||
}); | |||
@@ -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]; | |||
@@ -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', { | |||
@@ -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); | |||
} | |||
} | |||
@@ -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'); | |||
@@ -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' | |||
}] | |||
} | |||
@@ -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); | |||
@@ -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); | |||
} | |||
@@ -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; | |||
}, | |||
@@ -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; | |||
}); |
@@ -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); | |||
} | |||
}; | |||
}); |
@@ -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, | |||
@@ -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': { | |||
@@ -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; | |||
@@ -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)); | |||
} | |||
@@ -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'; | |||
@@ -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; | |||
} | |||
}; | |||
}); |
@@ -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; | |||
}); |
@@ -128,7 +128,6 @@ define([ | |||
}, | |||
cast: function(action) { | |||
console.log(1); | |||
this.castingEffect = this.obj.effects.addEffect({ | |||
type: 'casting' | |||
}); | |||
@@ -82,8 +82,6 @@ define([ | |||
}] | |||
}; | |||
console.log(this.particles); | |||
syncer.queue('onGetObject', effect); | |||
this.queueCallback(this.onWarningOver.bind(this, x, y), this.delay * 350); | |||
@@ -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; | |||
}); |
@@ -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(); | |||
} | |||
}; | |||
}); |
@@ -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; | |||
}); |
@@ -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; | |||
@@ -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); | |||
} | |||
} | |||
}; | |||
}); |
@@ -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 []; | |||
} | |||
} | |||
}; | |||
}); |
@@ -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' | |||
} | |||
}; | |||
}); |
@@ -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); | |||
} | |||
}; | |||
}); |
@@ -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(); | |||
}); | |||
@@ -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(); | |||
} | |||
@@ -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()])) | |||
@@ -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) { | |||
@@ -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); | |||