Browse Source

Merge branch 'staging' into 'master'

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 !37
tags/v0.1.2
Big Bad Waffle 7 years ago
parent
commit
9f1de7fa1a
89 changed files with 486 additions and 193 deletions
  1. +5
    -1
      .gitignore
  2. +0
    -1
      src/client/css/main.css
  3. +0
    -1
      src/client/css/performance.css
  4. +9
    -1
      src/client/css/ui.less
  5. BIN
     
  6. BIN
     
  7. +1
    -1
      src/client/js/components/trade.js
  8. +15
    -1
      src/client/js/main.js
  9. +7
    -1
      src/client/js/renderer.js
  10. +6
    -4
      src/client/js/resources.js
  11. +6
    -3
      src/client/js/system/client.js
  12. +0
    -3
      src/client/plugins/pixi.particles.js
  13. +0
    -1
      src/client/ui/templates/announcements/styles.css
  14. +0
    -1
      src/client/ui/templates/buffs/styles.css
  15. +3
    -1
      src/client/ui/templates/characters/characters.js
  16. +0
    -1
      src/client/ui/templates/characters/styles.css
  17. +0
    -1
      src/client/ui/templates/context/styles.css
  18. +6
    -9
      src/client/ui/templates/createCharacter/createCharacter.js
  19. +0
    -1
      src/client/ui/templates/createCharacter/styles.css
  20. +1
    -1
      src/client/ui/templates/createCharacter/template.html
  21. +0
    -1
      src/client/ui/templates/death/styles.css
  22. +0
    -1
      src/client/ui/templates/dialogue/styles.css
  23. +16
    -6
      src/client/ui/templates/equipment/equipment.js
  24. +0
    -1
      src/client/ui/templates/equipment/styles.css
  25. +0
    -1
      src/client/ui/templates/help/styles.css
  26. +0
    -1
      src/client/ui/templates/hud/styles.css
  27. +9
    -7
      src/client/ui/templates/inventory/inventory.js
  28. +0
    -1
      src/client/ui/templates/inventory/styles.css
  29. +0
    -1
      src/client/ui/templates/leaderboard/styles.css
  30. +0
    -1
      src/client/ui/templates/login/styles.css
  31. +0
    -1
      src/client/ui/templates/menu/styles.css
  32. +0
    -1
      src/client/ui/templates/messages/styles.css
  33. +8
    -0
      src/client/ui/templates/messages/styles.less
  34. +0
    -1
      src/client/ui/templates/online/styles.css
  35. +0
    -1
      src/client/ui/templates/options/styles.css
  36. +0
    -1
      src/client/ui/templates/overlay/styles.css
  37. +0
    -1
      src/client/ui/templates/party/styles.css
  38. +0
    -1
      src/client/ui/templates/partyLoot/styles.css
  39. +0
    -1
      src/client/ui/templates/progressBar/styles.css
  40. +0
    -1
      src/client/ui/templates/quests/styles.css
  41. +0
    -1
      src/client/ui/templates/reputation/styles.css
  42. +1
    -1
      src/client/ui/templates/smithing/smithing.js
  43. +0
    -1
      src/client/ui/templates/smithing/styles.css
  44. +2
    -1
      src/client/ui/templates/spells/spells.js
  45. +0
    -1
      src/client/ui/templates/spells/styles.css
  46. +0
    -1
      src/client/ui/templates/stash/styles.css
  47. +0
    -1
      src/client/ui/templates/talk/styles.css
  48. +0
    -1
      src/client/ui/templates/target/styles.css
  49. +3
    -1
      src/client/ui/templates/target/target.js
  50. +0
    -1
      src/client/ui/templates/tooltipInfo/styles.css
  51. +0
    -1
      src/client/ui/templates/tooltipItem/styles.css
  52. +0
    -1
      src/client/ui/templates/tooltips/styles.css
  53. +0
    -1
      src/client/ui/templates/trade/styles.css
  54. +1
    -1
      src/client/ui/templates/trade/trade.js
  55. +0
    -3
      src/server/combat/combat.js
  56. +3
    -0
      src/server/components/aggro.js
  57. +25
    -12
      src/server/components/auth.js
  58. +1
    -1
      src/server/components/dialogue.js
  59. +10
    -3
      src/server/components/extensions/factionVendor.js
  60. +35
    -36
      src/server/components/inventory.js
  61. +3
    -2
      src/server/components/player.js
  62. +22
    -4
      src/server/components/social.js
  63. +12
    -4
      src/server/components/spellbook.js
  64. +2
    -5
      src/server/components/stats.js
  65. +5
    -3
      src/server/components/trade.js
  66. +10
    -3
      src/server/config/classes.js
  67. +17
    -0
      src/server/config/clientConfig.js
  68. +1
    -1
      src/server/config/factions/gaekatla.js
  69. +1
    -1
      src/server/config/maps/tutorial/dialogues.js
  70. +29
    -12
      src/server/config/quests/templates/questKillX.js
  71. +12
    -0
      src/server/config/quests/templates/questLootGen.js
  72. +12
    -0
      src/server/config/roles.js
  73. +30
    -3
      src/server/config/skins.js
  74. +6
    -3
      src/server/config/spells.js
  75. +0
    -1
      src/server/config/spells/spellSlowBlast.js
  76. +0
    -2
      src/server/config/spells/spellWarnBlast.js
  77. +6
    -3
      src/server/config/spellsConfig.js
  78. +7
    -2
      src/server/globals.js
  79. +6
    -3
      src/server/items/config/types.js
  80. +2
    -0
      src/server/items/generators/types.js
  81. +62
    -0
      src/server/misc/events.js
  82. +10
    -0
      src/server/misc/fileLister.js
  83. +4
    -1
      src/server/misc/messages.js
  84. +38
    -0
      src/server/misc/mods.js
  85. +4
    -1
      src/server/server.js
  86. +5
    -2
      src/server/startup.js
  87. +2
    -2
      src/server/world/map.js
  88. +1
    -1
      src/server/world/mobBuilder.js
  89. +4
    -2
      src/server/world/worker.js

+ 5
- 1
.gitignore View File

@@ -1,2 +1,6 @@
node_modules node_modules
storage.db
storage.db
*.sublime-project
*.sublime-workspace

*.css

+ 0
- 1
src/client/css/main.css View File

@@ -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}

+ 0
- 1
src/client/css/performance.css View File

@@ -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}

+ 9
- 1
src/client/css/ui.less View File

@@ -1,6 +1,14 @@
@import "colors.less"; @import "colors.less";


[class^="ui"] { [class^="ui"] {
input, textarea {
-webkit-user-select: text;
-khtml-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}

.el { .el {
height: 35px; height: 35px;
text-align: center; text-align: center;
@@ -30,4 +38,4 @@
.spacer-h { .spacer-h {
width: 100%; width: 100%;
} }
}
}

BIN
View File


BIN
View File


+ 1
- 1
src/client/js/components/trade.js View File

@@ -10,7 +10,7 @@ define([
action: 'buy', action: 'buy',


init: function(blueprint) { init: function(blueprint) {
}, },


extend: function(blueprint) { extend: function(blueprint) {


+ 15
- 1
src/client/js/main.js View File

@@ -35,8 +35,23 @@ define([
hasFocus: true, hasFocus: true,


init: function() { 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)); events.on('onResourcesLoaded', this.start.bind(this));
}, },

start: function() { start: function() {
window.onfocus = this.onFocus.bind(this, true); window.onfocus = this.onFocus.bind(this, true);
window.onblur = this.onFocus.bind(this, false); window.onblur = this.onFocus.bind(this, false);
@@ -46,7 +61,6 @@ define([
}); });


objects.init(); objects.init();
client.init();
renderer.init(); renderer.init();
input.init(); input.init();




+ 7
- 1
src/client/js/renderer.js View File

@@ -97,7 +97,13 @@ define([
this.stage.addChild(layers[l]) this.stage.addChild(layers[l])
}, this); }, 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] = new pixi.BaseTexture(resources.sprites[t].image);
this.textures[t].scaleMode = pixi.SCALE_MODES.NEAREST; this.textures[t].scaleMode = pixi.SCALE_MODES.NEAREST;
}, this); }, this);


+ 6
- 4
src/client/js/resources.js View File

@@ -28,13 +28,17 @@ define([
], ],
sprites: {}, sprites: {},
ready: false, ready: false,
init: function() {
init: function(list) {
list.forEach(function(l) {
this.spriteNames.push(l);
}, this);

this.spriteNames.forEach(function(s) { this.spriteNames.forEach(function(s) {
var sprite = { var sprite = {
image: (new Image()), image: (new Image()),
ready: false 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); sprite.image.onload = this.onSprite.bind(this, sprite);


this.sprites[s] = sprite; this.sprites[s] = sprite;
@@ -59,7 +63,5 @@ define([
} }
}; };


resources.init();

return resources; return resources;
}); });

+ 6
- 3
src/client/js/system/client.js View File

@@ -8,7 +8,7 @@ define([
var client = { var client = {
doneConnect: false, doneConnect: false,


init: function() {
init: function(onReady) {
var tType = 'websocket'; var tType = 'websocket';
if (window.location.href.indexOf('polling') > -1) if (window.location.href.indexOf('polling') > -1)
tType = 'polling'; tType = 'polling';
@@ -17,17 +17,20 @@ define([
transports: [ tType ] 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('handshake', this.onHandshake.bind(this));
this.socket.on('event', this.onEvent.bind(this)); this.socket.on('event', this.onEvent.bind(this));
this.socket.on('events', this.onEvents.bind(this)); this.socket.on('events', this.onEvents.bind(this));
this.socket.on('dc', this.onDisconnect.bind(this)); this.socket.on('dc', this.onDisconnect.bind(this));
}, },
onConnected: function() {
onConnected: function(onReady) {
if (this.doneConnect) if (this.doneConnect)
this.onDisconnect(); this.onDisconnect();
else else
this.doneConnect = true; this.doneConnect = true;

if (onReady)
onReady();
}, },
onDisconnect: function() { onDisconnect: function() {
window.location = window.location; window.location = window.location;


+ 0
- 3
src/client/plugins/pixi.particles.js View File

@@ -630,9 +630,6 @@ if (!Array.prototype.random) {
this.rawPosition.x += this.velocity.x * delta; this.rawPosition.x += this.velocity.x * delta;
this.rawPosition.y += this.velocity.y * 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.x = ~~(this.rawPosition.x / 2) * 2;
this.position.y = ~~(this.rawPosition.y / 2) * 2; this.position.y = ~~(this.rawPosition.y / 2) * 2;
} }


+ 0
- 1
src/client/ui/templates/announcements/styles.css View File

@@ -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}}

+ 0
- 1
src/client/ui/templates/buffs/styles.css View File

@@ -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}

+ 3
- 1
src/client/ui/templates/characters/characters.js View File

@@ -135,8 +135,10 @@ define([
spirteX = -(spirteX * 32); spirteX = -(spirteX * 32);
spriteY = -(spriteY * 32); spriteY = -(spriteY * 32);


var spritesheet = result.previewSpritesheet || '../../../images/charas.png';

this.find('.sprite') this.find('.sprite')
.css('background', 'url("../../../images/charas.png") ' + spirteX + 'px ' + spriteY + 'px')
.css('background', 'url("' + spritesheet + '") ' + spirteX + 'px ' + spriteY + 'px')
.show(); .show();


this.find('.name').html(name); this.find('.name').html(name);


+ 0
- 1
src/client/ui/templates/characters/styles.css View File

@@ -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)}

+ 0
- 1
src/client/ui/templates/context/styles.css View File

@@ -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}

+ 6
- 9
src/client/ui/templates/createCharacter/createCharacter.js View File

@@ -15,12 +15,7 @@ define([
tpl: template, tpl: template,
centered: true, centered: true,


classSprites: {
warrior: [1, 1],
wizard: [2, 0],
thief: [6, 0],
cleric: [4, 0]
},
classSprites: null,
class: 'wizard', class: 'wizard',
costume: 0, costume: 0,


@@ -172,13 +167,15 @@ define([
}, },


setSprite: function() { 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 spirteX = -costume[0] * 32;
var spriteY = -costume[1] * 32; var spriteY = -costume[1] * 32;


var spritesheet = classSprite.spritesheet || '../../../images/charas.png';

this.find('.sprite') this.find('.sprite')
.css('background', 'url("../../../images/charas.png") ' + spirteX + 'px ' + spriteY + 'px');
.css('background', 'url("' + spritesheet + '") ' + spirteX + 'px ' + spriteY + 'px');
} }
}; };
}); });

+ 0
- 1
src/client/ui/templates/createCharacter/styles.css View File

@@ -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}

+ 1
- 1
src/client/ui/templates/createCharacter/template.html View File

@@ -2,7 +2,7 @@
<img class="logo" src="images/logo_4.png" alt=""> <img class="logo" src="images/logo_4.png" alt="">
<div class="box-left"> <div class="box-left">
<div class="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 txtClass">wizard</div>
<div class="el textbox txtCostume">1</div> <div class="el textbox txtCostume">1</div>
<div class="message"></div> <div class="message"></div>


+ 0
- 1
src/client/ui/templates/death/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/dialogue/styles.css View File

@@ -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)}

+ 16
- 6
src/client/ui/templates/equipment/equipment.js View File

@@ -81,6 +81,9 @@ define([
items = items || this.items; items = items || this.items;
this.items = items; this.items = items;


if (!this.shown)
return;

this.find('.slot').addClass('empty'); this.find('.slot').addClass('empty');


var skipSpellId = 0; var skipSpellId = 0;
@@ -113,12 +116,14 @@ define([
slot = 'rune-' + spellId; slot = 'rune-' + spellId;
} }


var spritesheet = item.spritesheet || '../../../images/items.png';

var elSlot = this.find('[slot="' + slot + '"]'); var elSlot = this.find('[slot="' + slot + '"]');
elSlot elSlot
.data('item', item) .data('item', item)
.removeClass('empty') .removeClass('empty')
.find('.icon') .find('.icon')
.css('background', 'url(../../../images/items.png) ' + imgX + 'px ' + imgY + 'px')
.css('background', 'url("' + spritesheet + '") ' + imgX + 'px ' + imgY + 'px')
.off() .off()
.on('mousemove', this.onHoverItem.bind(this, elSlot, item, null)) .on('mousemove', this.onHoverItem.bind(this, elSlot, item, null))
.on('mouseleave', this.onHoverItem.bind(this, null, null)) .on('mouseleave', this.onHoverItem.bind(this, null, null))
@@ -159,7 +164,7 @@ define([
.forEach(function(item) { .forEach(function(item) {
var sprite = item.sprite || [7, 0]; 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 imgX = -sprite[0] * 64;
var imgY = -sprite[1] * 64; var imgY = -sprite[1] * 64;


@@ -168,7 +173,7 @@ define([


el el
.find('.icon') .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('mousemove', this.onHoverItem.bind(this, el, item, null))
.on('mouseleave', this.onHoverItem.bind(this, null, null)) .on('mouseleave', this.onHoverItem.bind(this, null, null))
.on('click', this.equipItem.bind(this, item)); .on('click', this.equipItem.bind(this, item));
@@ -246,8 +251,13 @@ define([
}, },


onGetStats: function(stats) { 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'); var container = this.el.find('.stats');


@@ -262,7 +272,7 @@ define([
level: stats.level, level: stats.level,
'next level': xpRemaining + 'xp', 'next level': xpRemaining + 'xp',
gap1: '', gap1: '',
gold: 0, //window.player.trade.gold,
gold: window.player.trade.gold,
gap2: '', gap2: '',
hp: ~~stats.hp + '/' + stats.hpMax, hp: ~~stats.hp + '/' + stats.hpMax,
mana: ~~stats.mana + '/' + stats.manaMax, mana: ~~stats.mana + '/' + stats.manaMax,


+ 0
- 1
src/client/ui/templates/equipment/styles.css View File

@@ -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)}

+ 0
- 1
src/client/ui/templates/help/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/hud/styles.css View File

@@ -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}

+ 9
- 7
src/client/ui/templates/inventory/inventory.js View File

@@ -119,7 +119,7 @@ define([
var itemEl = $(tplItem) var itemEl = $(tplItem)
.appendTo(container); .appendTo(container);


var spritesheet = 'items';
var spritesheet = item.spritesheet || 'items';
if (item.material) if (item.material)
spritesheet = 'materials'; spritesheet = 'materials';
else if (item.quest) 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); config.push(menuItems.destroy);
} }


+ 0
- 1
src/client/ui/templates/inventory/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/leaderboard/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/login/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/menu/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/messages/styles.css View File

@@ -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}

+ 8
- 0
src/client/ui/templates/messages/styles.less View File

@@ -113,6 +113,14 @@
color: @green; color: @green;
} }


&.color-red {
color: @red;
}

&.color-cyan {
color: @blueA;
}

display: none; display: none;
} }




+ 0
- 1
src/client/ui/templates/online/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/options/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/overlay/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/party/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/partyLoot/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/progressBar/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/quests/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/reputation/styles.css View File

@@ -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)}

+ 1
- 1
src/client/ui/templates/smithing/smithing.js View File

@@ -220,7 +220,7 @@ define([
var imgX = -item.sprite[0] * 64; var imgX = -item.sprite[0] * 64;
var imgY = -item.sprite[1] * 64; var imgY = -item.sprite[1] * 64;


var spritesheet = 'items';
var spritesheet = item.spritesheet || 'items';
if (item.material) if (item.material)
spritesheet = 'materials'; spritesheet = 'materials';
else if (item.quest) else if (item.quest)


+ 0
- 1
src/client/ui/templates/smithing/styles.css View File

@@ -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}

+ 2
- 1
src/client/ui/templates/spells/spells.js View File

@@ -43,9 +43,10 @@ define([
.on('mouseover', this.onShowTooltip.bind(this, el, spells[i])) .on('mouseover', this.onShowTooltip.bind(this, el, spells[i]))
.on('mouseleave', this.onHideTooltip.bind(this, el)); .on('mouseleave', this.onHideTooltip.bind(this, el));


var spritesheet = spells[i].spritesheet || '../../../images/abilityIcons.png';
el el
.find('.icon').css({ .find('.icon').css({
'background': 'url("../../../images/abilityIcons.png") ' + x + 'px ' + y + 'px'
'background': 'url("' + spritesheet + '") ' + x + 'px ' + y + 'px'
}) })
.next().html(i + 1); .next().html(i + 1);




+ 0
- 1
src/client/ui/templates/spells/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/stash/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/talk/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/target/styles.css View File

@@ -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}

+ 3
- 1
src/client/ui/templates/target/target.js View File

@@ -21,7 +21,9 @@ define([


onContextMenu: function(e) { onContextMenu: function(e) {
var target = this.target; 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; return;


var context = [ var context = [


+ 0
- 1
src/client/ui/templates/tooltipInfo/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/tooltipItem/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/tooltips/styles.css View File

@@ -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}

+ 0
- 1
src/client/ui/templates/trade/styles.css View File

@@ -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)}

+ 1
- 1
src/client/ui/templates/trade/trade.js View File

@@ -62,7 +62,7 @@ define([
var size = 64; var size = 64;
var offset = 0; var offset = 0;


var spritesheet = 'items';
var spritesheet = item.spritesheet || 'items';
if (item.material) if (item.material)
spritesheet = 'materials'; spritesheet = 'materials';
else if (item.quest) else if (item.quest)


+ 0
- 3
src/server/combat/combat.js View File

@@ -56,9 +56,6 @@ define([
isCrit = true; isCrit = true;
amount *= 1.5; amount *= 1.5;
} }

if (isCrit)
amount *= 1.5;
} }


return { return {


+ 3
- 0
src/server/components/aggro.js View File

@@ -119,6 +119,9 @@ define([
}, },


willAttack: function(target) { willAttack: function(target) {
if (this.obj == target)
return false;

var faction = target.aggro.faction; var faction = target.aggro.faction;
if (faction == null) if (faction == null)
return false; return false;


+ 25
- 12
src/server/components/auth.js View File

@@ -55,7 +55,15 @@ define([
var sLen = statKeys.length; var sLen = statKeys.length;
for (var i = 0; i < sLen; i++) { for (var i = 0; i < sLen; i++) {
var s = statKeys[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; continue;


delete stats.values[s]; delete stats.values[s];
@@ -115,8 +123,8 @@ define([


var result = characters var result = characters
.map(c => ({ .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); data.callback(result);
@@ -282,6 +290,11 @@ define([
createCharacter: function(msg) { createCharacter: function(msg) {
var data = msg.data; var data = msg.data;


if ((data.name.length < 3) || (data.name.length > 12)) {
msg.callback(messages.createCharacter.nameLength);
return;
}

io.get({ io.get({
ent: data.name, ent: data.name,
field: 'character', field: 'character',
@@ -300,14 +313,8 @@ define([
this.obj.class = data.class; this.obj.class = data.class;
this.obj.costume = data.costume; 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); var simple = this.obj.getSimple(true);
simple.components.push({ simple.components.push({
@@ -360,10 +367,16 @@ define([
}, },
onDeleteCharacter: function(msg, result) { onDeleteCharacter: function(msg, result) {
this.characterList.spliceWhere(c => c == msg.data.name); 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({ io.set({
ent: this.username, ent: this.username,
field: 'characterList', field: 'characterList',
value: JSON.stringify(this.characterList),
value: JSON.stringify(characterList),
callback: this.onRemoveFromList.bind(this, msg) callback: this.onRemoveFromList.bind(this, msg)
}); });




+ 1
- 1
src/server/components/dialogue.js View File

@@ -86,7 +86,7 @@ define([
console.log('NO DIALOGUE STATES?!?!??!'); console.log('NO DIALOGUE STATES?!?!??!');
console.log('NO DIALOGUE STATES?!?!??!'); 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; return null;
} }
var stateConfig = this.states[state]; var stateConfig = this.states[state];


+ 10
- 3
src/server/components/extensions/factionVendor.js View File

@@ -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) { if (!result) {
requestedBy.instance.syncer.queue('onGetMessages', { requestedBy.instance.syncer.queue('onGetMessages', {


+ 35
- 36
src/server/components/inventory.js View File

@@ -11,7 +11,6 @@ define([
objects, objects,
classes classes
) { ) {

return { return {
type: 'inventory', type: 'inventory',


@@ -196,6 +195,8 @@ define([
if (!item) if (!item)
return; return;


amount = amount || item.quantity;

if (item.eq) if (item.eq)
this.obj.equipment.unequip(id); this.obj.equipment.unequip(id);


@@ -214,6 +215,8 @@ define([
if (this.obj.player) if (this.obj.player)
this.getDefaultAbilities(); this.getDefaultAbilities();


this.obj.fireEvent('afterDestroyItem', item, amount);

return item; return item;
}, },


@@ -480,42 +483,38 @@ define([
else else
this.obj.equipment.equip(item.id); this.obj.equipment.equip(item.id);
} else { } 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);
} }
} }




+ 3
- 2
src/server/components/player.js View File

@@ -26,9 +26,10 @@ define([
spawn: function(character) { spawn: function(character) {
var obj = this.obj; var obj = this.obj;
extend(true, obj, { extend(true, obj, {
sheetName: 'characters',
sheetName: classes.getSpritesheet(character.class),
layerName: 'mobs', layerName: 'mobs',
cell: character.cell, cell: character.cell,
previewSpritesheet: character.previewSpritesheet,
name: character.name, name: character.name,
class: character.class, class: character.class,
zoneName: character.zoneName || 'tutorial-cove', zoneName: character.zoneName || 'tutorial-cove',
@@ -62,7 +63,7 @@ define([
obj.addComponent('spellbook'); obj.addComponent('spellbook');


obj.addComponent('dialogue'); 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('reputation', character.components.find(c => c.type == 'reputation'));


obj.addComponent('social'); obj.addComponent('social');


+ 22
- 4
src/server/components/social.js View File

@@ -1,7 +1,9 @@
define([ define([
'world/atlas'
'world/atlas',
'config/roles'
], function( ], function(
atlas
atlas,
roles
) { ) {
return { return {
type: 'social', type: 'social',
@@ -33,6 +35,20 @@ define([
}, },


sendPartyMessage: function(msg) { 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 charname = this.obj.auth.charname;
var message = msg.data.message.substr(1); var message = msg.data.message.substr(1);


@@ -61,7 +77,7 @@ define([
else else
level = 0; level = 0;


var msgStyle = 'q' + level;
var msgStyle = roles.getRoleMessageStyle(this.obj) || ('q' + level);


var messageString = msg.data.message; var messageString = msg.data.message;
if (messageString[0] == '@') { if (messageString[0] == '@') {
@@ -106,12 +122,14 @@ define([
} else if (messageString[0] == '%') { } else if (messageString[0] == '%') {
this.sendPartyMessage(msg); this.sendPartyMessage(msg);
} else { } else {
var prefix = roles.getRoleMessagePrefix(this.obj) || '';

io.sockets.emit('event', { io.sockets.emit('event', {
event: 'onGetMessages', event: 'onGetMessages',
data: { data: {
messages: [{ messages: [{
class: msgStyle, class: msgStyle,
message: charname + ': ' + msg.data.message,
message: prefix + charname + ': ' + msg.data.message,
type: 'chat' type: 'chat'
}] }]
} }


+ 12
- 4
src/server/components/spellbook.js View File

@@ -2,12 +2,14 @@ define([
'./../config/spells/spellTemplate', './../config/spells/spellTemplate',
'./../config/animations', './../config/animations',
'./../config/spells', './../config/spells',
'./../config/spellsConfig'
'./../config/spellsConfig',
'misc/events'
], function( ], function(
spellTemplate, spellTemplate,
animations, animations,
playerSpells, playerSpells,
playerSpellsConfig
playerSpellsConfig,
events
) { ) {
return { return {
type: 'spellbook', type: 'spellbook',
@@ -82,9 +84,15 @@ define([


var type = options.type[0].toUpperCase() + options.type.substr(1); 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.obj = this.obj;
builtSpell.baseDamage = builtSpell.damage; builtSpell.baseDamage = builtSpell.damage;
builtSpell.damage += (options.damageAdd || 0); builtSpell.damage += (options.damageAdd || 0);


+ 2
- 5
src/server/components/stats.js View File

@@ -232,11 +232,8 @@ define([


if (a.obj.stats) if (a.obj.stats)
a.obj.stats.getXp(inc); a.obj.stats.getXp(inc);
else {
console.log('give xp to???');
console.log(a.obj);
}

a.obj.fireEvent('afterKillMob', target); a.obj.fireEvent('afterKillMob', target);
} }




+ 5
- 3
src/server/components/trade.js View File

@@ -11,7 +11,7 @@ define([


maxBuyback: 10, maxBuyback: 10,


gold: 1000,
gold: 0,


target: null, target: null,


@@ -21,6 +21,8 @@ define([
}, },


init: function(blueprint) { init: function(blueprint) {
this.gold = blueprint.gold;

if (!blueprint.items) if (!blueprint.items)
return; return;


@@ -132,7 +134,7 @@ define([
return; return;
} }


if (!targetTrade.canBuy(msg.itemId, this.obj)) {
if (!targetTrade.canBuy(msg.itemId, this.obj, msg.action)) {
this.resolveCallback(msg); this.resolveCallback(msg);
return; return;
} }
@@ -260,7 +262,7 @@ define([
return this.items; return this.items;
}, },


canBuy: function(itemId, requestedBy) {
canBuy: function(itemId, requestedBy, action) {
return true; return true;
}, },




+ 10
- 3
src/server/config/classes.js View File

@@ -1,9 +1,9 @@
define([ define([
'misc/events'
], function( ], function(
events
) { ) {
return {
var classes = {
spells: { spells: {
wizard: ['ice spear'], wizard: ['ice spear'],
cleric: ['healing circle'], cleric: ['healing circle'],
@@ -41,6 +41,13 @@ define([
cleric: 'Mace', cleric: 'Mace',
thief: 'Dagger', thief: 'Dagger',
warrior: 'Axe' warrior: 'Axe'
},

getSpritesheet: function(className) {
return this.stats[className].spritesheet || 'characters';
} }
}; };

events.emit('onBeforeGetClasses', classes);
return classes;
}); });

+ 17
- 0
src/server/config/clientConfig.js View File

@@ -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);
}
};
});

+ 1
- 1
src/server/config/factions/gaekatla.js View File

@@ -57,7 +57,7 @@ define([
// return; // return;


//Spawn a mob //Spawn a mob
var mob = spawners.spawn({
var mob = mob.instance.spawners.spawn({
amountLeft: 1, amountLeft: 1,
blueprint: { blueprint: {
x: mob.x, x: mob.x,


+ 1
- 1
src/server/config/maps/tutorial/dialogues.js View File

@@ -15,7 +15,7 @@ module.exports = {
goto: 3 goto: 3
}, },
'1.3': { '1.3': {
msg: `Have you scanvenged anything worth selling lately?`,
msg: `Have you scavenged anything worth selling lately?`,
goto: 'tradeBuy' goto: 'tradeBuy'
}, },
'1.4': { '1.4': {


+ 29
- 12
src/server/config/quests/templates/questKillX.js View File

@@ -12,19 +12,36 @@ define([
type: 'killX', type: 'killX',


build: function() { 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 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; this.description = 'Kill ' + this.have + '/' + this.need + ' ' + this.mobName;


+ 12
- 0
src/server/config/quests/templates/questLootGen.js View File

@@ -68,6 +68,18 @@ define([
if (this.have == this.need) if (this.have == this.need)
this.ready(); 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.description = 'Loot ' + this.have + '/' + this.need + ' ' + this.item.name + ' from ' + this.mobName;
this.obj.syncer.setArray(true, 'quests', 'updateQuests', this.simplify(true)); this.obj.syncer.setArray(true, 'quests', 'updateQuests', this.simplify(true));
} }


+ 12
- 0
src/server/config/roles.js View File

@@ -7,6 +7,8 @@ define([
accounts: { accounts: {
admin: { admin: {
level: 10, level: 10,
messageStyle: 'color-cyan',
messagePrefix: '(dev) ',
items: [{ items: [{
type: 'key', type: 'key',
name: 'Key to the world', name: 'Key to the world',
@@ -55,6 +57,16 @@ define([
return success; 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) { sendMessage: function(player, msg) {
msg = 'Only certain roles can ' + msg + ' at the moment'; msg = 'Only certain roles can ' + msg + ' at the moment';




+ 30
- 3
src/server/config/skins.js View File

@@ -1,7 +1,7 @@
define([ define([
'misc/events'
], function( ], function(
events
) { ) {
var config = { var config = {
'wizard 1': { 'wizard 1': {
@@ -60,6 +60,8 @@ define([
} }
}; };


events.emit('onBeforeGetSkins', config);

return { return {
getBlueprint: function(skinId) { getBlueprint: function(skinId) {
return config[skinId]; return config[skinId];
@@ -79,10 +81,35 @@ define([
if (!result[l.class]) if (!result[l.class])
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; 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;
} }
}; };
}); });

+ 6
- 3
src/server/config/spells.js View File

@@ -1,9 +1,9 @@
define([ define([
'misc/events'
], function( ], function(
events
) { ) {
return [{
var spells = [{
name: 'Magic Missile', name: 'Magic Missile',
description: 'Launches an orb of unfocussed energy at your target.', description: 'Launches an orb of unfocussed energy at your target.',
type: 'projectile', type: 'projectile',
@@ -382,4 +382,7 @@ define([
chance: 0.02 chance: 0.02
} }
}]; }];

events.emit('onBeforeGetSpellsInfo', spells);
return spells;
}); });

+ 0
- 1
src/server/config/spells/spellSlowBlast.js View File

@@ -128,7 +128,6 @@ define([
}, },


cast: function(action) { cast: function(action) {
console.log(1);
this.castingEffect = this.obj.effects.addEffect({ this.castingEffect = this.obj.effects.addEffect({
type: 'casting' type: 'casting'
}); });


+ 0
- 2
src/server/config/spells/spellWarnBlast.js View File

@@ -82,8 +82,6 @@ define([
}] }]
}; };


console.log(this.particles);

syncer.queue('onGetObject', effect); syncer.queue('onGetObject', effect);


this.queueCallback(this.onWarningOver.bind(this, x, y), this.delay * 350); this.queueCallback(this.onWarningOver.bind(this, x, y), this.delay * 350);


+ 6
- 3
src/server/config/spellsConfig.js View File

@@ -1,9 +1,9 @@
define([ define([
'misc/events'
], function( ], function(
events
) { ) {
return {
var spells = {
'magic missile': { 'magic missile': {
statType: 'int', statType: 'int',
statMult: 0.216, statMult: 0.216,
@@ -172,4 +172,7 @@ define([
} }
} }
}; };

events.emit('onBeforeGetSpellsConfig', spells);
return spells;
}); });

+ 7
- 2
src/server/globals.js View File

@@ -4,14 +4,16 @@ define([
'misc/helpers', 'misc/helpers',
'items/lootRoller', 'items/lootRoller',
'world/atlas', 'world/atlas',
'leaderboard/leaderboard'
'leaderboard/leaderboard',
'config/clientConfig'
], function( ], function(
extend, extend,
cons, cons,
helpers, helpers,
lootRoller, lootRoller,
atlas, atlas,
leaderboard
leaderboard,
clientConfig
) { ) {
return { return {
init: function() { init: function() {
@@ -21,6 +23,9 @@ define([
global.lootRoller = lootRoller; global.lootRoller = lootRoller;
global.atlas = atlas; global.atlas = atlas;
global.leaderboard = leaderboard; global.leaderboard = leaderboard;
global.clientConfig = clientConfig;

clientConfig.init();
} }
}; };
}); });

+ 6
- 3
src/server/items/config/types.js View File

@@ -1,9 +1,9 @@
define([ define([
'misc/events'
], function( ], function(
events
) { ) {
return {
var types = {
head: { head: {
'Helmet': { 'Helmet': {
sprite: [0, 0], sprite: [0, 0],
@@ -191,4 +191,7 @@ define([
} }
} }
} }

events.emit('onBeforeGetItemTypes', types);
return types;
}); });

+ 2
- 0
src/server/items/generators/types.js View File

@@ -15,6 +15,8 @@ define([


item.type = type; item.type = type;
item.sprite = typeBlueprint.sprite; item.sprite = typeBlueprint.sprite;
if (typeBlueprint.spritesheet)
item.spritesheet = typeBlueprint.spritesheet;


if (typeBlueprint.spellName) if (typeBlueprint.spellName)
blueprint.spellName = typeBlueprint.spellName; blueprint.spellName = typeBlueprint.spellName;


+ 62
- 0
src/server/misc/events.js View File

@@ -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
- 0
src/server/misc/fileLister.js View File

@@ -10,6 +10,16 @@ define([
return fs.readdirSync(path).filter(function(file) { return fs.readdirSync(path).filter(function(file) {
return !fs.statSync(fsPath.join(path, file)).isDirectory(); 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 [];
}
} }
}; };
}); });

+ 4
- 1
src/server/misc/messages.js View File

@@ -10,6 +10,9 @@ define([
illegal: 'illegal characters in username/password', illegal: 'illegal characters in username/password',
incorrect: 'invalid username and password', incorrect: 'invalid username and password',
charExists: 'character name is taken' charExists: 'character name is taken'
}
},
createCharacter: {
nameLength: 'name must be between 3 and 12 characters'
}
}; };
}); });

+ 38
- 0
src/server/misc/mods.js View File

@@ -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);
}
};
});

+ 4
- 1
src/server/server.js View File

@@ -10,7 +10,10 @@ define([
global.io = require('socket.io')(server); global.io = require('socket.io')(server);


app.use(function(req, res, next) { 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(); next();
}); });


+ 5
- 2
src/server/startup.js View File

@@ -4,14 +4,16 @@ define([
'world/atlas', 'world/atlas',
'components/components', 'components/components',
'leaderboard/leaderboard', 'leaderboard/leaderboard',
'security/io'
'security/io',
'misc/mods'
], function( ], function(
globals, globals,
server, server,
atlas, atlas,
components, components,
leaderboard, leaderboard,
io
io,
mods
) { ) {
return { return {
init: function() { init: function() {
@@ -30,6 +32,7 @@ define([
server.init(this.onServerReady.bind(this)); server.init(this.onServerReady.bind(this));
}, },
onServerReady: function() { onServerReady: function() {
mods.init();
atlas.init(); atlas.init();
leaderboard.init(); leaderboard.init();
} }


+ 2
- 2
src/server/world/map.js View File

@@ -87,7 +87,7 @@ define([


mapFile = require('../config/maps/' + this.name + '/map'); mapFile = require('../config/maps/' + this.name + '/map');
this.mapFile = mapFile; this.mapFile = mapFile;
this.mapFile.properties = this.mapFile.properties || {};
mapScale = mapFile.tilesets[0].tileheight; mapScale = mapFile.tilesets[0].tileheight;


this.instanced = mapFile.properties.instanced; this.instanced = mapFile.properties.instanced;
@@ -310,7 +310,7 @@ define([
x: cell.x / mapScale, x: cell.x / mapScale,
y: (cell.y / mapScale) - 1, y: (cell.y / mapScale) - 1,
name: name, name: name,
properties: cell.properties
properties: cell.properties || {}
}; };


if ((this.zone) && (this.zone.objects) && (this.zone.objects[objZoneName.toLowerCase()])) if ((this.zone) && (this.zone.objects) && (this.zone.objects[objZoneName.toLowerCase()]))


+ 1
- 1
src/server/world/mobBuilder.js View File

@@ -179,7 +179,7 @@ define([


if (level < 10) { if (level < 10) {
hpMult *= [0.005, 0.01, 0.1, 0.2, 0.5, 0.65, 0.75, 0.85, 0.95][level - 1]; 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) { if (mob.isRare) {


+ 4
- 2
src/server/world/worker.js View File

@@ -9,9 +9,9 @@ global.io = true;
var instancer = null; var instancer = null;


requirejs([ requirejs([
'extend', 'misc/helpers', 'components/components', 'world/instancer', 'security/io'
'extend', 'misc/helpers', 'components/components', 'world/instancer', 'security/io', 'misc/mods'
], function( ], function(
extend, helpers, components, _instancer, io
extend, helpers, components, _instancer, io, mods
) { ) {
var onDbReady = function() { var onDbReady = function() {
global.extend = extend; global.extend = extend;
@@ -26,6 +26,8 @@ requirejs([
}); });
}); });


mods.init();

setInterval(function() { setInterval(function() {
global.gc(); global.gc();
}, 60000); }, 60000);


Loading…
Cancel
Save