Master See merge request Isleward/isleward!595tags/v0.11.0
@@ -1,5 +1,6 @@ | |||||
node_modules | node_modules | ||||
package-lock.json | package-lock.json | ||||
*.css | |||||
storage.db | storage.db | ||||
*.sublime-project | *.sublime-project | ||||
@@ -9,4 +10,4 @@ src/server/mods/iwd-* | |||||
firebaseConfig.js | firebaseConfig.js | ||||
.directory | .directory | ||||
.idea | .idea | ||||
.vscode | |||||
.vscode |
@@ -16,29 +16,35 @@ If anything in this contributing guide is not clear, don't hesitate to contact W | |||||
### Issue Labels | ### Issue Labels | ||||
Labels can only be assigned by people with Reporter and higher permissions in the project (see [Members](https://gitlab.com/Isleward/isleward/project_members)). People with rights to assign labels should do so regularly to keep the issues organized. | |||||
Labels can only be assigned by people with Reporter and higher permissions in the project (see [Members](https://gitlab.com/Isleward/isleward/project_members)). | |||||
People with rights to assign labels should do so regularly to keep the issues organized. | |||||
The project is using the following, rather self-explanatory, labels: | The project is using the following, rather self-explanatory, labels: | ||||
* ~Balance | * ~Balance | ||||
* ~Bug | * ~Bug | ||||
* ~Content | * ~Content | ||||
* ~DevOps | |||||
* ~Draft | * ~Draft | ||||
* ~Enhancement | |||||
* ~Feature | * ~Feature | ||||
* ~Good first issue | |||||
* ~Mobile | |||||
* ~Mod | |||||
* ~Modding | * ~Modding | ||||
* ~Polish | * ~Polish | ||||
* ~Refactor | * ~Refactor | ||||
* ~DevOps | |||||
* ~Suggestion | |||||
### Issue Weights | ### Issue Weights | ||||
* In addition to labels, issues tagged with the ~Bug label are also assigned Weights. | * In addition to labels, issues tagged with the ~Bug label are also assigned Weights. | ||||
* Bugs are weighed by severity, with 1 being trivial and 5 being severe. | * Bugs are weighed by severity, with 1 being trivial and 5 being severe. | ||||
* Weights can assigned by people with Reporter or higher privileges, but this should only be done by @rstan122 unless instructed otherwise. | |||||
* Weights can assigned by people with Reporter or higher privileges. | |||||
### Confidential Issues | ### Confidential Issues | ||||
* Confidential issues are issues that are visible only to people with Reporter or higher access rights. | * Confidential issues are issues that are visible only to people with Reporter or higher access rights. | ||||
* Therefore they are very useful for reporting issues that are very sensitive and that not every user should know about. | |||||
* Therefore they are very useful for reporting issues that are very sensitive and that not every user should know about. | |||||
* To create a confidential issue, simply check the `This issue is confidential and should only be visible to team members with at least Reporter access.` checkbox when creating a new issue. | * To create a confidential issue, simply check the `This issue is confidential and should only be visible to team members with at least Reporter access.` checkbox when creating a new issue. | ||||
### Becoming a Reporter | ### Becoming a Reporter | ||||
@@ -62,7 +68,7 @@ The project is using the following branching structure | |||||
**release tags** are pointing at the latest commit in `release` at the point of releasing a new version. | **release tags** are pointing at the latest commit in `release` at the point of releasing a new version. | ||||
**feature branches** are branches in which the actual development happens. The name of a feature branch should always contain the number of the issue that's being addressed (e.g. the `990` in `990-contribuing-rewrite`), be all lowercase with hyphens between words. | |||||
**feature branches** are branches in which the actual development happens. The name of a feature branch should always contain the number of the issue that's being addressed (e.g. the `990` in `990-contribuing-rewrite`), and be all lowercase with hyphens between words. | |||||
### Using SSH keys | ### Using SSH keys | ||||
@@ -86,14 +92,14 @@ Once you are done working on your contribution, you need to submit a merge reque | |||||
The merge request should have `master` as its target branch unless arranged otherwise. | The merge request should have `master` as its target branch unless arranged otherwise. | ||||
You don't need to remove the source branch upon accepting the merge request if the merge request is being made from a fork. | |||||
You don't need to remove the source branch upon accepting the merge request if the merge request is being made from a fork. | |||||
Squishing commits is usually not recommended as it breaks the ability to rebase nicely in certain cases. | Squishing commits is usually not recommended as it breaks the ability to rebase nicely in certain cases. | ||||
Once your merge request is submitted, GitLab CI will run a few tests on it. Should those tests fail, please address the failures. | |||||
Once your merge request is submitted, GitLab CI will run a few tests on it. Should those tests fail, please address the failures. | |||||
A Merge Request with passing tests is ready to be merged. | A Merge Request with passing tests is ready to be merged. | ||||
### Running Isleward | ### Running Isleward | ||||
* [Windows](https://gitlab.com/Isleward/isleward/wikis/installation-and-usage-(windows)) | * [Windows](https://gitlab.com/Isleward/isleward/wikis/installation-and-usage-(windows)) | ||||
* [Linux](https://gitlab.com/Isleward/isleward/wikis/installation-and-usage-(linux)) | * [Linux](https://gitlab.com/Isleward/isleward/wikis/installation-and-usage-(linux)) | ||||
* [MacOS](https://gitlab.com/Isleward/isleward/wikis/installation-and-usage-(macos)) | |||||
* [MacOS](https://gitlab.com/Isleward/isleward/wikis/installation-and-usage-(macos)) |
@@ -4,14 +4,12 @@ | |||||
Built with NodeJS, JS, HTML and CSS. | Built with NodeJS, JS, HTML and CSS. | ||||
[Play Now](http://play.isleward.com/) | [Discord](https://discord.gg/gnsn7ZP) | [Subreddit](https://www.reddit.com/r/isleward) | [Blog](http://blog.isleward.com/) | [Wiki](http://wiki.isleward.com/Main_Page) | [Twitter](https://twitter.com/playisleward) | [Facebook](https://www.facebook.com/isleward/) | [Patreon](http://patreon.com/bigbadwaffle) | |||||
[Play Now](http://play.isleward.com/) | [Discord](https://discord.gg/gnsn7ZP) | [Subreddit](https://www.reddit.com/r/isleward) | [Wiki](http://wiki.isleward.com/Main_Page) | [Twitter](https://twitter.com/playisleward) | [Facebook](https://www.facebook.com/isleward/) | [Patreon](http://patreon.com/bigbadwaffle) | |||||
[How to contribute](CONTRIBUTING.md) | [How to contribute](CONTRIBUTING.md) | ||||
### Installation and Usage | ### Installation and Usage | ||||
**IMPORTANT**: The sqlite3 package has been removed for the time being due to multiple `npm audit` issues arrising. While installing this module will not cause you any security issues (due to the nature of the vulnerabilities and how Isleward actually uses the module), we have removed it to make the build process simpler for us. As a result of this, after performing an `npm install` in the `server` folder, please also run `npm i sqlite3`. | |||||
* [Windows](https://gitlab.com/Isleward/isleward/wikis/installation-and-usage-(windows)) | * [Windows](https://gitlab.com/Isleward/isleward/wikis/installation-and-usage-(windows)) | ||||
* [Linux](https://gitlab.com/Isleward/isleward/wikis/installation-and-usage-(linux)) | * [Linux](https://gitlab.com/Isleward/isleward/wikis/installation-and-usage-(linux)) | ||||
* [MacOS](https://gitlab.com/Isleward/isleward/wikis/installation-and-usage-(macos)) | * [MacOS](https://gitlab.com/Isleward/isleward/wikis/installation-and-usage-(macos)) | ||||
@@ -1 +0,0 @@ | |||||
@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}body{margin:0;width:100vw;height:100vh;background-image:url(../images/static_bg.png);background-repeat:repeat;background-position:center center;overflow:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center}.logo{width:562px;height:200px;margin-bottom:20px}.discord,.error{color:#d43346;font-size:24px;padding:10px;filter:drop-shadow(0 -6px 0 #312136) drop-shadow(0 6px 0 #312136) drop-shadow(6px 0 0 #312136) drop-shadow(-6px 0 0 #312136)}.discord{justify-self:end}.discord a:active,.discord a:hover,.discord a:link,.discord a:visited{color:#faac45;text-decoration:none} |
@@ -1 +0,0 @@ | |||||
body,html{position:fixed;overflow:hidden;overscroll-behavior:none}body{margin:0;width:100vw;height:100vh;background-color:#2d2136}.ui-container{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;overflow:hidden;display:flex;justify-content:center;align-items:center}.ui-container>.right{position:absolute;right:10px;top:94px}.ui-container.mobile .uiTooltipInfo{display:none!important}.ui-container.hideMonetization .monetization{display:none}.mobile.ui-container>.right{top:10px;right:158px;z-index:2;display:flex;flex-direction:row-reverse}*{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}.canvas-container{position:relative;float:left}.canvas-container.visible{opacity:1;transition:1s}.canvas-container canvas{left:0;top:0;width:100vw}.disabled{opacity:.4!important;pointer-events:none!important}.hidden{display:none!important}[class^=ui] input,[class^=ui] textarea{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}[class^=ui] .el{height:35px;text-align:center;padding:0;background-color:transparent}[class^=ui] .textbox{border:none;outline:0;font-size:16px}[class^=ui] div.textbox{padding-top:6px}[class^=ui] .btn{cursor:pointer;display:flex;justify-content:center;align-items:center}[class^=ui] .btn:hover{background-color:#473456}[class^=ui] .spacer-h{width:100%}[class^=ui].modal .btnClose{position:absolute;background-color:#505360;color:#ff6942;cursor:pointer;height:31px;width:31px;text-align:center;right:0;top:0;padding-top:0;display:flex;justify-content:center;align-items:center}[class^=ui].modal .btnClose:hover{background-color:#676b7c}::-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}:root{scrollbar-color:#929398 #3c3f4c!important;scrollbar-width:thin!important;--color-element-default:#fcfcfc;--color-element-arcane:#fc66f7;--color-element-frost:#48edff;--color-element-fire:#ff4252;--color-element-holy:#ffeb38;--color-element-poison:#51fc9a}.q0{color:#fcfcfc}.q1{color:#4ac441}.q2{color:#3fa7dd}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346!important}.color-redA{color:#ff4252!important}.color-blueA{color:#48edff!important}.color-blueB{color:#3fa7dd!important}.color-greenB{color:#4ac441!important}.color-yellowB{color:#faac45!important}.color-green{color:#80f643!important}.color-brownC{color:#b15a30!important}.color-brownD{color:#763b3b!important}.color-grayA{color:#fcfcfc!important}.color-grayB{color:#c0c3cf!important}.color-grayC{color:#929398!important}.color-grayD{color:#69696e!important}.color-pinkA{color:#fc66f7!important}.color-pinkB{color:#de43ae!important}.color-purpleA{color:#a24eff!important}.color-tealB{color:#51fc9a!important}[class^=ui] .renderItem{width:72px;height:72px;float:left;position:relative;cursor:pointer;box-sizing:border-box;margin:4px;background-color:#312136}[class^=ui] .renderItem.hover{background-color:rgba(72,237,255,.1)}[class^=ui] .renderItem.dragging{position:absolute;opacity:.5;pointer-events:none;background-color:transparent}[class^=ui] .renderItem.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);-moz-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)}[class^=ui] .renderItem .quantity{left:6px;bottom:3px;position:absolute;color:#fcfcfc;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);-moz-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)}[class^=ui] .renderItem .icon{width:64px;height:64px;position:absolute;left:4px;top:4px;image-rendering:optimizeSpeed;image-rendering:pixelated;image-rendering:crisp-edges;transform-origin:0 0}[class^=ui] .renderItem.eq .quantity{color:#ffeb38}[class^=ui] .renderItem.new .quantity{color:#80f643}[class^=ui] .renderItem:hover .icon{filter:brightness(160%);-moz-filter:brightness(160%)}[class^=ui] .renderItem.spriteSize8 .icon{transform:scale(4);-webkit-transform:scale(4);margin:16px}[class^=ui] .renderItem.spriteSize24 .icon{transform:scale(4);-webkit-transform:scale(4);margin:-44px -16px}.hasBorderShadow{box-shadow:0 -2px 0 #2d2136,0 2px 0 #2d2136,2px 0 0 #2d2136,-2px 0 0 #2d2136} |
@@ -60,6 +60,9 @@ define([ | |||||
enabled: true, | enabled: true, | ||||
blacklistedKeys: [], | |||||
whitelistedKeys: [], | |||||
init: function () { | init: function () { | ||||
$(window).on('keydown', this.events.keyboard.keyDown.bind(this)); | $(window).on('keydown', this.events.keyboard.keyDown.bind(this)); | ||||
$(window).on('keyup', this.events.keyboard.keyUp.bind(this)); | $(window).on('keyup', this.events.keyboard.keyUp.bind(this)); | ||||
@@ -78,6 +81,22 @@ define([ | |||||
require(['plugins/shake.js'], this.onLoadShake.bind(this)); | require(['plugins/shake.js'], this.onLoadShake.bind(this)); | ||||
}, | }, | ||||
blacklistKeys: function (list) { | |||||
this.blacklistedKeys.push(...list); | |||||
}, | |||||
unBlacklistKeys: function (list) { | |||||
this.blacklistedKeys.spliceWhere(d => list.includes(d)); | |||||
}, | |||||
whitelistKeys: function (list) { | |||||
this.whitelistedKeys.push(...list); | |||||
}, | |||||
unWhitelistKeys: function (list) { | |||||
this.whitelistedKeys.spliceWhere(d => list.includes(d)); | |||||
}, | |||||
onLoadShake: function (shake) { | onLoadShake: function (shake) { | ||||
let shaker = new shake({ | let shaker = new shake({ | ||||
threshold: 5, | threshold: 5, | ||||
@@ -140,8 +159,22 @@ define([ | |||||
return result; | return result; | ||||
}, | }, | ||||
isKeyAllowed: function (key) { | |||||
const result = ( | |||||
key.length > 1 || | |||||
this.whitelistedKeys.includes(key) || | |||||
( | |||||
!this.blacklistedKeys.includes(key) && | |||||
!this.blacklistedKeys.includes('*') | |||||
) | |||||
); | |||||
return result; | |||||
}, | |||||
events: { | events: { | ||||
keyboard: { | keyboard: { | ||||
/* eslint-disable-next-line max-lines-per-function */ | |||||
keyDown: function (e) { | keyDown: function (e) { | ||||
if (!this.enabled) | if (!this.enabled) | ||||
return; | return; | ||||
@@ -156,6 +189,9 @@ define([ | |||||
if ((e.keyCode === 9) || (e.keyCode === 8) || (e.keyCode === 122)) | if ((e.keyCode === 9) || (e.keyCode === 8) || (e.keyCode === 122)) | ||||
e.preventDefault(); | e.preventDefault(); | ||||
if (!this.isKeyAllowed(key)) | |||||
return; | |||||
if (this.keys.has(key)) | if (this.keys.has(key)) | ||||
this.keys[key] = 2; | this.keys[key] = 2; | ||||
else { | else { | ||||
@@ -76,6 +76,22 @@ define([ | |||||
return inside; | return inside; | ||||
}, | }, | ||||
//Helper function to check if a point is inside an area | |||||
// This function is optimized to check if the point is outside the rect first | |||||
// and if it is not, we do the more expensive isInPolygon check | |||||
isInArea: function (x, y, { x: ax, y: ay, width, height, area }) { | |||||
//Outside rect | |||||
if ( | |||||
x < ax || | |||||
x >= ax + width || | |||||
y < ay || | |||||
y >= ay + height | |||||
) | |||||
return false; | |||||
return this.isInPolygon(x, y, area); | |||||
}, | |||||
distanceToPolygon: function (p, verts) { | distanceToPolygon: function (p, verts) { | ||||
return distanceToPolygon.calculate(p, verts); | return distanceToPolygon.calculate(p, verts); | ||||
} | } | ||||
@@ -313,8 +313,13 @@ define([ | |||||
return 0; | return 0; | ||||
}); | }); | ||||
if (this.zoneId !== null) | |||||
events.emit('onRezone', this.zoneId); | |||||
if (this.zoneId !== null) { | |||||
events.emit('onRezone', { | |||||
oldZoneId: this.zoneId, | |||||
newZoneId: msg.zoneId | |||||
}); | |||||
} | |||||
this.zoneId = msg.zoneId; | this.zoneId = msg.zoneId; | ||||
msg.clientObjects.forEach(c => { | msg.clientObjects.forEach(c => { | ||||
@@ -384,60 +389,45 @@ define([ | |||||
let foundVisibleLayer = null; | let foundVisibleLayer = null; | ||||
let foundHiddenLayer = null; | let foundHiddenLayer = null; | ||||
const fnTileInArea = physics.isInArea.bind(physics, x, y); | |||||
const fnPlayerInArea = physics.isInArea.bind(physics, px, py); | |||||
hiddenRooms.forEach(h => { | hiddenRooms.forEach(h => { | ||||
const { discovered, layer, interior } = h; | const { discovered, layer, interior } = h; | ||||
const { x: hx, y: hy, width, height, area } = h; | |||||
//Is the tile outside the hider | |||||
if ( | |||||
x < hx || | |||||
x >= hx + width || | |||||
y < hy || | |||||
y >= hy + height | |||||
) { | |||||
//If the hider is an interior, the tile should be hidden if the player is inside the hider | |||||
if (interior) { | |||||
if (physics.isInPolygon(px, py, area)) | |||||
foundHiddenLayer = layer; | |||||
} | |||||
return; | |||||
} | |||||
const playerInHider = fnPlayerInArea(h); | |||||
const tileInHider = fnTileInArea(h); | |||||
//Is the tile inside the hider | |||||
if (!physics.isInPolygon(x, y, area)) | |||||
return; | |||||
if (playerInHider) { | |||||
if (interior && !tileInHider) { | |||||
foundHiddenLayer = layer; | |||||
if (discovered) { | |||||
foundVisibleLayer = layer; | |||||
return; | |||||
} | |||||
} else if (tileInHider && !discovered) { | |||||
foundHiddenLayer = layer; | |||||
return; | return; | ||||
} | |||||
//Is the player outside the hider | |||||
if ( | |||||
px < hx || | |||||
px >= hx + width || | |||||
py < hy || | |||||
py >= hy + height | |||||
) { | |||||
foundHiddenLayer = layer; | |||||
} else if (tileInHider && discovered) { | |||||
foundVisibleLayer = layer; | |||||
return; | return; | ||||
} | } | ||||
//Is the player inside the hider | |||||
if (!physics.isInPolygon(px, py, area)) { | |||||
foundHiddenLayer = layer; | |||||
if (!tileInHider) | |||||
return; | return; | ||||
} | |||||
foundVisibleLayer = layer; | foundVisibleLayer = layer; | ||||
}); | }); | ||||
//We compare hider layers to cater for hiders inside hiders | //We compare hider layers to cater for hiders inside hiders | ||||
return (foundHiddenLayer > foundVisibleLayer) || (foundHiddenLayer === 0 && foundVisibleLayer === null); | |||||
return ( | |||||
foundHiddenLayer > foundVisibleLayer || | |||||
( | |||||
foundHiddenLayer === 0 && | |||||
foundVisibleLayer === null | |||||
) | |||||
); | |||||
}, | }, | ||||
updateSprites: function () { | updateSprites: function () { | ||||
@@ -52,7 +52,7 @@ define([ | |||||
}, | }, | ||||
//Fired when a character rezones | //Fired when a character rezones | ||||
// 'scope' is the new zone name | |||||
// 'newScope' is the new zone name | |||||
unload: function (newScope) { | unload: function (newScope) { | ||||
const { sounds } = this; | const { sounds } = this; | ||||
@@ -1,6 +1,6 @@ | |||||
{ | { | ||||
"name": "isleward_client", | "name": "isleward_client", | ||||
"version": "0.10.6", | |||||
"version": "0.11.0", | |||||
"description": "isleward", | "description": "isleward", | ||||
"dependencies": { | "dependencies": { | ||||
}, | }, | ||||
@@ -1 +0,0 @@ | |||||
.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:#fcfcfc;font-size:18px;background-color:rgba(49,33,54,.15);padding:8px;text-shadow:2px 2px 0 #312136,-2px -2px 0 #312136,2px -2px 0 #312136,-2px 2px 0 #312136,2px 2px 0 #312136;animation:.5s ease-in-out infinite bounce}.uiAnnouncements .list .message.success{color:#80f643}.uiAnnouncements .list .message.failure{color:#d43346}@keyframes bounce{0%{top:0}50%{top:4px}100%{top:0}} |
@@ -1 +0,0 @@ | |||||
.uiCharacters{display:flex;flex-direction:column;align-items:center;position:absolute}.uiCharacters .logo{width:562px;height:200px;margin-bottom:60px}.uiCharacters .bottom{display:flex;height:300px}.uiCharacters .bottom .left,.uiCharacters .bottom .right{background-color:#3a3b4a;filter:drop-shadow(0 -2px 0 #2d2136) drop-shadow(0 2px 0 #2d2136) drop-shadow(2px 0 0 #2d2136) drop-shadow(-2px 0 0 #2d2136)}.uiCharacters .bottom .left{width:400px;overflow-y:auto}.uiCharacters .bottom .left .character{height:50px;width:100%;color:#fcfcfc;cursor:pointer;display:flex;justify-content:center;align-items:center}.uiCharacters .bottom .left .character:hover{background-color:#505360}.uiCharacters .bottom .left .character.selected{background-color:#69696e}.uiCharacters .bottom .right{width:400px;padding:10px;margin-left:30px;display:flex;flex-direction:column}.uiCharacters .bottom .right .portrait{height:205px;background-color:#2d2136;display:flex;justify-content:center;align-items:center}.uiCharacters .bottom .right .portrait .sprite{width:8px;height:8px;transform-origin:50% 50%;transform:scale(16);image-rendering:pixelated;image-rendering:optimizeSpeed;image-rendering:crisp-edges;display:none}.uiCharacters .bottom .right .info{height:30px;margin-bottom:10px;background-color:#2d2136;color:#fcfcfc;display:flex;justify-content:space-between;padding:0 10px}.uiCharacters .bottom .right .info .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uiCharacters .bottom .right .info .class{text-align:right;color:#bcbcbc}.uiCharacters .bottom .right .buttons{display:flex}.uiCharacters .bottom .right .buttons .btn{background-color:#3a71ba;width:calc((100% - (10px * 2))/ 3);float:left;margin-right:10px;color:#fcfcfc}.uiCharacters .bottom .right .buttons .btn:last-child{margin-right:0}.uiCharacters .bottom .right .buttons .btn:hover{background-color:#42548d}.uiCharacters .bottom .right .buttons .btn.deleting{background-color:#d43346;color:#fcfcfc}.uiCharacters .message{height:30px;width:100%;margin-top:30px;float:left;text-align:center;color:#fcfcfc;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)}.mobile .uiCharacters{height:300px}.mobile .uiCharacters .logo{display:none} |
@@ -1 +0,0 @@ | |||||
.uiContext{display:none;position:absolute;z-index:999999;border:5px solid #42548d;background-color:rgba(49,33,54,.95);padding:5px;color:#fcfcfc;text-align:center;line-height:15px}.uiContext .list{width:100%;height:100%}.uiContext .list .option{width:100%;padding:5px;color:#fcfcfc;cursor:pointer;display:flex;justify-content:center}.uiContext .list .option:hover:not(.no-hover){background-color:#3a71ba}.uiContext .list .option.divider{line-height:2px;padding:0;margin:5px 0;color:transparent;background-color:#69696e}.uiContext .list .option.no-hover:not(.divider){color:#929398}.uiContext .list .option .hotkey{color:#48edff}.uiContext .list .option .hotkey:not(:empty){margin-left:10px} |
@@ -1 +0,0 @@ | |||||
.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:#373041}.uiCreateCharacter .box-left .left .label{color:#c0c3cf;text-align:center;margin-bottom:8.3px}.uiCreateCharacter .box-left .left .skinBox{display:flex;flex-direction:row;height:35px}.uiCreateCharacter .box-left .left .skinBox .btn{width:35px;margin:0;flex-shrink:0;height:100%;display:flex;justify-content:center;align-items:center;padding:0;background-color:#69696e}.uiCreateCharacter .box-left .left .skinBox .btn:first-child{margin-right:10px}.uiCreateCharacter .box-left .left .skinBox .btn:last-child{margin-left:10px}.uiCreateCharacter .box-left .left .skinBox .btn:hover{background-color:#929398}.uiCreateCharacter .box-left .left .skinBox .txtCostume{height:100%;display:flex;justify-content:center;align-items:center;padding:0}.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:8px;height:8px;transform:scale(16);transform-origin:0 0;image-rendering:optimizeSpeed;image-rendering:pixelated;image-rendering:crisp-edges}.uiCreateCharacter .box-left .textbox{width:100%;background-color:#2d2136;border:2px solid #929398;color:#fcfcfc;margin-bottom:22px}.uiCreateCharacter .box-left .btn{background-color:#3a71ba;width:calc((100% - 27px)/ 2);float:left;margin-right:27px;color:#fcfcfc}.uiCreateCharacter .box-left .btn:last-child{margin-right:0}.uiCreateCharacter .box-left .btn: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:13px;background-color:#3a3b4a}.uiCreateCharacter .box-right .top{width:100%;color:#fcfcfc}.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:#fcfcfc}.uiCreateCharacter .box-right .top .list .prophecy:hover{color:#fcfcfc}.mobile .uiCreateCharacter{height:276px;width:calc(1040px - 80px);display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center}.mobile .uiCreateCharacter .logo{display:none}.mobile .uiCreateCharacter .box-left{width:45%}.mobile .uiCreateCharacter .box-left .skinBox{height:35px}.mobile .uiCreateCharacter .box-right{width:45%} |
@@ -1 +0,0 @@ | |||||
.uiDeath{display:none;width:400px;background-color:#3c3f4c;border:4px solid #929398;text-align:center;padding:16px 16px 0 16px}.uiDeath .msg{color:#fcfcfc}.uiDeath .msg .inner{display:inline-block;color:#ff6942}.uiDeath .penalty{color:#faac45;margin-top:15px}.uiDeath .btn{color:#fcfcfc;width:100%;height:32px;background-color:#3fa7dd;margin:16px 0;padding-top:8px;cursor:pointer}.uiDeath .btn:hover{background-color:#80c5e9;color:#2d2136}.uiDeath.permadeath .buttons .btn-respawn{display:none}.uiDeath.permadeath .buttons .btn-logout{display:block}.uiDeath .buttons .btn-logout{display:none} |
@@ -1 +0,0 @@ | |||||
.uiDialogue{position:absolute;bottom:16px;width:calc(320px + (8px * 2));padding:8px;background-color:rgba(55,48,65,.9);display:none;box-shadow:0 -2px 0 #2d2136,0 2px 0 #2d2136,2px 0 0 #2d2136,-2px 0 0 #2d2136}.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:#fcfcfc;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)} |
@@ -1 +0,0 @@ | |||||
.uiEffects{position:absolute;left:16px;top:104px}.uiEffects .icon{width:40px;height:40px;padding:4px;background-color:rgba(49,33,54,.75);margin-right:16px;float:left}.uiEffects .icon .inner{width:32px;height:32px;background:url(../../../images/statusIcons.png) 0 0}.mobile .uiEffects{left:316px;top:10px} |
@@ -337,10 +337,10 @@ | |||||
} | } | ||||
.mobile .uiEquipment { | .mobile .uiEquipment { | ||||
width: 100%; | |||||
height: 100%; | |||||
margin-left: 5px; | |||||
margin-top: 5px; | |||||
width: calc(100% - 10px); | |||||
height: calc(100% - 10px); | |||||
margin-left: -5px; | |||||
margin-top: -5px; | |||||
.content { | .content { | ||||
flex-direction: column; | flex-direction: column; | ||||
@@ -1 +0,0 @@ | |||||
.uiEvents{margin-top:10px;width:326px;box-shadow:0 -2px 0 #2d2136,0 2px 0 #2d2136,2px 0 0 #2d2136,-2px 0 0 #2d2136}.uiEvents .heading{color:#ffeb38;padding:8px;background-color:rgba(58,59,74,.9)}.uiEvents .list .event{cursor:pointer;padding:8px;background-color:rgba(58,59,74,.9)}.uiEvents .list .event:hover{background-color:rgba(92,93,117,.9)}.uiEvents .list .event .name{color:#fcfcfc;margin-bottom:3px}.uiEvents .list .event .description{color:#a3a3a3}.uiEvents .list .event.active .name{color:#3fa7dd}.uiEvents .list .event.ready .name{color:#80f643}.uiEvents .list .event.ready .description{display:none}.uiEvents .btnCollapse{display:none}.mobile .uiEvents{background-color:rgba(55,48,65,.9);margin-top:0}.mobile .uiEvents:not(.active){width:64px;height:64px}.mobile .uiEvents:not(.active):after{content:'';position:absolute;left:0;top:0;background:url(../../../images/uiIcons.png);background-position:-128px -128px;width:64px;height:64px}.mobile .uiEvents:not(.active)>*{display:none}.mobile .uiEvents.active{z-index:3;position:absolute;right:0;top:0}.mobile .uiEvents.active .btn{display:block;position:absolute;right:calc(100% + 10px);top:0;background-color:rgba(55,48,65,.9);width:64px;height:64px;padding-top:0}.mobile .uiEvents.active .btn .icon{width:100%;height:100%;background:url(../../../images/uiIcons.png) -448px 0} |
@@ -1 +0,0 @@ | |||||
.uiHelp{display:none;z-index:2;border:5px solid #3c3f4c;text-align:center;flex-direction:column}.uiHelp>.heading{color:#48edff;width:100%;height:36px;background-color:#3c3f4c;position:relative}.uiHelp>.heading .heading-text{padding-top:8px;margin:auto}.uiHelp .content{overflow-y:auto;background-color:#312136;width:100%;flex:1;display:flex;flex-direction:column;padding:5px}.uiHelp .content .row{padding:5px;display:flex;justify-content:center;background-color:#373041}.uiHelp .content .row+.row{margin-top:5px}.uiHelp .content .row.mobile{display:none}.uiHelp .content .row .topic{color:#3fa7dd;text-align:right;width:30%}.uiHelp .content .row .desc{color:#c0c3cf;text-align:left;width:70%;max-width:400px;padding-left:20px}.uiHelp .content .row .toslink{color:#fcfcfc;cursor:pointer}.uiHelp .content .row .toslink:hover{color:#48edff}.mobile .uiHelp{height:80vh}.mobile .uiHelp .row{display:none}.mobile .uiHelp .row.mobile{display:flex} |
@@ -1 +0,0 @@ | |||||
.uiHud{position:absolute;left:10px;top:10px}.uiHud .hudBox{position:absolute;left:0;top:0;width:calc(280px + (8px * 2));padding:8px;background-color:rgba(58,59,74,.9);box-shadow:0 -2px 0 #2d2136,0 2px 0 #2d2136,2px 0 0 #2d2136,-2px 0 0 #2d2136}.uiHud .hudBox .portraitBox{float:left;margin-right:12px}.uiHud .hudBox .portraitBox .portrait{visibility:hidden;width:64px;height:64px}.uiHud .hudBox .boxes{width:calc(100% - 76px);float:left;height:100%}.uiHud .hudBox .boxes .statBox{width:100%;height:18px;margin-bottom:5px;position:relative}.uiHud .hudBox .boxes .statBox:last-child{margin-bottom:0}.uiHud .hudBox .boxes .statBox [class^=stat]{position:absolute;left:0;top:0;height:100%}.uiHud .hudBox .boxes .statBox .statManaReserve{position:absolute;right:0;top:0;left:auto;height:100%;background-color:#c0c3cf}.uiHud .hudBox .boxes .statBox .text{position:absolute;left:0;top:0;width:100%;height:100%;text-align:center;color:#fcfcfc;padding:2px 0;line-height:16px;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 .hudBox .boxes .statBox:nth-child(1){background-color:#802343}.uiHud .hudBox .boxes .statBox:nth-child(2){background-color:#42548d}.uiHud .hudBox .boxes .statBox:nth-child(3){background-color:#386646}.uiHud .hudBox .boxes .statBox .statHp{background-color:#d43346}.uiHud .hudBox .boxes .statBox .statMana{background-color:#3fa7dd}.uiHud .hudBox .boxes .statBox .statXp{background-color:#4ac441}.uiHud .quickBar{position:absolute;left:calc(290px + (8px * 2));top:0;box-shadow:0 -2px 0 #2d2136,0 2px 0 #2d2136,2px 0 0 #2d2136,-2px 0 0 #2d2136}.uiHud .quickBar .quickItem{display:none;width:80px;height:80px;background-color:rgba(58,59,74,.9);margin-bottom:8px;cursor:pointer;padding:8px;position:relative}.uiHud .quickBar .quickItem .icon{height:100%;filter:brightness(100%) drop-shadow(0 -4px 0 #373041) drop-shadow(0 4px 0 #373041) drop-shadow(4px 0 0 #373041) drop-shadow(-4px 0 0 #373041)}.uiHud .quickBar .quickItem .info{left:6px;bottom:3px;position:absolute;color:#fcfcfc;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);-moz-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)}.uiHud .quickBar .quickItem:hover .icon{filter:brightness(160%);-moz-filter:brightness(160%)}.uiHud .quickBar .quickItem:hover.empty{background-color:rgba(72,237,255,.1)} |
@@ -1 +0,0 @@ | |||||
.uiLeaderboard{display:none;width:600px;height:410px;border:5px solid rgba(60,63,76,.9);text-align:center}.uiLeaderboard>.heading{color:#48edff;width:100%;height:36px;background-color:rgba(60,63,76,.9)}.uiLeaderboard>.heading .heading-text{padding-top:8px;margin:auto}.uiLeaderboard .result{background-color:rgba(55,48,65,.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:#fcfcfc}.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.online .col{color:#4ac441}.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:#fcfcfc;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,.9);padding:5px}.uiLeaderboard .prophecies .heading{width:100%;height:36px;color:#3fa7dd}.uiLeaderboard .prophecies .heading .heading-text{margin:auto}.uiLeaderboard .prophecies .btn,.uiLeaderboard .prophecies .prophecy{cursor:pointer}.uiLeaderboard .prophecies .prophecy{width:100%;padding:5px 10px;background-color:#69696e;color:#fcfcfc;margin-bottom:12px}.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 .btn-refresh{width:calc(100% - 10px);background-color:#3a71ba;padding:5px 10px;position:absolute;bottom:5px;color:#fcfcfc}.uiLeaderboard .prophecies .btn-refresh:hover{background-color:#3fa7dd}.mobile .uiLeaderboard{z-index:2} |
@@ -1 +0,0 @@ | |||||
.uiLogin{display:none;width:562px;height:475px;margin-top:-80px;display:flex;flex-direction:column;align-items:center}.uiLogin>*{flex-shrink:0}.uiLogin .logo{width:562px;height:200px;margin-bottom:48px;filter:drop-shadow(0 -4px 0 #312136) drop-shadow(0 4px 0 #312136) drop-shadow(4px 0 0 #312136) drop-shadow(-4px 0 0 #312136)}.uiLogin .right{height:169px;background-color:#3a3b4a;width:400px;padding:16px}.uiLogin .right .label,.uiLogin .right input{float:left}.uiLogin .right .label{width:30%;padding-top:10px;color:#80f643}.uiLogin .right input{width:70%}.uiLogin .right .textbox,.uiLogin .right input,.uiLogin .right input:-webkit-autofill{-webkit-appearance:none;box-shadow:0 0 0 20px #2d2136 inset;color:#fcfcfc;-webkit-text-fill-color:#fcfcfc;margin-bottom:16px}.uiLogin .right .textbox,.uiLogin .right input{background-color:#2d2136;color:#fcfcfc;-webkit-text-fill-color:#fcfcfc;margin-bottom:16px;filter:none}.uiLogin .right .message{height:16px;width:200%;margin-left:-50%;margin-top:36px;float:left;text-align:center;color:#ff6942;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);-moz-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)}.uiLogin .right .top-buttons{width:100%;height:35px}.uiLogin .right .top-buttons .btn{background-color:#3a71ba;width:calc((100% - 16px)/ 2);float:left;margin-right:16px;color:#fcfcfc}.uiLogin .right .top-buttons .btn:last-child{margin-right:0}.uiLogin .right .top-buttons .btn:hover{background-color:#42548d}.uiLogin .news{margin-top:40px;color:#fcfcfc;text-align:center;cursor:pointer;filter:drop-shadow(0 -4px 0 #312136) drop-shadow(0 4px 0 #312136) drop-shadow(4px 0 0 #312136) drop-shadow(-4px 0 0 #312136)}.uiLogin .spacer-h{height:61px}.uiLoginExtra .extra{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);display:flex}.uiLoginExtra .extra .btn{width:180px;padding-left:10px;padding-right:10px;background-color:#b15a30;color:#fcfcfc;filter:drop-shadow(0 -2px 0 #2d2136) drop-shadow(0 2px 0 #2d2136) drop-shadow(2px 0 0 #2d2136) drop-shadow(-2px 0 0 #2d2136)}.uiLoginExtra .extra .btn+.btn{margin-left:20px}.uiLoginExtra .extra .btn:hover{background-color:#763b3b}.uiLoginExtra .version{position:absolute;right:10px;bottom:10px;color:#ffeb38;cursor:pointer;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);-moz-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)}.mobile .uiLogin{margin-top:0}.mobile .uiLogin .logo{margin-bottom:30px}.mobile .uiLogin .news{margin-top:20px} |
@@ -11,11 +11,11 @@ | |||||
</div> | </div> | ||||
<div class="message"></div> | <div class="message"></div> | ||||
</div> | </div> | ||||
<div class="news" location="https://gitlab.com/Isleward/play.isleward.com/-/wikis/v0.10.6-Release-Notes">[ Latest Release Notes ]</div> | |||||
<div class="news" location="https://gitlab.com/Isleward/play.isleward.com/-/wikis/v0.11.0-Release-Notes">[ Latest Release Notes ]</div> | |||||
<div class="extra"> | <div class="extra"> | ||||
<div class="el btn btnPatreon monetization" location="https://patreon.com/bigbadwaffle">Pledge on Patreon</div> | <div class="el btn btnPatreon monetization" location="https://patreon.com/bigbadwaffle">Pledge on Patreon</div> | ||||
<div class="el btn btnPaypal monetization" location="https://www.paypal.com/donate?hosted_button_id=NEQAV3NG9PWXA">Donate on Paypal</div> | <div class="el btn btnPaypal monetization" location="https://www.paypal.com/donate?hosted_button_id=NEQAV3NG9PWXA">Donate on Paypal</div> | ||||
<div class="el btn btnWiki" location="http://wiki.isleward.com/Main_Page">Access the Wiki</div> | <div class="el btn btnWiki" location="http://wiki.isleward.com/Main_Page">Access the Wiki</div> | ||||
</div> | </div> | ||||
<div class="version" location="https://gitlab.com/Isleward/play.isleward.com/-/wikis/v0.10.5-Release-Notes">v0.10.6</div> | |||||
<div class="version" location="https://gitlab.com/Isleward/play.isleward.com/-/wikis/v0.11.0-Release-Notes">v0.11.0</div> | |||||
</div> | </div> |
@@ -1 +0,0 @@ | |||||
.uiMainMenu{display:none;background-color:#373041;border:5px solid #3c3f4c;text-align:center}.uiMainMenu>.heading{color:#48edff;width:100%;height:36px;background-color:#3c3f4c;position:relative}.uiMainMenu>.heading .heading-text{padding-top:8px;margin:auto}.uiMainMenu .options{display:flex;flex-direction:column;padding:10px}.uiMainMenu .options .btn{color:#fcfcfc;width:100%;height:35px;background-color:#3a71ba;cursor:pointer;padding:0 20px}.uiMainMenu .options .btn+.btn{margin-top:10px}.uiMainMenu .options .btn.btnNames{display:none}.uiMainMenu .options .btn:hover{background-color:#42548d}.uiMainMenu .options .btn.btn-red{background-color:#a82841}.uiMainMenu .options .btn.btn-red:hover{background-color:#802343}.uiMainMenu .options .btn.btn-orange{background-color:#b34b3a}.uiMainMenu .options .btn.btn-orange:hover{background-color:#953f36}.uiMainMenu .options .btnIssue{background-color:#a82841}.uiMainMenu .options .btnIssue:hover{background-color:#802343}.mobile .uiMainMenu .btnScreen{display:none}.mobile .uiMainMenu .btnNames{display:block} |
@@ -1 +0,0 @@ | |||||
.uiMenu{position:absolute;right:10px;bottom:10px;width:336px;height:144px;padding:8px;background-color:rgba(55,48,65,.9)}.uiMenu [class^=btn]{width:64px;height:64px;margin:0 8px;float:left;cursor:pointer;position:relative}.uiMenu [class^=btn]:hover{background-color:rgba(252,252,252,.1)}.uiMenu [class^=btn] .icon{pointer-events:none;position:absolute;left:0;top:0;width:100%;height:100%}.uiMenu [class^=btn].btnCollapse{display:none}.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].btnPassives{position:relative}.uiMenu [class^=btn].btnPassives .points{width:100%;text-align:center;left:0;bottom:23px;position:absolute;color:#fcfcfc;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)}.uiMenu [class^=btn].btnPassives .icon{background:url(../../../images/uiIcons.png) -320px -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].btnMainMenu .icon{background:url(../../../images/uiIcons.png) 0 -64px}.mobile .uiMenu{bottom:auto;top:10px;right:10px;width:64px;height:64px}.mobile .uiMenu:after{content:'';position:absolute;left:0;top:0;background:url(../../../images/uiIcons.png);background-position:0 -64px;width:64px;height:64px}.mobile .uiMenu>*{display:none}.mobile .uiMenu.active{display:flex;flex-direction:column;height:calc(100% - 20px);width:200px;z-index:2;flex-wrap:wrap-reverse;align-items:center;justify-content:center}.mobile .uiMenu.active:after{display:none}.mobile .uiMenu.active>*{display:block;margin:0}.mobile .uiMenu.active .btnCollapse{display:block;position:absolute;right:calc(100% + 10px);top:50%;transform:translateY(-50%);background-color:rgba(55,48,65,.9);width:64px;height:64px}.mobile .uiMenu.active .btnCollapse .icon{width:100%;height:100%;background:url(../../../images/uiIcons.png) -448px 0} |
@@ -296,11 +296,13 @@ define([ | |||||
input.resetKeys(); | input.resetKeys(); | ||||
this.el.removeClass('typing'); | this.el.removeClass('typing'); | ||||
this.el.find('.main').removeClass('hasBorderShadow'); | |||||
let textbox = this.find('input'); | let textbox = this.find('input'); | ||||
if (show) { | if (show) { | ||||
this.el.addClass('typing'); | this.el.addClass('typing'); | ||||
this.el.find('.main').addClass('hasBorderShadow'); | |||||
if (!config.rememberChatChannel) { | if (!config.rememberChatChannel) { | ||||
this.currentChannel = 'global'; | this.currentChannel = 'global'; | ||||
@@ -222,7 +222,6 @@ | |||||
} | } | ||||
&.typing { | &.typing { | ||||
box-shadow: 0 -2px 0 @black, 0 2px 0 @black, 2px 0 0 @black, -2px 0 0 @black; | |||||
pointer-events: all; | pointer-events: all; | ||||
.filters { | .filters { | ||||
@@ -1,20 +1,22 @@ | |||||
<div class="uiMessages active"> | <div class="uiMessages active"> | ||||
<div class="filters"> | <div class="filters"> | ||||
<div class="btn filter active" filter="info">info</div> | |||||
<div class="btn filter active" filter="rep">reputation</div> | |||||
<div class="btn filter active" filter="chat">players</div> | |||||
<div class="btn filter active" filter="loot">loot</div> | |||||
<div class="btn filter active hasBorderShadow" filter="info">info</div> | |||||
<div class="btn filter active hasBorderShadow" filter="rep">reputation</div> | |||||
<div class="btn filter active hasBorderShadow" filter="chat">players</div> | |||||
<div class="btn filter active hasBorderShadow" filter="loot">loot</div> | |||||
</div> | </div> | ||||
<div class="list rep chat info loot"></div> | |||||
<div class="bottom"> | |||||
<div class="channelPicker"></div> | |||||
<input type="text" class="el textbox message"> | |||||
<div class="input el textbox message"></div> | |||||
</div> | |||||
<div class="bottom time"></div> | |||||
<div class="bottom channelOptions"> | |||||
<div class="option">global</div> | |||||
<div class="option">party</div> | |||||
<div class="option">direct</div> | |||||
<div class="main"> | |||||
<div class="list rep chat info loot"></div> | |||||
<div class="bottom"> | |||||
<div class="channelPicker"></div> | |||||
<input type="text" class="el textbox message"> | |||||
<div class="input el textbox message"></div> | |||||
</div> | |||||
<div class="bottom time"></div> | |||||
<div class="bottom channelOptions"> | |||||
<div class="option">global</div> | |||||
<div class="option">party</div> | |||||
<div class="option">direct</div> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> |
@@ -1 +1 @@ | |||||
<div class="filter active" filter="filterName"></div> | |||||
<div class="filter active hasBorderShadow" filter="filterName"></div> |
@@ -1 +0,0 @@ | |||||
.uiMiddleHud{position:absolute;left:calc(50% - 12px);top:calc(50% + 31px)}.uiMiddleHud .btnGather{display:none;background-color:rgba(58,59,74,.9);padding:8px 10px 8px 10px;width:120px;margin-top:8px;margin-left:calc(12px - 60px);text-align:center;position:absolute;left:calc(50vw - 88px);top:calc(50vh - 113px);width:64px;height:64px}.uiMiddleHud .btnGather .icon{position:absolute;left:0;top:0;width:100%;height:100%;background:url(../../../images/uiIcons.png) -448px -64px}.uiMiddleHud .casting{display:none;width:32px;height:5px;position:relative;background-color:#763b3b}.uiMiddleHud .casting .bar{width:0%;height:100%;background-color:#faac45}.uiMiddleHud .casting .text{position:absolute;left:0;top:0;padding-top:2px;width:100%;text-align:center;color:#2d2136} |
@@ -1 +0,0 @@ | |||||
.uiOnline{display:none;background-color:#3c3f4c;border:5px solid #3c3f4c;text-align:center;width:450px;height:396px}.uiOnline>.heading{color:#48edff;width:100%;height:36px;background-color:#3c3f4c}.uiOnline>.heading .heading-text{padding-top:8px;margin:auto}.uiOnline .bottom{height:calc(100% - 36px);background-color:#373041;padding:8px}.uiOnline .bottom .list{width:100%;height:100%;overflow-y:auto;background-color:#373041;display:flex;flex-direction:column}.uiOnline .bottom .list .heading{height:24px;color:#fcfcfc}.uiOnline .bottom .list .heading>div{float:left;padding:4px;height:24px}.uiOnline .bottom .list .heading>div:nth-child(1){width:10%}.uiOnline .bottom .list .heading>div:nth-child(2){width:55%}.uiOnline .bottom .list .heading>div:nth-child(3){width:35%}.uiOnline .bottom .list .onlineUser{color:#929398;height:24px;cursor:pointer}.uiOnline .bottom .list .onlineUser>div{float:left;padding:4px;height:24px}.uiOnline .bottom .list .onlineUser>div:nth-child(1){width:10%}.uiOnline .bottom .list .onlineUser>div:nth-child(2){width:55%}.uiOnline .bottom .list .onlineUser>div:nth-child(3){width:35%}.uiOnline .bottom .list .onlineUser:hover{background-color:#3c3f4c}.mobile .uiOnline{z-index:2} |
@@ -1 +0,0 @@ | |||||
.uiOptions{display:none;width:400px;background-color:#373041;border:5px solid #3c3f4c;flex-direction:column}.uiOptions>.heading{color:#48edff;width:100%;height:36px;background-color:#3c3f4c;position:relative;text-align:center}.uiOptions>.heading .heading-text{padding-top:8px;margin:auto}.uiOptions .bottom{padding:10px;height:100%;overflow-y:auto}.uiOptions .bottom .list{display:flex;flex-direction:column}.uiOptions .bottom .list .heading{color:#929398;border-bottom:2px solid #69696e;margin:0 10px 5px 10px;padding-bottom:5px}.uiOptions .bottom .list .heading:not(:first-child){margin:10px 10px 5px 10px}.uiOptions .bottom .list .item{height:30px;display:flex;justify-content:space-between;align-items:center}.uiOptions .bottom .list .item .name{color:#3fa7dd;flex:1;height:100%;display:flex;align-items:center;padding:0 10px;margin-right:10px;cursor:pointer}.uiOptions .bottom .list .item .name:hover{color:#48edff;background-color:#505360}.uiOptions .bottom .list .item .value{color:#fcfcfc;display:flex;align-items:center;justify-content:flex-end;padding-right:10px}.uiOptions .bottom .list .item.volume{flex-wrap:wrap;height:60px}.uiOptions .bottom .list .item.volume .name{pointer-events:none}.uiOptions .bottom .list .item.volume .name,.uiOptions .bottom .list .item.volume .value{width:50%;height:30px}.uiOptions .bottom .list .item.volume .slider{padding:0 10px;width:100%;height:30px;display:flex;position:relative}.uiOptions .bottom .list .item.volume .slider .btn{width:30px;margin-top:5px;height:calc(100% - 10px);display:flex;justify-content:center;align-items:center;color:#fcfcfc;background-color:#505360;padding-top:unset}.uiOptions .bottom .list .item.volume .slider .btn:first-child{margin-right:10px}.uiOptions .bottom .list .item.volume .slider .btn:last-child{margin-left:10px}.uiOptions .bottom .list .item.volume .slider .btn:hover{background-color:#69696e}.uiOptions .bottom .list .item.volume .slider .bar{width:100%;background-color:#42548d;border-top:10px solid #373041;border-bottom:10px solid #373041;height:100%;position:relative}.uiOptions .bottom .list .item.volume .slider .bar .tick{position:absolute;width:5px;height:20px;top:-5px;left:100%;background-color:#48edff}.mobile .uiOptions{max-height:100%}.mobile .uiOptions .item.screen{display:none} |
@@ -1 +0,0 @@ | |||||
.uiOverlay{display:none;position:absolute;left:0;top:0;background-color:rgba(60,63,76,.55);width:100%;height:100%;z-index:99999} |
@@ -39,7 +39,9 @@ define([ | |||||
}, | }, | ||||
onGetConnectedPlayer: function (msg) { | onGetConnectedPlayer: function (msg) { | ||||
let party = this.party; | |||||
const { party } = this; | |||||
const { player: { serverId: playerId, zoneId: playerZone } } = window; | |||||
if (!party) | if (!party) | ||||
return; | return; | ||||
@@ -47,25 +49,26 @@ define([ | |||||
msg = [msg]; | msg = [msg]; | ||||
msg.forEach(m => { | msg.forEach(m => { | ||||
const { id: mId, zoneId: mZone } = m; | |||||
if (party.indexOf(m.id) === -1) | if (party.indexOf(m.id) === -1) | ||||
return; | return; | ||||
let zone = m.zone; | |||||
if (m.id === window.player.serverId) { | |||||
if (mId === playerId) { | |||||
party.forEach(p => { | party.forEach(p => { | ||||
let player = globals.onlineList.find(o => o.id === p); | |||||
const mObj = globals.onlineList.find(o => o.id === p); | |||||
let el = this.find('.member[memberId="' + p + '"]'); | let el = this.find('.member[memberId="' + p + '"]'); | ||||
el.removeClass('differentZone'); | el.removeClass('differentZone'); | ||||
if (player.zone !== zone) | |||||
if (mObj.mZone !== mZone) | |||||
el.addClass('differentZone'); | el.addClass('differentZone'); | ||||
}); | }); | ||||
} else { | } else { | ||||
let el = this.find('.member[memberId="' + m.id + '"]'); | let el = this.find('.member[memberId="' + m.id + '"]'); | ||||
el.removeClass('differentZone'); | el.removeClass('differentZone'); | ||||
if (m.zone !== window.player.zone) | |||||
if (m.mZone !== playerZone) | |||||
el.addClass('differentZone'); | el.addClass('differentZone'); | ||||
el.find('.txtLevel').html('level: ' + m.level); | el.find('.txtLevel').html('level: ' + m.level); | ||||
@@ -130,7 +133,7 @@ define([ | |||||
.attr('memberId', p) | .attr('memberId', p) | ||||
.on('contextmenu', this.showContext.bind(this, playerName, p)); | .on('contextmenu', this.showContext.bind(this, playerName, p)); | ||||
if (player.zone !== window.player.zone) | |||||
if (player.zoneId !== window.player.zoneId) | |||||
el.addClass('differentZone'); | el.addClass('differentZone'); | ||||
//Find stats | //Find stats | ||||
@@ -1 +0,0 @@ | |||||
.uiParty .party{position:absolute;left:16px;top:154px}.uiParty .party .list{overflow-y:auto;max-height:calc(100vh - 591px);padding-right:22px}.uiParty .party .list .member{width:160px;background-color:#3a3b4a;color:#fcfcfc;cursor:pointer}.uiParty .party .list .member+.member{margin-top:5px}.uiParty .party .list .member.differentZone{opacity:.4}.uiParty .party .list .member.differentZone .statBox [class^=stat]{width:0%!important}.uiParty .party .list .member:last-child{margin-bottom:0}.uiParty .party .list .member .statBox{width:100%;height:20px;background-color:#3c3f4c;position:relative;display:flex;justify-content:center;align-items:center}.uiParty .party .list .member .statBox+.statBox{border-top:2px solid #2d2136}.uiParty .party .list .member .statBox [class^=stat]{position:absolute;left:0;top:0;height:100%}.uiParty .party .list .member .statBox .text{color:#fcfcfc;z-index:1;padding:0 2px;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 .list .member .statBox:nth-child(1){background-color:#802343}.uiParty .party .list .member .statBox:nth-child(2){background-color:#42548d}.uiParty .party .list .member .statBox .statHp{background-color:#d43346}.uiParty .party .list .member .statBox .statMana{background-color:#3fa7dd}.uiParty .invite{position:absolute;right:436px;bottom:10px;background-color:rgba(55,48,65,.9);padding:10px;color:#fcfcfc;display:flex;flex-direction:column}.uiParty .invite>.text{margin-bottom:15px;text-align:center;display:flex;flex-direction:column}.uiParty .invite>.text .name{margin-top:10px}.uiParty .invite .buttons{display:flex}.uiParty .invite .buttons .btn{width:100%;background-color:#505360;text-align:center;padding:10px;cursor:pointer;display:flex;justify-content:center;align-items:center}.uiParty .invite .buttons .btn .text{pointer-events:none;color:#fcfcfc;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 .invite .buttons .btn+.btn{margin-left:10px}.uiParty .invite .buttons .btn.btnDecline{background-color:#d43346}.uiParty .invite .buttons .btn.btnDecline:hover{background-color:#a82841}.uiParty .invite .buttons .btn.btnAccept{background-color:#3f8d6d}.uiParty .invite .buttons .btn.btnAccept:hover{background-color:#386646}.uiParty.full .party .list .member{padding:5px;background-color:rgba(55,48,65,.9)}.uiParty.minimal .party .list .statBox:nth-child(2){display:none}.mobile .uiParty .list{max-height:calc(100% - 154px - 10px)} |
@@ -1 +0,0 @@ | |||||
.uiPassives{display:none;z-index:3;border:5px solid #3c3f4c;text-align:center;height:100%;width:100%;position:absolute;left:0px;top:0px}.uiPassives>.heading{color:#f2f5f5;width:100%;height:36px;background-color:#3c3f4c}.uiPassives>.heading .heading-text{padding-top:8px;margin:auto}.uiPassives .bottom{height:calc(100% - 36px - 36px);background-color:#373041}.uiPassives .bottom .btn.btnReset{position:absolute;height:35px;padding-left:10px;padding-right:10px;bottom:46px;right:10px;background-color:#a82841;color:#f2f5f5;cursor:pointer}.uiPassives .bottom .btn.btnReset:hover{background-color:#d43346}.uiPassives .bottom .canvas{width:calc(100vw - 10px)}.uiPassives .status{width:100%;height:36px;background-color:#3c3f4c}.uiPassives .status .points{padding-top:8px;margin:auto;color:#48edff} |
@@ -1 +0,0 @@ | |||||
.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:#fcfcfc;position:absolute;left:0;top:0;text-align:center;width:100%;height:100%;z-index:1;text-shadow:2px 0 #2d2136,-2px 0 #2d2136,0 -2px #2d2136,0 2px #2d2136,-2px -2px #2d2136,-2px 2px #2d2136,2px -2px #2d2136,2px 2px #2d2136} |
@@ -1 +0,0 @@ | |||||
.uiQuests{width:326px;box-shadow:0 -2px 0 #2d2136,0 2px 0 #2d2136,2px 0 0 #2d2136,-2px 0 0 #2d2136}.uiQuests .heading{color:#ffeb38;padding:8px;background-color:rgba(58,59,74,.9)}.uiQuests .list .quest{cursor:pointer;padding:8px;background-color:rgba(58,59,74,.9)}.uiQuests .list .quest:hover{background-color:rgba(92,93,117,.9)}.uiQuests .list .quest .zone{color:#69696e;margin-bottom:4px;text-align:right}.uiQuests .list .quest .name{color:#fcfcfc;margin-bottom:3px}.uiQuests .list .quest .description{color:#a3a3a3}.uiQuests .list .quest.disabled .description{display:none}.uiQuests .list .quest .reward{display:none;color:#44cb95}.uiQuests .list .quest:hover>.description{display:none}.uiQuests .list .quest:hover>.reward{display:block}.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 .reward{display:none}.uiQuests .list .quest.ready .ready-text{display:block;color:#fcfcfc}.uiQuests .btn{display:none}.uiQuests.minimal .quest.disabled{display:none}.mobile .uiQuests{background-color:rgba(55,48,65,.9)}.mobile .uiQuests:not(.active){width:64px;height:64px;margin-left:10px;position:relative}.mobile .uiQuests:not(.active):after{content:'';position:absolute;left:0;top:0;background:url(../../../images/uiIcons.png);background-position:-64px -128px;width:64px;height:64px}.mobile .uiQuests:not(.active)>*{display:none}.mobile .uiQuests.active{z-index:3;position:absolute;right:0;top:0}.mobile .uiQuests.active .btn{display:block;position:absolute;right:calc(100% + 10px);top:0;background-color:rgba(55,48,65,.9);width:64px;height:64px;padding-top:0}.mobile .uiQuests.active .btn .icon{width:100%;height:100%;background:url(../../../images/uiIcons.png) -448px 0} |
@@ -1 +0,0 @@ | |||||
.uiReputation{display:none;width:600px;height:385px;border:5px solid rgba(60,63,76,.9);text-align:center}.uiReputation>.heading{color:#48edff;width:100%;height:36px;background-color:rgba(60,63,76,.9)}.uiReputation>.heading .heading-text{padding-top:8px;margin:auto}.uiReputation .info,.uiReputation .list{background-color:rgba(55,48,65,.9);float:left;height:calc(100% - 36px)}.uiReputation .list{width:40%;padding:15px 15px 15px 15px}.uiReputation .list .faction{width:100%;padding:5px 10px;background-color:#69696e;color:#fcfcfc;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:justify}.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:#fcfcfc;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);-moz-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)}.uiReputation .list:empty{display:none}.uiReputation .list:empty+.info{width:100%}.mobile .uiReputation{z-index:2} |
@@ -1 +0,0 @@ | |||||
.uiSpells{position:absolute;right:10px;top:10px;height:72px;box-shadow:0 -2px 0 #2d2136,0 2px 0 #2d2136,2px 0 0 #2d2136,-2px 0 0 #2d2136}.uiSpells .spell{width:64px;height:64px;float:left;margin-left:10px;background-color:#2d2136;cursor:pointer;position:relative;box-sizing:content-box;border:5px solid rgba(58,59,74,.9);transition-property:filter;transition-duration:.1s}.uiSpells .spell:first-child{margin-left:0}.uiSpells .spell:hover{filter:brightness(160%);-moz-filter:brightness(160%)}.uiSpells .spell.active .hotkey{color:#80f643}.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,.75)}.uiSpells .spell .hotkey{position:absolute;left:-2px;bottom:-6px;color:#fcfcfc;font-size:18px;z-index:2;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}.mobile .uiSpells{top:auto;bottom:10px;padding:0;height:auto;background-color:transparent;display:flex;flex-direction:column-reverse}.mobile .uiSpells .spell{position:relative;margin:10px 0 0 0;background-color:rgba(58,59,74,.9);border:none}.mobile .uiSpells .spell .hotkey{display:none}.mobile .uiSpells .spell.active:before{content:'';width:5px;height:100%;left:-5px;top:0;background-color:#4ac441;position:absolute} |
@@ -7,7 +7,6 @@ | |||||
right: 10px; | right: 10px; | ||||
top: 10px; | top: 10px; | ||||
height: (@btnSize + @pad); | height: (@btnSize + @pad); | ||||
box-shadow: 0 -2px 0 @black, 0 2px 0 @black, 2px 0 0 @black, -2px 0 0 @black; | |||||
.spell { | .spell { | ||||
width: @btnSize; | width: @btnSize; | ||||
@@ -1,4 +1,4 @@ | |||||
<div class="spell"> | |||||
<div class="spell hasBorderShadow"> | |||||
<div class="icon"></div> | <div class="icon"></div> | ||||
<div class="hotkey">$HOTKEY$</div> | <div class="hotkey">$HOTKEY$</div> | ||||
<div class="cooldown"></div> | <div class="cooldown"></div> |
@@ -1 +0,0 @@ | |||||
.uiStash.scrolls{width:834px}.uiStash.scrolls .grid{overflow-y:auto;width:825px}.uiStash .footer{color:#3fa7dd;background-color:#373041;padding-bottom:7px} |
@@ -1 +0,0 @@ | |||||
.uiTalk{border:5px solid rgba(60,63,76,.9);width:400px;display:none;text-align:center;position:absolute;top:10px}.uiTalk .source{padding:5px 5px;background-color:rgba(60,63,76,.9)}.uiTalk .source .name{color:#48edff;margin-bottom:5px}.uiTalk .source .msg{color:#fcfcfc;line-height:22px}.uiTalk .options{padding:5px;background-color:rgba(55,48,65,.9)}.uiTalk .options .option{color:#3fa7dd;padding:5px 5px;cursor:pointer;line-height:22px}.uiTalk .options .option:hover{color:#fcfcfc} |
@@ -1 +0,0 @@ | |||||
.uiTarget{position:absolute;left:406px;top:10px;width:calc(200px + (8px * 2));padding:8px;background-color:rgba(58,59,74,.9);display:none}.uiTarget .boxes{width:100%;float:left;height:100%}.uiTarget .boxes .infoBox{color:#fcfcfc;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:nth-child(3){margin-bottom:0}.uiTarget .boxes .statBox:last-child{display:none;position:absolute;margin-left:-8px;margin-top:13px;background-color:#69696e}.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:#fcfcfc;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:nth-child(4){background-color:#763b3b}.uiTarget .boxes .statBox .statHp{background-color:#d43346}.uiTarget .boxes .statBox .statMana{background-color:#3fa7dd}.uiTarget .boxes .statBox .statCasting{background-color:#faac45}.mobile .uiTarget{left:10px;top:100px} |
@@ -1 +0,0 @@ | |||||
.uiTerms{display:none;width:562px;height:700px;margin-top:-80px;display:flex;flex-direction:column;align-items:center}.uiTerms>*{flex-shrink:0}.uiTerms .logo{width:562px;height:200px;margin-bottom:24px;filter:drop-shadow(0 -4px 0 #312136) drop-shadow(0 4px 0 #312136) drop-shadow(4px 0 0 #312136) drop-shadow(-4px 0 0 #312136)}.uiTerms .heading{color:#ff6942;filter:drop-shadow(0 -4px 0 #312136) drop-shadow(0 4px 0 #312136) drop-shadow(4px 0 0 #312136) drop-shadow(-4px 0 0 #312136);margin-bottom:24px}.uiTerms .content{flex:1;width:100%;overflow-y:auto;background-color:#373041;border:5px solid #3c3f4c;padding:10px;color:#c0c3cf;text-align:justify}.uiTerms .content .title{color:#fcfcfc}.uiTerms .buttons{width:100%;background-color:#373041;display:flex;justify-content:space-between;border-style:solid;border-color:#3c3f4c;border-width:0 5px 5px 5px;padding:5px}.uiTerms .buttons .btn{background-color:#3a71ba;color:#fcfcfc;height:35px;padding-left:10px;padding-right:10px}.uiTerms .buttons .btn:hover{background-color:#3fa7dd}.uiTerms a{color:#3fa7dd}.uiTerms a:hover{color:#48edff}.mobile .uiTerms{height:80%;margin-top:0}.mobile .uiTerms .logo{display:none} |
@@ -1 +0,0 @@ | |||||
.uiTooltipInfo{position:absolute;right:11px;bottom:164px;background-color:rgba(55,48,65,.9);padding:8px 32px;line-height:20px;color:#fcfcfc;text-align:center} |
@@ -1,6 +1,7 @@ | |||||
@import "../../../css/colors.less"; | @import "../../../css/colors.less"; | ||||
.uiTooltipInfo { | .uiTooltipInfo { | ||||
display: none; | |||||
position: absolute; | position: absolute; | ||||
right: 11px; | right: 11px; | ||||
bottom: 164px; | bottom: 164px; | ||||
@@ -1 +0,0 @@ | |||||
.uiTooltipItem>*{z-index:999999}.uiTooltipItem .tooltip{display:none;flex-direction:column;position:absolute;margin-left:-4px;margin-top:-4px;background-color:rgba(60,63,76,.95);pointer-events:none;padding:10px;color:#fcfcfc;align-items:center;line-height:18px;max-width:300px;text-align:center}.uiTooltipItem .tooltip>:not(:empty){display:flex;flex-direction:column;align-items:center}.uiTooltipItem .tooltip>:not(:empty)+*{margin-top:2px}.uiTooltipItem .tooltip>:empty{display:none}.uiTooltipItem .tooltip .line{height:2px;width:100%;background-color:#69696e}.uiTooltipItem .tooltip .space{height:6px}.uiTooltipItem .tooltip .smallSpace{height:2px}.uiTooltipItem .tooltip .type{color:#929398}.uiTooltipItem .tooltip .power{color:#80f643}.uiTooltipItem .tooltip>.implicitStats{width:100%;color:#c0c3cf}.uiTooltipItem .tooltip>.implicitStats>*+*{margin-top:2px}.uiTooltipItem .tooltip>.implicitStats .gainStat{color:#80f643}.uiTooltipItem .tooltip>.implicitStats .loseStat{color:#d43346}.uiTooltipItem .tooltip>.stats{width:100%;color:#c0c3cf}.uiTooltipItem .tooltip>.stats>*+*{margin-top:2px}.uiTooltipItem .tooltip>.stats .gainStat{color:#80f643}.uiTooltipItem .tooltip>.stats .loseStat{color:#d43346}.uiTooltipItem .tooltip>.stats .enchanted{color:#44cb95!important}.uiTooltipItem .tooltip .effects{color:#fcfcfc}.uiTooltipItem .tooltip .faction{color:#929398}.uiTooltipItem .tooltip .high-level{color:#d43346}.uiTooltipItem .tooltip .material{color:#929398}.uiTooltipItem .tooltip .quest{color:#929398}.uiTooltipItem .tooltip .info{color:#69696e}.uiTooltipItem .tooltip .damage .gainDamage{color:#80f643}.uiTooltipItem .tooltip .damage .loseDamage{color:#d43346}.uiTooltipItem .tooltip .description{color:#ca752f;text-align:center}.uiTooltipItem .tooltip .worth.no-afford{color:#d43346}.uiTooltipItem>.btn{position:absolute;background-color:#3fa7dd;color:#fcfcfc;padding:10px;text-align:center}.mobile .uiTooltipItem{z-index:9999999999}.mobile .uiTooltipItem>*{z-index:9999999999} |
@@ -1 +0,0 @@ | |||||
.uiTooltips{z-index:4}.uiTooltips .tooltip{display:none;z-index:4;background-color:rgba(58,59,74,.85);position:absolute;padding:8px;color:#fcfcfc;text-align:justify}.uiTooltips .tooltip.bright{background-color:#c0c3cf;color:#2d2136}.uiTooltips .tooltip .hidden{display:none} |
@@ -1 +0,0 @@ | |||||
.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,.15)}.uiTrade .grid .item .icon.skin{width:16px;height:16px;transform:scale(4);transform-origin:0 0;image-rendering:optimizeSpeed;image-rendering:pixelated;image-rendering:crisp-edges} |
@@ -1 +0,0 @@ | |||||
.uiWardrobe{display:none;width:600px;height:350px;border:5px solid #3c3f4c;text-align:center;background-color:#373041}.uiWardrobe>.heading{color:#48edff;width:100%;height:36px;background-color:#3c3f4c;position:relative}.uiWardrobe>.heading .heading-text{padding-top:8px;margin:auto}.uiWardrobe .bottom{height:calc(100% - 36px)}.uiWardrobe .bottom .left,.uiWardrobe .bottom .right{float:left;height:100%}.uiWardrobe .bottom .left{width:calc(100% * .4)}.uiWardrobe .bottom .left .heading{width:100%;height:30px;color:#ffeb38;padding-top:7px}.uiWardrobe .bottom .left .list{width:100%;height:calc(100% - 30px);overflow:auto}.uiWardrobe .bottom .left .list .skinName{width:100%;cursor:pointer;color:#fff;padding:5px}.uiWardrobe .bottom .left .list .skinName:hover{background-color:#3c3f4c}.uiWardrobe .bottom .left .list .skinName.active{color:#48edff}.uiWardrobe .bottom .left .list .skinName.current:after{content:' (x)'}.uiWardrobe .bottom .right{width:calc(100% * .6);position:relative;background-color:#2d2136}.uiWardrobe .bottom .right .heading{width:100%;height:30px;color:#ffeb38;padding-top:7px}.uiWardrobe .bottom .right .preview{padding-left:calc((100% - (8 * 16px))/ 2);position:relative;height:calc(100% - 80px)}.uiWardrobe .bottom .right .preview .sprite{width:8px;height:8px;position:absolute;left:calc((100% - (8 * 16px))/ 2);top:calc((100% - (8 * 16px))/ 2);transform:scale(16);transform-origin:0 0;image-rendering:optimizeSpeed;image-rendering:pixelated;image-rendering:crisp-edges}.uiWardrobe .bottom .right .buttons{width:100%;padding:0 10px;height:50px}.uiWardrobe .bottom .right .buttons .btn{float:left;width:calc((100% - 50px)/ 2);height:40px;padding-top:12px;color:#fff;cursor:pointer}.uiWardrobe .bottom .right .buttons .btn:first-child{margin-right:50px}.uiWardrobe .bottom .right .buttons .btnCancel{background-color:#d43346}.uiWardrobe .bottom .right .buttons .btnCancel:hover{background-color:#ff4252}.uiWardrobe .bottom .right .buttons .btnApply{background-color:#4ac441}.uiWardrobe .bottom .right .buttons .btnApply:hover{background-color:#80f643} |
@@ -1 +0,0 @@ | |||||
.uiWorkbench{display:none;width:827px;height:447px;border:5px solid #3c3f4c;color:#fcfcfc;position:relative;z-index:2}.uiWorkbench>.heading,.uiWorkbench>.itemPicker>.heading{color:#ff6942;width:100%;height:36px;background-color:#3c3f4c;text-align:center}.uiWorkbench>.heading .heading-text,.uiWorkbench>.itemPicker>.heading .heading-text{padding-top:8px;margin:auto}.uiWorkbench>.bottom{background-color:#373041;height:calc(100% - 36px);width:100%}.uiWorkbench>.bottom .heading{color:#3fa7dd;margin-bottom:10px;text-align:center}.uiWorkbench>.bottom .left,.uiWorkbench>.bottom .right{float:left;height:100%;padding:10px}.uiWorkbench>.bottom .left{width:300px}.uiWorkbench>.bottom .left .list{height:calc(100% - 25px);overflow-y:auto;display:flex;flex-direction:column}.uiWorkbench>.bottom .left .list .item{width:100%;padding:5px 10px;cursor:pointer;color:#c0c3cf}.uiWorkbench>.bottom .left .list .item.selected{background-color:#3c3f4c;color:#fcfcfc}.uiWorkbench>.bottom .left .list .item:hover{background-color:#3c3f4c}.uiWorkbench>.bottom .right{width:calc(100% - 300px);display:flex;flex-direction:column;justify-content:space-between}.uiWorkbench>.bottom .right>*{width:100%}.uiWorkbench>.bottom .right .info{height:calc(100% - 100px - 35px);flex:1}.uiWorkbench>.bottom .right .info .title{color:#3fa7dd;padding-bottom:10px;text-align:center}.uiWorkbench>.bottom .right .info .description{color:#c0c3cf;text-align:justify}.uiWorkbench>.bottom .right .materialList{visibility:hidden;margin-bottom:20px}.uiWorkbench>.bottom .right .materialList .material.need{color:#d43346}.uiWorkbench>.bottom .right .needItems{display:none;margin-bottom:20px;flex-direction:column}.uiWorkbench>.bottom .right .needItems .title{color:#3fa7dd;padding-bottom:10px;text-align:center}.uiWorkbench>.bottom .right .needItems .list{display:flex;justify-content:space-around}.uiWorkbench>.bottom .right .buttons{height:40px}.uiWorkbench>.bottom .right .buttons>.btn{height:35px;width:100px;color:#fcfcfc;text-align:center;padding-top:10px;background-color:#3c3f4c;cursor:pointer;float:left}.uiWorkbench>.bottom .right .buttons>.btn:last-child{float:right}.uiWorkbench>.bottom .right .buttons>.btn:hover{background-color:#505360}.uiWorkbench>.itemPicker{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#373041;flex-direction:column}.uiWorkbench>.itemPicker .list{display:flex;flex-wrap:wrap;overflow-y:auto}.mobile .uiWorkbench{z-index:2} |
@@ -11,52 +11,50 @@ define([ | |||||
init: function (blueprint) { | init: function (blueprint) { | ||||
events.emit('onGetItems', this.items); | events.emit('onGetItems', this.items); | ||||
}, | }, | ||||
extend: function (blueprint) { | |||||
let rerender = false; | |||||
if (blueprint.destroyItems) { | |||||
rerender = true; | |||||
events.emit('onDestroyItems', blueprint.destroyItems, this.items); | |||||
extend: function ({ destroyItems, getItems }) { | |||||
const { items } = this; | |||||
let rerenderNeeded = false; | |||||
if (destroyItems) { | |||||
rerenderNeeded = true; | |||||
events.emit('onDestroyItems', destroyItems, this.items); | |||||
} | } | ||||
if (blueprint.getItems) { | |||||
let items = this.items; | |||||
let newItems = blueprint.getItems || []; | |||||
let nLen = newItems.length; | |||||
for (let i = 0; i < nLen; i++) { | |||||
let nItem = newItems[i]; | |||||
let nId = nItem.id; | |||||
let findItem = items.find(f => f.id === nId); | |||||
if (findItem) { | |||||
if (!rerender) { | |||||
rerender = ( | |||||
(findItem.pos !== nItem.pos) || | |||||
(findItem.eq !== nItem.eq) || | |||||
(findItem.active !== nItem.active) || | |||||
(findItem.quickSlot !== nItem.quickSlot) || | |||||
(findItem.quantity !== nItem.quantity) | |||||
); | |||||
} | |||||
for (let p in findItem) | |||||
delete findItem[p]; | |||||
$.extend(true, findItem, nItem); | |||||
newItems.splice(i, 1); | |||||
i--; | |||||
nLen--; | |||||
} else { | |||||
rerender = true; | |||||
nItem.isNew = true; | |||||
if (getItems) { | |||||
getItems.forEach(g => { | |||||
const findItem = items.find(i => i.id === g.id); | |||||
if (!findItem) { | |||||
rerenderNeeded = true; | |||||
const clonedItem = $.extend({}, g); | |||||
clonedItem.isNew = true; | |||||
items.push(clonedItem); | |||||
return; | |||||
} | |||||
if (!rerenderNeeded) { | |||||
rerenderNeeded = ( | |||||
findItem.pos !== g.pos || | |||||
findItem.eq !== g.eq || | |||||
findItem.active !== g.active || | |||||
findItem.quickSlot !== g.quickSlot || | |||||
findItem.quantity !== g.quantity | |||||
); | |||||
} | } | ||||
} | |||||
this.items.push.apply(this.items, blueprint.getItems || []); | |||||
Object.getOwnPropertyNames(findItem).forEach(p => { | |||||
delete findItem[p]; | |||||
}); | |||||
$.extend(findItem, g); | |||||
}); | |||||
events.emit('onGetItems', this.items, rerender); | |||||
events.emit('onGetItems', this.items, rerenderNeeded, getItems); | |||||
} | } | ||||
}, | }, | ||||
@@ -1,9 +1,11 @@ | |||||
define([ | define([ | ||||
'js/system/events', | 'js/system/events', | ||||
'js/system/client' | |||||
'js/system/client', | |||||
'js/input' | |||||
], function ( | ], function ( | ||||
events, | events, | ||||
client | |||||
client, | |||||
input | |||||
) { | ) { | ||||
return { | return { | ||||
type: 'serverActions', | type: 'serverActions', | ||||
@@ -19,7 +21,10 @@ define([ | |||||
}, | }, | ||||
onKeyUp: function (key) { | onKeyUp: function (key) { | ||||
this.actions.forEach(function (a) { | |||||
if (!input.isKeyAllowed(key)) | |||||
return; | |||||
this.actions.forEach(a => { | |||||
if (a.key !== key) | if (a.key !== key) | ||||
return; | return; | ||||
@@ -28,7 +33,7 @@ define([ | |||||
method: 'performAction', | method: 'performAction', | ||||
data: a.action | data: a.action | ||||
}); | }); | ||||
}, this); | |||||
}); | |||||
}, | }, | ||||
extend: function (blueprint) { | extend: function (blueprint) { | ||||
@@ -57,7 +57,7 @@ module.exports = { | |||||
customChannels: [], | customChannels: [], | ||||
play: async function (data) { | play: async function (data) { | ||||
if (!this.username) | |||||
if (!this.username || this.charname) | |||||
return; | return; | ||||
let character = this.characters[data.data.name]; | let character = this.characters[data.data.name]; | ||||
@@ -268,6 +268,10 @@ module.exports = { | |||||
if (credentials.username === '' || credentials.password === '') { | if (credentials.username === '' || credentials.password === '') { | ||||
msg.callback(messages.login.allFields); | msg.callback(messages.login.allFields); | ||||
return; | |||||
} else if (credentials.username.length > 32) { | |||||
msg.callback(messages.login.maxUsernameLength); | |||||
return; | return; | ||||
} | } | ||||
@@ -126,7 +126,7 @@ module.exports = { | |||||
if ((!obj.mob) || (item.ability)) { | if ((!obj.mob) || (item.ability)) { | ||||
if (item.spell) | if (item.spell) | ||||
inventory.learnAbility({ itemId, slot: item.runeSlot }); | |||||
inventory.learnAbility({ itemId, slot: item.runeSlot, bypassEqCheck: true }); | |||||
else | else | ||||
obj.syncer.setArray(true, 'inventory', 'getItems', inventory.simplifyItem(item)); | obj.syncer.setArray(true, 'inventory', 'getItems', inventory.simplifyItem(item)); | ||||
} | } | ||||
@@ -145,7 +145,7 @@ module.exports = { | |||||
if (typeof(item) !== 'object' || !item.has('id')) | if (typeof(item) !== 'object' || !item.has('id')) | ||||
item = inventory.findItem(itemId); | item = inventory.findItem(itemId); | ||||
if (!item) | |||||
if (!item || !item.eq) | |||||
return; | return; | ||||
else if (!ignoreSpaceCheck && !inventory.hasSpace()) { | else if (!ignoreSpaceCheck && !inventory.hasSpace()) { | ||||
const message = 'You do not have room in your inventory to unequip that item'; | const message = 'You do not have room in your inventory to unequip that item'; | ||||
@@ -80,10 +80,10 @@ module.exports = { | |||||
} | } | ||||
if (this.gatheringTtl > 0) { | if (this.gatheringTtl > 0) { | ||||
if ((this.gatheringTtl === this.gatheringTtlMax) && (gathering.width)) { | |||||
['x', 'y', 'width', 'height'].forEach(function (p) { | |||||
if (this.gatheringTtl === this.gatheringTtlMax && gathering.width > 1) { | |||||
['x', 'y', 'width', 'height'].forEach(p => { | |||||
this.obj.syncer.set(false, 'gatherer', p, gathering[p]); | this.obj.syncer.set(false, 'gatherer', p, gathering[p]); | ||||
}, this); | |||||
}); | |||||
} | } | ||||
this.gatheringTtl--; | this.gatheringTtl--; | ||||
@@ -116,7 +116,7 @@ module.exports = { | |||||
this.obj.syncer.set(false, 'gatherer', 'progress', 100); | this.obj.syncer.set(false, 'gatherer', 'progress', 100); | ||||
if (isFish) { | if (isFish) { | ||||
let catchChance = 40 + this.obj.stats.values.catchChance; | |||||
const catchChance = gatherResult.blueprint.gatherChance + this.obj.stats.values.catchChance; | |||||
if (~~(Math.random() * 100) >= catchChance) { | if (~~(Math.random() * 100) >= catchChance) { | ||||
this.sendAnnouncement('The fish got away'); | this.sendAnnouncement('The fish got away'); | ||||
this.gathering = null; | this.gathering = null; | ||||
@@ -124,7 +124,7 @@ module.exports = { | |||||
return; | return; | ||||
} | } | ||||
gatherResult.items.forEach(function (g) { | |||||
gatherResult.items.forEach(g => { | |||||
if (g.slot) | if (g.slot) | ||||
return; | return; | ||||
@@ -150,7 +150,12 @@ module.exports = { | |||||
}; | }; | ||||
g.worth = ~~(weight * 10); | g.worth = ~~(weight * 10); | ||||
}, this); | |||||
}); | |||||
} else { | |||||
gatherResult.items.forEach(g => { | |||||
if (g.worth === undefined) | |||||
g.worth = 1; | |||||
}); | |||||
} | } | ||||
if (isFish) { | if (isFish) { | ||||
@@ -145,10 +145,12 @@ module.exports = { | |||||
} | } | ||||
}, | }, | ||||
learnAbility: function ({ itemId, slot }) { | |||||
//forceEq is set by the equipment component to force the ability to be learnt since the item is already EQd | |||||
// otherwise the first if check would fail | |||||
learnAbility: function ({ itemId, slot, bypassEqCheck = false }) { | |||||
let item = this.findItem(itemId); | let item = this.findItem(itemId); | ||||
let statValues = this.obj.stats.values; | let statValues = this.obj.stats.values; | ||||
if (!item) | |||||
if (!item || (item.eq && !bypassEqCheck)) | |||||
return; | return; | ||||
else if (!item.spell) { | else if (!item.spell) { | ||||
item.eq = false; | item.eq = false; | ||||
@@ -123,12 +123,12 @@ module.exports = (cpnInv, item, hideMessage, noStack, hideAlert, createBagIfFull | |||||
cpnInv.items.push(item); | cpnInv.items.push(item); | ||||
if (item.eq) { | if (item.eq) { | ||||
delete item.eq; | |||||
if (item.ability) | if (item.ability) | ||||
cpnInv.learnAbility({ itemId: item.id, slot: item.runeSlot }); | cpnInv.learnAbility({ itemId: item.id, slot: item.runeSlot }); | ||||
else { | |||||
delete item.eq; | |||||
else | |||||
obj.equipment.equip({ itemId: item.id }); | obj.equipment.equip({ itemId: item.id }); | ||||
} | |||||
} else if (item.has('quickSlot')) { | } else if (item.has('quickSlot')) { | ||||
obj.equipment.setQuickSlot({ | obj.equipment.setQuickSlot({ | ||||
itemId: item.id, | itemId: item.id, | ||||
@@ -126,7 +126,6 @@ module.exports = { | |||||
let distanceFromHome = Math.max(abs(this.originX - obj.x), abs(this.originY - obj.y)); | let distanceFromHome = Math.max(abs(this.originX - obj.x), abs(this.originY - obj.y)); | ||||
if (!distanceFromHome) { | if (!distanceFromHome) { | ||||
this.goHome = false; | this.goHome = false; | ||||
if (!obj.spellbook) { | if (!obj.spellbook) { | ||||
/* eslint-disable-next-line no-console */ | /* eslint-disable-next-line no-console */ | ||||
console.log('MOB HAS NO SPELLBOOK BUT WANTS TO RESET ROTATION'); | console.log('MOB HAS NO SPELLBOOK BUT WANTS TO RESET ROTATION'); | ||||
@@ -1,5 +1,4 @@ | |||||
let classes = require('../config/spirits'); | let classes = require('../config/spirits'); | ||||
let serverConfig = require('../config/serverConfig'); | |||||
const eventEmitter = require('../misc/events'); | const eventEmitter = require('../misc/events'); | ||||
module.exports = { | module.exports = { | ||||
@@ -31,12 +30,13 @@ module.exports = { | |||||
skinId: character.skinId, | skinId: character.skinId, | ||||
name: character.name, | name: character.name, | ||||
class: character.class, | class: character.class, | ||||
zoneName: character.zoneName || serverConfig.defaultZone, | |||||
x: character.x, | x: character.x, | ||||
y: character.y, | y: character.y, | ||||
hidden: character.dead || null, | hidden: character.dead || null, | ||||
account: character.account, | account: character.account, | ||||
instanceId: character.instanceId || null | |||||
zoneName: character.zoneName || clientConfig.config.defaultZone, | |||||
zoneId: character.zoneId || null, | |||||
zoneMapSeed: character.zoneMapSeed | |||||
}); | }); | ||||
character.components = character.components || []; | character.components = character.components || []; | ||||
@@ -125,7 +125,7 @@ module.exports = { | |||||
let self = { | let self = { | ||||
id: obj.id, | id: obj.id, | ||||
zone: obj.zone, | |||||
zoneId: obj.zoneId, | |||||
name: obj.name, | name: obj.name, | ||||
level: obj.level, | level: obj.level, | ||||
class: obj.class | class: obj.class | ||||
@@ -215,7 +215,7 @@ module.exports = { | |||||
}; | }; | ||||
obj.instance.eventEmitter.emit('onBeforePlayerRespawn', obj, spawnPos); | obj.instance.eventEmitter.emit('onBeforePlayerRespawn', obj, spawnPos); | ||||
if (!spawnPos.zone) { | |||||
if (!spawnPos.zoneName) { | |||||
obj.x = spawnPos.x; | obj.x = spawnPos.x; | ||||
obj.y = spawnPos.y; | obj.y = spawnPos.y; | ||||
@@ -251,7 +251,7 @@ module.exports = { | |||||
id: obj.serverId, | id: obj.serverId, | ||||
args: { | args: { | ||||
obj: simpleObj, | obj: simpleObj, | ||||
newZone: spawnPos.zone | |||||
newZone: spawnPos.zoneName | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -436,7 +436,9 @@ module.exports = { | |||||
obj.effects.die(); | obj.effects.die(); | ||||
if (this.obj.spellbook) | if (this.obj.spellbook) | ||||
this.obj.spellbook.die(); | this.obj.spellbook.die(); | ||||
obj.destroyed = true; | obj.destroyed = true; | ||||
obj.destructionEvent = 'death'; | |||||
let deathAnimation = _.getDeepProperty(animations, ['mobs', obj.sheetName, obj.cell, 'death']); | let deathAnimation = _.getDeepProperty(animations, ['mobs', obj.sheetName, obj.cell, 'death']); | ||||
if (deathAnimation) { | if (deathAnimation) { | ||||
@@ -275,7 +275,7 @@ module.exports = { | |||||
if (oldQuantity) | if (oldQuantity) | ||||
item.quantity = oldQuantity; | item.quantity = oldQuantity; | ||||
let worth = ~~(item.worth * targetTrade.markup.buy); | |||||
let worth = ~~((item.quantity ?? 1) * item.worth * targetTrade.markup.buy); | |||||
this.gold += worth; | this.gold += worth; | ||||
@@ -8,6 +8,7 @@ const config = { | |||||
logoPath: null, | logoPath: null, | ||||
loginBgGeneratorPath: null, | loginBgGeneratorPath: null, | ||||
resourceList: [], | resourceList: [], | ||||
defaultZone: 'fjolarok', | |||||
textureList: [ | textureList: [ | ||||
'tiles', | 'tiles', | ||||
'walls', | 'walls', | ||||
@@ -2,27 +2,23 @@ module.exports = { | |||||
hermit: { | hermit: { | ||||
1: { | 1: { | ||||
msg: [{ | msg: [{ | ||||
msg: 'What? Oh...what are you doing here?', | |||||
options: [1.1, 1.2, 1.3, 1.4, 1.5] | |||||
msg: 'Nice to see you again. How can I help?', | |||||
options: [1.1, 1.2, 1.3, 1.4] | |||||
}], | }], | ||||
options: { | options: { | ||||
1.1: { | 1.1: { | ||||
msg: 'Me? What are YOU doing in the middle of the wilderness?', | |||||
msg: 'What are you doing in the middle of the wilderness?', | |||||
goto: 2 | goto: 2 | ||||
}, | }, | ||||
1.2: { | 1.2: { | ||||
msg: 'My ship got wrecked, just south of here. I\'m stranded on this island.', | |||||
goto: 3 | |||||
}, | |||||
1.3: { | |||||
msg: 'Have you scavenged anything worth selling lately?', | msg: 'Have you scavenged anything worth selling lately?', | ||||
goto: 'tradeBuy' | goto: 'tradeBuy' | ||||
}, | }, | ||||
1.4: { | |||||
1.3: { | |||||
msg: 'I have some items you might be interested in.', | msg: 'I have some items you might be interested in.', | ||||
goto: 'tradeSell' | goto: 'tradeSell' | ||||
}, | }, | ||||
1.5: { | |||||
1.4: { | |||||
msg: 'I changed my mind, I want to buy something back.', | msg: 'I changed my mind, I want to buy something back.', | ||||
goto: 'tradeBuyback' | goto: 'tradeBuyback' | ||||
} | } | ||||
@@ -63,28 +59,6 @@ module.exports = { | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
3: { | |||||
msg: 'You mean you don\'t know where you are? Where are you from?', | |||||
options: { | |||||
3.1: { | |||||
msg: 'I don\'t know. The developer hasn\'t written me a backstory yet.', | |||||
goto: '3-1' | |||||
}, | |||||
3.2: { | |||||
msg: 'I\'d like to ask something else', | |||||
goto: 2 | |||||
} | |||||
} | |||||
}, | |||||
'3-1': { | |||||
msg: 'Typical...', | |||||
options: { | |||||
'3-1.1': { | |||||
msg: 'I\'d like to ask something else', | |||||
goto: 1 | |||||
} | |||||
} | |||||
}, | |||||
tradeBuy: { | tradeBuy: { | ||||
cpn: 'trade', | cpn: 'trade', | ||||
method: 'startBuy', | method: 'startBuy', | ||||
@@ -19,6 +19,6 @@ module.exports = { | |||||
name: 'Green Fingers', | name: 'Green Fingers', | ||||
type: 'gatherResource', | type: 'gatherResource', | ||||
subType: 'herb', | subType: 'herb', | ||||
quantity: [5, 10] | |||||
quantity: [2, 5] | |||||
}] | }] | ||||
}; | }; |
@@ -56,27 +56,7 @@ module.exports = { | |||||
}, | }, | ||||
'crazed seagull': { | 'crazed seagull': { | ||||
level: 1, | level: 1, | ||||
rare: { | |||||
count: 0 | |||||
}, | |||||
regular: { | |||||
drops: { | |||||
rolls: 1, | |||||
noRandom: true, | |||||
blueprints: [{ | |||||
chance: 100, | |||||
maxLevel: 2, | |||||
name: 'Family Heirloom', | |||||
quality: 1, | |||||
slot: 'neck', | |||||
type: 'Choker', | |||||
noSalvage: true, | |||||
stats: ['vit', 'regenMana'] | |||||
}] | |||||
} | |||||
} | |||||
attackable: false | |||||
}, | }, | ||||
seagull: { | seagull: { | ||||
level: 2, | level: 2, | ||||
@@ -87,7 +67,7 @@ module.exports = { | |||||
} | } | ||||
}, | }, | ||||
rare: { | rare: { | ||||
count: 0 | |||||
name: 'Crazed Seagull' | |||||
}, | }, | ||||
questItem: { | questItem: { | ||||
name: 'Gull Feather', | name: 'Gull Feather', | ||||
@@ -10,7 +10,7 @@ module.exports = { | |||||
}, | }, | ||||
obtain: function (obj, template) { | obtain: function (obj, template) { | ||||
let zoneName = template ? template.zoneName : obj.zoneName; | |||||
let zoneName = template?.zoneName ?? obj.zoneName; | |||||
let zone = mapList.mapList.find(m => m.name === zoneName); | let zone = mapList.mapList.find(m => m.name === zoneName); | ||||
//Zone doesn't exist any more. Probably been renamed | //Zone doesn't exist any more. Probably been renamed | ||||
@@ -33,13 +33,18 @@ module.exports = { | |||||
zoneTemplate = globalQuests; | zoneTemplate = globalQuests; | ||||
let config = extend({}, zoneTemplate); | let config = extend({}, zoneTemplate); | ||||
this.instance.eventEmitter.emit('onBeforeGetQuests', config); | |||||
this.instance.eventEmitter.emit('onBeforeGetQuests', { | |||||
obj, | |||||
config, | |||||
zoneName, | |||||
template | |||||
}); | |||||
if (config.infini.length === 0) | if (config.infini.length === 0) | ||||
return; | return; | ||||
//Only check min level of quests when physically in the zone they belong to | //Only check min level of quests when physically in the zone they belong to | ||||
if (obj.zoneName === zoneName) { | if (obj.zoneName === zoneName) { | ||||
const minPlayerLevel = ~~(obj.instance.map.zone.level[0] * 0.75); | |||||
const minPlayerLevel = ~~(obj.instance.zoneConfig.level[0] * 0.75); | |||||
if (obj.stats.values.level < minPlayerLevel) | if (obj.stats.values.level < minPlayerLevel) | ||||
return; | return; | ||||
@@ -8,9 +8,11 @@ module.exports = { | |||||
build: function () { | build: function () { | ||||
if (!this.need) { | if (!this.need) { | ||||
this.need = 2 + ~~(Math.random() * 3); | |||||
const { quantity, subType } = this; | |||||
this.gatherType = ['herb', 'fish'][~~(Math.random() * 2)]; | |||||
this.need = quantity[0] + ~~(Math.random() * (quantity[1] - quantity[0])); | |||||
this.gatherType = subType ?? ['herb', 'fish'][~~(Math.random() * 2)]; | |||||
if (this.gatherType === 'fish') { | if (this.gatherType === 'fish') { | ||||
this.name = 'Lure of the Sea'; | this.name = 'Lure of the Sea'; | ||||
@@ -10,7 +10,7 @@ module.exports = { | |||||
//If we're not in the correct zone, don't do this check, it'll just crash the server | //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 | // since the mob won't be available (most likely) in the zoneFile | ||||
if (this.obj.zoneName === this.zoneName) { | if (this.obj.zoneName === this.zoneName) { | ||||
let mobTypes = this.obj.instance.spawners.zone.mobs; | |||||
let mobTypes = this.obj.instance.zoneConfig.mobs; | |||||
if (this.mobName) { | if (this.mobName) { | ||||
let mobType = mobTypes[this.mobName.toLowerCase()]; | let mobType = mobTypes[this.mobName.toLowerCase()]; | ||||
//Maybe the zoneFile changed in the meantime. If so, regenerate | //Maybe the zoneFile changed in the meantime. If so, regenerate | ||||
@@ -18,7 +18,7 @@ module.exports = { | |||||
//If we're not in the correct zone, don't do this check, it'll just crash the server | //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 | // since the mob won't be available (most likely) in the zoneFile | ||||
if (this.obj.zoneName === this.zoneName) { | if (this.obj.zoneName === this.zoneName) { | ||||
let mobTypes = this.obj.instance.spawners.zone.mobs; | |||||
let mobTypes = this.obj.instance.zoneConfig.mobs; | |||||
if (this.mobType && this.item) { | if (this.mobType && this.item) { | ||||
//Check if the zoneFile changed | //Check if the zoneFile changed | ||||
@@ -6,7 +6,7 @@ module.exports = { | |||||
return false; | return false; | ||||
if (!this.xp) { | if (!this.xp) { | ||||
let level = this.obj.instance.spawners.zone.level; | |||||
let level = this.obj.instance.zoneConfig.level; | |||||
level = level[0]; | level = level[0]; | ||||
let xp = ~~(level * 22 * this.getXpMultiplier()); | let xp = ~~(level * 22 * this.getXpMultiplier()); | ||||
this.xp = xp; | this.xp = xp; | ||||
@@ -1,22 +1,19 @@ | |||||
/* eslint-disable no-process-env */ | |||||
module.exports = { | module.exports = { | ||||
version: '0.10.6', | |||||
version: '0.11.0', | |||||
port: 4000, | port: 4000, | ||||
startupMessage: 'Server: ready', | startupMessage: 'Server: ready', | ||||
defaultZone: 'fjolarok', | |||||
//Options: | |||||
nodeEnv: process.env.NODE_ENV, | |||||
//Options: | |||||
// sqlite | // sqlite | ||||
// rethink | // rethink | ||||
//eslint-disable-next-line no-process-env | |||||
db: process.env.IWD_DB || 'sqlite', | db: process.env.IWD_DB || 'sqlite', | ||||
//eslint-disable-next-line no-process-env | |||||
dbHost: process.env.IWD_DB_HOST || 'localhost', | dbHost: process.env.IWD_DB_HOST || 'localhost', | ||||
//eslint-disable-next-line no-process-env | |||||
dbPort: process.env.IWD_DB_PORT || 28015, | dbPort: process.env.IWD_DB_PORT || 28015, | ||||
//eslint-disable-next-line no-process-env | |||||
dbName: process.env.IWD_DB_NAME || 'live', | dbName: process.env.IWD_DB_NAME || 'live', | ||||
//eslint-disable-next-line no-process-env | |||||
dbUser: process.env.IWD_DB_USER || 'admin', | dbUser: process.env.IWD_DB_USER || 'admin', | ||||
//eslint-disable-next-line no-process-env | |||||
dbPass: process.env.IWD_DB_PASS || '' | dbPass: process.env.IWD_DB_PASS || '' | ||||
}; | }; |
@@ -17,8 +17,8 @@ module.exports = { | |||||
this.events.on('onAfterGetZone', this.onAfterGetZone.bind(this)); | this.events.on('onAfterGetZone', this.onAfterGetZone.bind(this)); | ||||
}, | }, | ||||
onAfterGetZone: function (zone, config) { | |||||
if (zone !== 'fjolgard') | |||||
onAfterGetZone: function (zoneName, config) { | |||||
if (zoneName !== 'fjolgard') | |||||
return; | return; | ||||
let newRunes = [{ | let newRunes = [{ | ||||
@@ -88,8 +88,6 @@ module.exports = { | |||||
getSimple: function (self, isSave, isTransfer) { | getSimple: function (self, isSave, isTransfer) { | ||||
let s = this.simplify(null, self, isSave, isTransfer); | let s = this.simplify(null, self, isSave, isTransfer); | ||||
if (this.instance) | |||||
s.zoneId = this.instance.zoneId; | |||||
if (self && !isSave && this.syncer) { | if (self && !isSave && this.syncer) { | ||||
this.syncer.oSelf.components | this.syncer.oSelf.components | ||||
@@ -1,6 +1,6 @@ | |||||
{ | { | ||||
"name": "isleward_server", | "name": "isleward_server", | ||||
"version": "0.10.6", | |||||
"version": "0.11.0", | |||||
"description": "isleward", | "description": "isleward", | ||||
"dependencies": { | "dependencies": { | ||||
"axios": "^0.22.0", | "axios": "^0.22.0", | ||||
@@ -9,6 +9,7 @@ | |||||
"express": "^4.17.1", | "express": "^4.17.1", | ||||
"express-minify": "^1.0.0", | "express-minify": "^1.0.0", | ||||
"image-size": "^1.0.0", | "image-size": "^1.0.0", | ||||
"less-middleware": "^3.1.0", | |||||
"rethinkdbdash": "^2.3.31", | "rethinkdbdash": "^2.3.31", | ||||
"socket.io": "^4.2.0", | "socket.io": "^4.2.0", | ||||
"universal-analytics": "^0.5.1" | "universal-analytics": "^0.5.1" | ||||
@@ -17,6 +18,7 @@ | |||||
"babel-eslint": "^10.1.0", | "babel-eslint": "^10.1.0", | ||||
"eslint": "^7.32.0", | "eslint": "^7.32.0", | ||||
"eslint-plugin-prettier": "^4.0.0", | "eslint-plugin-prettier": "^4.0.0", | ||||
"eslint-plugin-requirejs": "^4.0.1" | |||||
"eslint-plugin-requirejs": "^4.0.1", | |||||
"sqlite3": "^5.0.3" | |||||
} | } | ||||
} | } |
@@ -12,6 +12,9 @@ module.exports = { | |||||
playing: 0, | playing: 0, | ||||
onHandshake: function (socket) { | onHandshake: function (socket) { | ||||
if (this.players.some(f => f.socket.id === socket.id)) | |||||
return; | |||||
const p = objects.build(); | const p = objects.build(); | ||||
p.socket = socket; | p.socket = socket; | ||||
p.addComponent('auth'); | p.addComponent('auth'); | ||||
@@ -101,12 +104,13 @@ module.exports = { | |||||
}); | }); | ||||
//If we don't do this, the atlas will try to remove it from the thread | //If we don't do this, the atlas will try to remove it from the thread | ||||
player.zoneName = null; | |||||
player.name = null; | |||||
delete player.zoneName; | |||||
delete player.name; | |||||
//A hack to allow us to actually call methods again (like retrieve the player list) | //A hack to allow us to actually call methods again (like retrieve the player list) | ||||
player.dead = false; | player.dead = false; | ||||
player.permadead = false; | player.permadead = false; | ||||
delete player.auth.charname; | |||||
this.modifyPlayerCount(-1); | this.modifyPlayerCount(-1); | ||||
}, | }, | ||||
@@ -125,8 +129,8 @@ module.exports = { | |||||
continue; | continue; | ||||
if (p.auth.username === exclude.auth.username) { | if (p.auth.username === exclude.auth.username) { | ||||
if (p.name && p.zoneName) | |||||
await atlas.forceSavePlayer(p.name, p.zoneName); | |||||
if (p.name && p.zoneId) | |||||
await atlas.forceSavePlayer(p.name, p.zoneId); | |||||
p.socket.emit('dc', {}); | p.socket.emit('dc', {}); | ||||
} | } | ||||
@@ -147,7 +151,7 @@ module.exports = { | |||||
continue; | continue; | ||||
result.push({ | result.push({ | ||||
zone: p.zone, | |||||
zoneName: p.zoneName, | |||||
name: p.name, | name: p.name, | ||||
level: p.level, | level: p.level, | ||||
class: p.class, | class: p.class, | ||||
@@ -160,7 +164,7 @@ module.exports = { | |||||
forceSaveAll: function () { | forceSaveAll: function () { | ||||
this.players | this.players | ||||
.filter(p => p.zone) | |||||
.filter(p => p.zoneName !== undefined) | |||||
.forEach(p => { | .forEach(p => { | ||||
atlas.performAction(p, { | atlas.performAction(p, { | ||||
cpn: 'auth', | cpn: 'auth', | ||||
@@ -27,7 +27,7 @@ const route = function (socket, msg) { | |||||
if (msg.callback) | if (msg.callback) | ||||
msg.data.callbackId = atlas.registerCallback(msg.callback); | msg.data.callbackId = atlas.registerCallback(msg.callback); | ||||
atlas.send(source.zone, msg); | |||||
atlas.send(source.zoneId, msg); | |||||
return; | return; | ||||
} | } | ||||
@@ -45,7 +45,7 @@ module.exports = { | |||||
keysCorrect: function (obj, keys) { | keysCorrect: function (obj, keys) { | ||||
const foundIncorrect = keys.some(({ key, dataType, optional, spec }) => { | const foundIncorrect = keys.some(({ key, dataType, optional, spec }) => { | ||||
if (!obj.hasOwnProperty(key)) { | |||||
if (!Object.hasOwnProperty.call(obj, key)) { | |||||
if (optional) | if (optional) | ||||
return false; | return false; | ||||
@@ -127,7 +127,7 @@ module.exports = { | |||||
return keysCorrect; | return keysCorrect; | ||||
}, | }, | ||||
isMsgValid: function (msg) { | |||||
isMsgValid: function (msg, source) { | |||||
let signature; | let signature; | ||||
if (msg.module) { | if (msg.module) { | ||||
@@ -152,8 +152,12 @@ module.exports = { | |||||
const result = this.signatureCorrect(msg, signature); | const result = this.signatureCorrect(msg, signature); | ||||
if (!result || msg.cpn !== 'player' || msg.method !== 'performAction') | |||||
if (!result || msg.cpn !== 'player' || msg.method !== 'performAction') { | |||||
if (result && signature.allowWhenIngame === false && source.name !== undefined) | |||||
return false; | |||||
return result; | return result; | ||||
} | |||||
const signatureThreadMsg = signatures.threadCpnMethods[msg.data.cpn]?.[msg.data.method]; | const signatureThreadMsg = signatures.threadCpnMethods[msg.data.cpn]?.[msg.data.method]; | ||||
@@ -49,6 +49,7 @@ const routerConfig = { | |||||
auth: { | auth: { | ||||
login: { | login: { | ||||
callback: true, | callback: true, | ||||
allowWhenIngame: false, | |||||
data: [ | data: [ | ||||
{ | { | ||||
key: 'username', | key: 'username', | ||||
@@ -62,6 +63,7 @@ const routerConfig = { | |||||
}, | }, | ||||
register: { | register: { | ||||
callback: true, | callback: true, | ||||
allowWhenIngame: false, | |||||
data: [ | data: [ | ||||
{ | { | ||||
key: 'username', | key: 'username', | ||||
@@ -75,6 +77,7 @@ const routerConfig = { | |||||
}, | }, | ||||
deleteCharacter: { | deleteCharacter: { | ||||
callback: true, | callback: true, | ||||
allowWhenIngame: false, | |||||
data: [ | data: [ | ||||
{ | { | ||||
key: 'name', | key: 'name', | ||||
@@ -88,6 +91,7 @@ const routerConfig = { | |||||
}, | }, | ||||
createCharacter: { | createCharacter: { | ||||
callback: true, | callback: true, | ||||
allowWhenIngame: false, | |||||
data: [ | data: [ | ||||
{ | { | ||||
key: 'name', | key: 'name', | ||||
@@ -109,10 +113,12 @@ const routerConfig = { | |||||
}, | }, | ||||
getCharacterList: { | getCharacterList: { | ||||
callback: true, | callback: true, | ||||
allowWhenIngame: false, | |||||
data: [] | data: [] | ||||
}, | }, | ||||
getCharacter: { | getCharacter: { | ||||
callback: true, | callback: true, | ||||
allowWhenIngame: false, | |||||
data: [ | data: [ | ||||
{ | { | ||||
key: 'name', | key: 'name', | ||||
@@ -122,6 +128,7 @@ const routerConfig = { | |||||
}, | }, | ||||
play: { | play: { | ||||
callback: true, | callback: true, | ||||
allowWhenIngame: false, | |||||
data: [ | data: [ | ||||
{ | { | ||||
key: 'name', | key: 'name', | ||||
@@ -277,6 +284,7 @@ const routerConfig = { | |||||
dataType: 'integerOrString' | dataType: 'integerOrString' | ||||
}, | }, | ||||
{ | { | ||||
optional: true, | |||||
key: 'state', | key: 'state', | ||||
dataType: 'numberOrString' | dataType: 'numberOrString' | ||||
} | } | ||||
@@ -6,14 +6,18 @@ const socketIo = require('socket.io'); | |||||
const express = require('express'); | const express = require('express'); | ||||
const compression = require('compression'); | const compression = require('compression'); | ||||
const minify = require('express-minify'); | const minify = require('express-minify'); | ||||
const lessMiddleware = require('less-middleware'); | |||||
const rest = require('../security/rest'); | const rest = require('../security/rest'); | ||||
const { | const { | ||||
port = 4000, | port = 4000, | ||||
startupMessage = 'Server: Ready' | |||||
startupMessage = 'Server: Ready', | |||||
nodeEnv | |||||
} = require('../config/serverConfig'); | } = require('../config/serverConfig'); | ||||
const compileLessOnce = nodeEnv === 'production'; | |||||
const onConnection = require('./onConnection'); | const onConnection = require('./onConnection'); | ||||
const { appRoot, appFile } = require('./requestHandlers'); | const { appRoot, appFile } = require('./requestHandlers'); | ||||
@@ -33,8 +37,8 @@ const init = async () => { | |||||
app.use((req, res, next) => { | app.use((req, res, next) => { | ||||
if ( | if ( | ||||
!rest.willHandle(req.url) && | |||||
req.url.indexOf('/server') !== 0 && | |||||
!rest.willHandle(req.url) && | |||||
req.url.indexOf('/server') !== 0 && | |||||
req.url.indexOf('/mods') !== 0 | req.url.indexOf('/mods') !== 0 | ||||
) | ) | ||||
req.url = '/client/' + req.url; | req.url = '/client/' + req.url; | ||||
@@ -42,6 +46,11 @@ const init = async () => { | |||||
next(); | next(); | ||||
}); | }); | ||||
app.use(lessMiddleware('../', { | |||||
once: compileLessOnce, | |||||
force: !compileLessOnce | |||||
})); | |||||
rest.init(app); | rest.init(app); | ||||
app.get('/', appRoot); | app.get('/', appRoot); | ||||
@@ -16,7 +16,9 @@ const onRequest = (socket, msg, callback) => { | |||||
if (!msg.data) | if (!msg.data) | ||||
msg.data = {}; | msg.data = {}; | ||||
if (!router.isMsgValid(msg)) | |||||
const source = cons.players.find(p => p.socket.id === socket.id); | |||||
if (!router.isMsgValid(msg, source)) | |||||
return; | return; | ||||
if (msg.cpn) | if (msg.cpn) | ||||
@@ -24,8 +26,6 @@ const onRequest = (socket, msg, callback) => { | |||||
else if (msg.threadModule) | else if (msg.threadModule) | ||||
cons.route(socket, msg); | cons.route(socket, msg); | ||||
else { | else { | ||||
const source = cons.players.find(p => p.socket.id === socket.id); | |||||
msg.socket = socket; | msg.socket = socket; | ||||
if (source) | if (source) | ||||
@@ -2,7 +2,6 @@ let childProcess = require('child_process'); | |||||
let objects = require('../objects/objects'); | let objects = require('../objects/objects'); | ||||
let mapList = require('../config/maps/mapList'); | let mapList = require('../config/maps/mapList'); | ||||
let connections = require('../security/connections'); | let connections = require('../security/connections'); | ||||
let serverConfig = require('../config/serverConfig'); | |||||
let events = require('../misc/events'); | let events = require('../misc/events'); | ||||
const listenersOnZoneIdle = []; | const listenersOnZoneIdle = []; | ||||
@@ -17,79 +16,120 @@ module.exports = { | |||||
this.getMapFiles(); | this.getMapFiles(); | ||||
}, | }, | ||||
addObject: function (obj, keepPos, transfer) { | |||||
addObject: async function (obj, keepPos, transfer) { | |||||
const serverObj = objects.objects.find(o => o.id === obj.id); | |||||
if (!serverObj) | |||||
return; | |||||
events.emit('onBeforePlayerEnterWorld', obj); | events.emit('onBeforePlayerEnterWorld', obj); | ||||
let thread = this.getThreadFromName(obj.zoneName); | |||||
let thread; | |||||
let map = mapList.mapList.find(m => m.name === obj.zoneName); | |||||
if (!map) | |||||
map = mapList.mapList.find(m => m.name === clientConfig.config.defaultZone); | |||||
let instanceId = obj.instanceId; | |||||
if ((!thread) || (obj.zoneName !== thread.name)) | |||||
instanceId = -1; | |||||
thread = this.threads.find(t => t.id === obj.zoneId && t.name === obj.zoneName); | |||||
if (!thread) { | if (!thread) { | ||||
thread = this.getThreadFromName(serverConfig.defaultZone); | |||||
obj.zoneName = thread.name; | |||||
if (map.instanced) { | |||||
delete obj.x; | |||||
delete obj.y; | |||||
thread = this.spawnMap(map); | |||||
await new Promise(res => setTimeout(res, 2000)); | |||||
} else | |||||
thread = this.getThreadFromName(map.name); | |||||
} | } | ||||
obj.zone = thread.id; | |||||
this.send(obj.zone, { | |||||
obj.zoneName = thread.name; | |||||
obj.zoneId = thread.id; | |||||
serverObj.zoneId = thread.id; | |||||
serverObj.zoneName = thread.name; | |||||
const simpleObj = obj.getSimple ? obj.getSimple(true, true) : obj; | |||||
this.send(obj.zoneId, { | |||||
method: 'addObject', | method: 'addObject', | ||||
args: { | args: { | ||||
keepPos: keepPos, | keepPos: keepPos, | ||||
obj: obj.getSimple ? obj.getSimple(true, true) : obj, | |||||
instanceId: instanceId, | |||||
obj: simpleObj, | |||||
transfer: transfer | transfer: transfer | ||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
removeObjectFromInstancedZone: async function (thread, obj, callback) { | |||||
await new Promise(res => { | |||||
const cb = this.registerCallback(res); | |||||
thread.worker.send({ | |||||
method: 'forceSavePlayer', | |||||
args: { | |||||
playerName: obj.name, | |||||
callbackId: cb | |||||
} | |||||
}); | |||||
}); | |||||
thread.worker.kill(); | |||||
this.threads.spliceWhere(t => t === thread); | |||||
if (callback) | |||||
callback(); | |||||
}, | |||||
removeObject: function (obj, skipLocal, callback) { | removeObject: function (obj, skipLocal, callback) { | ||||
if (!skipLocal) | if (!skipLocal) | ||||
objects.removeObject(obj); | objects.removeObject(obj); | ||||
let thread = this.getThreadFromName(obj.zoneName); | |||||
if (!thread) | |||||
let thread = this.findObjectThread(obj); | |||||
if (!thread) | |||||
return; | |||||
if (thread.instanced) { | |||||
this.removeObjectFromInstancedZone(thread, obj, callback); | |||||
return; | return; | ||||
} | |||||
let callbackId = null; | let callbackId = null; | ||||
if (callback) | if (callback) | ||||
callbackId = this.registerCallback(callback); | callbackId = this.registerCallback(callback); | ||||
obj.zone = thread.id; | |||||
this.send(obj.zone, { | |||||
this.send(obj.zoneId, { | |||||
method: 'removeObject', | method: 'removeObject', | ||||
args: { | args: { | ||||
obj: obj.getSimple(true), | obj: obj.getSimple(true), | ||||
instanceId: obj.instanceId, | |||||
callbackId: callbackId | callbackId: callbackId | ||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
updateObject: function (obj, msgObj) { | updateObject: function (obj, msgObj) { | ||||
this.send(obj.zone, { | |||||
this.send(obj.zoneId, { | |||||
method: 'updateObject', | method: 'updateObject', | ||||
args: { | args: { | ||||
id: obj.id, | id: obj.id, | ||||
instanceId: obj.instanceId, | |||||
obj: msgObj | obj: msgObj | ||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
queueAction: function (obj, action) { | queueAction: function (obj, action) { | ||||
this.send(obj.zone, { | |||||
this.send(obj.zoneId, { | |||||
method: 'queueAction', | method: 'queueAction', | ||||
args: { | args: { | ||||
id: obj.id, | id: obj.id, | ||||
instanceId: obj.instanceId, | |||||
action: action | action: action | ||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
performAction: function (obj, action) { | performAction: function (obj, action) { | ||||
this.send(obj.zone, { | |||||
this.send(obj.zoneId, { | |||||
method: 'performAction', | method: 'performAction', | ||||
args: { | args: { | ||||
id: obj.id, | id: obj.id, | ||||
instanceId: obj.instanceId, | |||||
action: action | action: action | ||||
} | } | ||||
}); | }); | ||||
@@ -111,29 +151,34 @@ module.exports = { | |||||
callback.callback(msg.msg.result); | callback.callback(msg.msg.result); | ||||
}, | }, | ||||
send: function (zone, msg) { | |||||
let thread = this.getThreadFromId(zone); | |||||
send: function (threadId, msg) { | |||||
const thread = this.threads.find(t => t.id === threadId); | |||||
if (thread) | if (thread) | ||||
thread.worker.send(msg); | thread.worker.send(msg); | ||||
}, | }, | ||||
getThreadFromId: function (id) { | |||||
return this.threads.find(t => t.id === id); | |||||
findObjectThread: function ({ zoneId }) { | |||||
return this.threads.find(t => t.id === zoneId); | |||||
}, | }, | ||||
getThreadFromName: function (name) { | getThreadFromName: function (name) { | ||||
return this.threads.find(t => t.name === name); | return this.threads.find(t => t.name === name); | ||||
}, | }, | ||||
getMapFiles: function () { | getMapFiles: function () { | ||||
mapList.mapList.filter(m => !m.disabled).forEach(m => this.spawnMap(m)); | |||||
mapList.mapList | |||||
.filter(m => !m.disabled && !m.instanced) | |||||
.forEach(m => this.spawnMap(m)); | |||||
}, | }, | ||||
spawnMap: function (map) { | |||||
const worker = childProcess.fork('./world/worker', [map.name]); | |||||
spawnMap: function ({ name, path, instanced }) { | |||||
const worker = childProcess.fork('./world/worker', [name]); | |||||
const id = instanced ? _.getGuid() : name; | |||||
const thread = { | const thread = { | ||||
id: this.nextId++, | |||||
name: map.name, | |||||
path: map.path, | |||||
id, | |||||
name, | |||||
instanced, | |||||
path, | |||||
worker | worker | ||||
}; | }; | ||||
@@ -143,6 +188,8 @@ module.exports = { | |||||
}); | }); | ||||
this.threads.push(thread); | this.threads.push(thread); | ||||
return thread; | |||||
}, | }, | ||||
onMessage: function (thread, message) { | onMessage: function (thread, message) { | ||||
if (message.module) { | if (message.module) { | ||||
@@ -172,9 +219,9 @@ module.exports = { | |||||
thread.worker.send({ | thread.worker.send({ | ||||
method: 'init', | method: 'init', | ||||
args: { | args: { | ||||
name: thread.name, | |||||
path: thread.path, | |||||
zoneId: thread.id | |||||
zoneName: thread.name, | |||||
zoneId: thread.id, | |||||
path: thread.path | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
@@ -214,31 +261,33 @@ module.exports = { | |||||
}); | }); | ||||
}, | }, | ||||
rezone: function (thread, message) { | |||||
rezone: async function (thread, message) { | |||||
const { args: { obj, newZone, keepPos = true } } = message; | const { args: { obj, newZone, keepPos = true } } = message; | ||||
//When messages are sent from map threads, they have an id (id of the object in the map thread) | |||||
// as well as a serverId (id of the object in the main thread) | |||||
const serverId = obj.serverId; | |||||
obj.id = serverId; | |||||
obj.destroyed = false; | obj.destroyed = false; | ||||
obj.zoneName = newZone; | |||||
obj.id = obj.serverId; | |||||
let serverObj = objects.objects.find(o => o.id === obj.id); | |||||
serverObj.zoneName = obj.zoneName; | |||||
let newThread = this.getThreadFromName(obj.zoneName); | |||||
const serverObj = objects.objects.find(o => o.id === obj.id); | |||||
const mapExists = mapList.mapList.some(m => m.name === newZone); | |||||
if (!newThread) { | |||||
newThread = this.getThreadFromName(serverConfig.defaultZone); | |||||
obj.zoneName = newThread.name; | |||||
serverObj.zoneName = newThread.name; | |||||
if (mapExists) { | |||||
serverObj.zoneName = newZone; | |||||
obj.zoneName = newZone; | |||||
} else { | |||||
obj.zoneName = clientConfig.config.defaultZone; | |||||
serverObj.zoneName = clientConfig.config.defaultZone; | |||||
} | } | ||||
serverObj.zone = newThread.id; | |||||
obj.zone = newThread.id; | |||||
delete serverObj.zoneId; | |||||
delete obj.zoneId; | |||||
serverObj.player.broadcastSelf(); | serverObj.player.broadcastSelf(); | ||||
const isRezone = true; | const isRezone = true; | ||||
this.addObject(obj, keepPos, isRezone); | |||||
await this.addObject(obj, keepPos, isRezone); | |||||
}, | }, | ||||
onZoneIdle: function (thread) { | onZoneIdle: function (thread) { | ||||
@@ -270,8 +319,8 @@ module.exports = { | |||||
}); | }); | ||||
}, | }, | ||||
forceSavePlayer: async function (playerName, zoneName) { | |||||
const thread = this.getThreadFromName(zoneName); | |||||
forceSavePlayer: async function (playerName, zoneId) { | |||||
const thread = this.threads.find(t => t.id === zoneId); | |||||
if (!thread) | if (!thread) | ||||
return; | return; | ||||
@@ -7,7 +7,7 @@ module.exports = { | |||||
load: function (instance, objToAdd, callback) { | load: function (instance, objToAdd, callback) { | ||||
this.instance = instance; | this.instance = instance; | ||||
this.ent = instance.zone.name + '-' + objToAdd.components.find(c => c.type === 'auth').username; | |||||
this.ent = instance.mapName + '-' + objToAdd.components.find(c => c.type === 'auth').username; | |||||
io.get({ | io.get({ | ||||
ent: this.ent, | ent: this.ent, | ||||
@@ -27,7 +27,10 @@ module.exports = { | |||||
lastTime: 0, | lastTime: 0, | ||||
init: function (args) { | init: function (args) { | ||||
this.zoneId = args.zoneId; | |||||
const { zoneId, zoneName } = args; | |||||
this.zoneName = zoneName; | |||||
this.zoneId = zoneId; | |||||
spellCallbacks.init(); | spellCallbacks.init(); | ||||
herbs.init(); | herbs.init(); | ||||
@@ -37,15 +40,16 @@ module.exports = { | |||||
objects, | objects, | ||||
syncer, | syncer, | ||||
physics, | physics, | ||||
zoneId: this.zoneId, | |||||
zoneId, | |||||
zoneName, | |||||
spawners, | spawners, | ||||
questBuilder, | questBuilder, | ||||
events, | events, | ||||
zone: map.zone, | |||||
map, | map, | ||||
scheduler, | scheduler, | ||||
eventEmitter, | eventEmitter, | ||||
resourceSpawner | |||||
resourceSpawner, | |||||
zoneConfig: map.zoneConfig | |||||
}; | }; | ||||
this.instances.push(fakeInstance); | this.instances.push(fakeInstance); | ||||
@@ -208,12 +212,15 @@ module.exports = { | |||||
if (msg.keepPos && (!physics.isValid(obj.x, obj.y) || !map.canPathFromPos(obj))) | if (msg.keepPos && (!physics.isValid(obj.x, obj.y) || !map.canPathFromPos(obj))) | ||||
msg.keepPos = false; | msg.keepPos = false; | ||||
if (!msg.keepPos || !obj.has('x') || (map.mapFile.properties.isRandom && obj.instanceId !== map.seed)) { | |||||
if (!msg.keepPos || !obj.has('x') || (map.mapFile.properties.isRandom && obj.zoneMapSeed !== map.seed)) { | |||||
obj.x = spawnPos.x; | obj.x = spawnPos.x; | ||||
obj.y = spawnPos.y; | obj.y = spawnPos.y; | ||||
} | } | ||||
obj.instanceId = map.seed || null; | |||||
if (map.seed) | |||||
obj.zoneMapSeed = map.seed; | |||||
else | |||||
delete obj.zoneMapSeed; | |||||
obj.spawn = map.spawn; | obj.spawn = map.spawn; | ||||
@@ -68,18 +68,18 @@ module.exports = { | |||||
hiddenWalls: null, | hiddenWalls: null, | ||||
hiddenTiles: null, | hiddenTiles: null, | ||||
zone: null, | |||||
zoneConfig: null, | |||||
init: function (args) { | |||||
this.name = args.name; | |||||
this.path = args.path; | |||||
init: function ({ zoneName, path }) { | |||||
this.name = zoneName; | |||||
this.path = path; | |||||
try { | try { | ||||
this.zone = require('../' + this.path + '/' + this.name + '/zone'); | |||||
this.zoneConfig = require('../' + this.path + '/' + this.name + '/zone'); | |||||
} catch (e) { | } catch (e) { | ||||
this.zone = globalZone; | |||||
this.zoneConfig = globalZone; | |||||
} | } | ||||
events.emit('onAfterGetZone', this.name, this.zone); | |||||
events.emit('onAfterGetZone', this.name, this.zoneConfig); | |||||
let chats = null; | let chats = null; | ||||
try { | try { | ||||
@@ -87,10 +87,10 @@ module.exports = { | |||||
} catch (e) {} | } catch (e) {} | ||||
if (chats) { | if (chats) { | ||||
if (this.zone.chats) | |||||
extend(this.zone.chats, chats); | |||||
if (this.zoneConfig.chats) | |||||
extend(this.zoneConfig.chats, chats); | |||||
else | else | ||||
this.zone.chats = chats; | |||||
this.zoneConfig.chats = chats; | |||||
} | } | ||||
let dialogues = null; | let dialogues = null; | ||||
@@ -99,11 +99,11 @@ module.exports = { | |||||
} catch (e) {} | } catch (e) {} | ||||
events.emit('onBeforeGetDialogue', this.name, dialogues); | events.emit('onBeforeGetDialogue', this.name, dialogues); | ||||
if (dialogues) | if (dialogues) | ||||
this.zone.dialogues = dialogues; | |||||
this.zoneConfig.dialogues = dialogues; | |||||
this.zone = extend({}, globalZone, this.zone); | |||||
this.zoneConfig = extend({}, globalZone, this.zoneConfig); | |||||
let resources = this.zone.resources || {}; | |||||
let resources = this.zoneConfig.resources || {}; | |||||
for (let r in resources) | for (let r in resources) | ||||
resourceSpawner.register(r, resources[r]); | resourceSpawner.register(r, resources[r]); | ||||
@@ -456,11 +456,11 @@ module.exports = { | |||||
if (objZoneName !== name) | if (objZoneName !== name) | ||||
blueprint.objZoneName = objZoneName; | blueprint.objZoneName = objZoneName; | ||||
if (this.zone) { | |||||
if ((this.zone.objects) && (this.zone.objects[objZoneName.toLowerCase()])) | |||||
extend(blueprint, this.zone.objects[objZoneName.toLowerCase()]); | |||||
else if ((this.zone.objects) && (this.zone.mobs[objZoneName.toLowerCase()])) | |||||
extend(blueprint, this.zone.mobs[objZoneName.toLowerCase()]); | |||||
if (this.zoneConfig) { | |||||
if ((this.zoneConfig.objects) && (this.zoneConfig.objects[objZoneName.toLowerCase()])) | |||||
extend(blueprint, this.zoneConfig.objects[objZoneName.toLowerCase()]); | |||||
else if ((this.zoneConfig.objects) && (this.zoneConfig.mobs[objZoneName.toLowerCase()])) | |||||
extend(blueprint, this.zoneConfig.mobs[objZoneName.toLowerCase()]); | |||||
} | } | ||||
if (blueprint.blocking) | if (blueprint.blocking) | ||||
@@ -76,15 +76,15 @@ module.exports = { | |||||
mob.inventory.inventorySize = -1; | mob.inventory.inventorySize = -1; | ||||
mob.inventory.dailyDrops = blueprint.dailyDrops; | mob.inventory.dailyDrops = blueprint.dailyDrops; | ||||
if (this.zone) { | |||||
let chats = this.zone.chats; | |||||
if (this.zoneConfig) { | |||||
let chats = this.zoneConfig.chats; | |||||
if (chats && chats[mob.name.toLowerCase()]) { | if (chats && chats[mob.name.toLowerCase()]) { | ||||
mob.addComponent('chatter', { | mob.addComponent('chatter', { | ||||
chats: chats[mob.name.toLowerCase()] | chats: chats[mob.name.toLowerCase()] | ||||
}); | }); | ||||
} | } | ||||
let dialogues = this.zone.dialogues; | |||||
let dialogues = this.zoneConfig.dialogues; | |||||
if (dialogues && dialogues[mob.name.toLowerCase()]) { | if (dialogues && dialogues[mob.name.toLowerCase()]) { | ||||
mob.addComponent('dialogue', { | mob.addComponent('dialogue', { | ||||
config: dialogues[mob.name.toLowerCase()] | config: dialogues[mob.name.toLowerCase()] | ||||
@@ -1,6 +1,7 @@ | |||||
const spawners = require('../spawners'); | |||||
const spawnObjects = (scope, instance, room) => { | const spawnObjects = (scope, instance, room) => { | ||||
let template = room.template; | let template = room.template; | ||||
let spawners = instance.spawners; | |||||
let spawnCd = instance.map.mapFile.properties.spawnCd; | let spawnCd = instance.map.mapFile.properties.spawnCd; | ||||
template.objects.forEach(o => { | template.objects.forEach(o => { | ||||
@@ -1,11 +1,16 @@ | |||||
let herbs = require('../config/herbs'); | let herbs = require('../config/herbs'); | ||||
const defaultGatherChance = { | |||||
herb: 100, | |||||
fish: 40 | |||||
}; | |||||
module.exports = { | module.exports = { | ||||
nodes: [], | nodes: [], | ||||
objects: null, | objects: null, | ||||
syncer: null, | syncer: null, | ||||
zone: null, | |||||
zoneConfig: null, | |||||
physics: null, | physics: null, | ||||
map: null, | map: null, | ||||
@@ -17,12 +22,12 @@ module.exports = { | |||||
syncer: instance.syncer, | syncer: instance.syncer, | ||||
physics: instance.physics, | physics: instance.physics, | ||||
map: instance.map, | map: instance.map, | ||||
zone: instance.zone | |||||
zoneConfig: instance.zoneConfig | |||||
}); | }); | ||||
}, | }, | ||||
register: function (name, blueprint) { | register: function (name, blueprint) { | ||||
let exists = this.nodes.find(n => (n.blueprint.name === name)); | |||||
const exists = this.nodes.find(n => (n.blueprint.name === name)); | |||||
if (exists) { | if (exists) { | ||||
if (!exists.blueprint.positions) { | if (!exists.blueprint.positions) { | ||||
exists.blueprint.positions = [{ | exists.blueprint.positions = [{ | ||||
@@ -47,21 +52,23 @@ module.exports = { | |||||
name: name | name: name | ||||
}); | }); | ||||
let max = blueprint.max; | |||||
const max = blueprint.max; | |||||
delete blueprint.max; | delete blueprint.max; | ||||
let chance = blueprint.chance; | |||||
const chance = blueprint.chance; | |||||
delete blueprint.chance; | delete blueprint.chance; | ||||
let cdMax = blueprint.cdMax; | |||||
const cdMax = blueprint.cdMax; | |||||
delete blueprint.cdMax; | delete blueprint.cdMax; | ||||
blueprint.gatherChance = blueprint.gatherChance ?? defaultGatherChance[blueprint.type]; | |||||
this.nodes.push({ | this.nodes.push({ | ||||
cd: 0, | cd: 0, | ||||
max: max, | |||||
chance: chance, | |||||
cdMax: cdMax, | |||||
blueprint: blueprint, | |||||
max, | |||||
chance, | |||||
cdMax, | |||||
blueprint, | |||||
spawns: [] | spawns: [] | ||||
}); | }); | ||||
}, | }, | ||||
@@ -76,7 +83,7 @@ module.exports = { | |||||
let position = null; | let position = null; | ||||
if (blueprint.type === 'herb') { | |||||
if (blueprint.type === 'herb' && !blueprint.positions) { | |||||
x = ~~(Math.random() * w); | x = ~~(Math.random() * w); | ||||
y = ~~(Math.random() * h); | y = ~~(Math.random() * h); | ||||
@@ -124,7 +131,7 @@ module.exports = { | |||||
if (blueprint.quantity) | if (blueprint.quantity) | ||||
quantity = blueprint.quantity[0] + ~~(Math.random() * (blueprint.quantity[1] - blueprint.quantity[0])); | quantity = blueprint.quantity[0] + ~~(Math.random() * (blueprint.quantity[1] - blueprint.quantity[0])); | ||||
let zoneLevel = this.zone.level; | |||||
let zoneLevel = this.zoneConfig.level; | |||||
zoneLevel = ~~(zoneLevel[0] + ((zoneLevel[1] - zoneLevel[0]) / 2)); | zoneLevel = ~~(zoneLevel[0] + ((zoneLevel[1] - zoneLevel[0]) / 2)); | ||||
let objBlueprint = extend({}, blueprint, position); | let objBlueprint = extend({}, blueprint, position); | ||||
@@ -35,7 +35,7 @@ const doRezone = stagedRezone => { | |||||
const clientAck = msg => { | const clientAck = msg => { | ||||
const staged = stagedRezones.find(s => s.simplifiedObj.serverId === msg.sourceId); | const staged = stagedRezones.find(s => s.simplifiedObj.serverId === msg.sourceId); | ||||
if (!staged) | |||||
if (!staged) | |||||
return; | return; | ||||
stagedRezones.spliceWhere(s => s === staged); | stagedRezones.spliceWhere(s => s === staged); | ||||
@@ -9,9 +9,9 @@ module.exports = { | |||||
init: function (msg) { | init: function (msg) { | ||||
this.objects = msg.objects; | this.objects = msg.objects; | ||||
this.syncer = msg.syncer; | this.syncer = msg.syncer; | ||||
this.zone = msg.zone; | |||||
this.zoneConfig = msg.zoneConfig; | |||||
this.mobBuilder = extend({ | this.mobBuilder = extend({ | ||||
zone: this.zone | |||||
zoneConfig: this.zoneConfig | |||||
}, mobBuilder); | }, mobBuilder); | ||||
}, | }, | ||||
@@ -40,7 +40,7 @@ module.exports = { | |||||
else | else | ||||
this.mobTypes[name]++; | this.mobTypes[name]++; | ||||
spawner.zonePrint = extend({}, this.zone.mobs.default, this.zone.mobs[name] || {}); | |||||
spawner.zonePrint = extend({}, this.zoneConfig.mobs.default, this.zoneConfig.mobs[name] || {}); | |||||
}, | }, | ||||
spawn: function (spawner) { | spawn: function (spawner) { | ||||
@@ -162,7 +162,7 @@ module.exports = { | |||||
if (l.blueprint.layerName === 'mobs') | if (l.blueprint.layerName === 'mobs') | ||||
this.setupMob(mob, l.zonePrint); | this.setupMob(mob, l.zonePrint); | ||||
else { | else { | ||||
const blueprint = extend({}, this.zone.objects.default, this.zone.objects[name] || {}); | |||||
const blueprint = extend({}, this.zoneConfig.objects.default, this.zoneConfig.objects[name] || {}); | |||||
this.setupObj(mob, blueprint); | this.setupObj(mob, blueprint); | ||||
} | } | ||||
@@ -194,7 +194,7 @@ module.exports = { | |||||
this.setupObj(mob, blueprint); | this.setupObj(mob, blueprint); | ||||
this.mobBuilder.build(mob, blueprint, type, this.zone.name); | |||||
this.mobBuilder.build(mob, blueprint, type, this.zoneConfig.name); | |||||
}, | }, | ||||
setupObj: function (obj, blueprint) { | setupObj: function (obj, blueprint) { | ||||