Browse Source

Fixes #124

tags/v0.1.3^2
Big Bad Waffle 7 years ago
parent
commit
aa77d3b78f
8 changed files with 202 additions and 23 deletions
  1. +3
    -0
      src/server/components/inventory.js
  2. +7
    -0
      src/server/components/notice.js
  3. +1
    -1
      src/server/components/player.js
  4. +0
    -1
      src/server/config/maps/mapList.js
  5. +160
    -9
      src/server/config/maps/tutorial/map.json
  6. +24
    -0
      src/server/config/maps/tutorial/zone.js
  7. +2
    -2
      src/server/world/atlas.js
  8. +5
    -10
      src/server/world/instancer.js

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

@@ -565,6 +565,9 @@ define([
var blueprints = blueprint.blueprints;
for (var i = 0; i < blueprints.length; i++) {
var drop = blueprints[i];
if ((drop.maxLevel) && (drop.maxLevel < killSource.stats.values.level))
continue;

drop.level = drop.level || level;
drop.magicFind = magicFind;



+ 7
- 0
src/server/components/notice.js View File

@@ -11,10 +11,13 @@ define([

syncer: null,

maxLevel: 0,

init: function(blueprint) {
this.msg = blueprint.msg;
this.actions = blueprint.actions || {};
this.announce = blueprint.announce;
this.maxLevel = blueprint.maxLevel || 0;

this.syncer = this.obj.instance.syncer;
},
@@ -43,6 +46,8 @@ define([
collisionEnter: function(obj) {
if (!obj.player)
return;
else if ((this.maxLevel) && (obj.stats.values.level > this.maxLevel))
return;

this.callAction(obj, 'enter');

@@ -67,6 +72,8 @@ define([
collisionExit: function(obj) {
if (!obj.player)
return;
else if ((this.maxLevel) && (obj.stats.values.level > this.maxLevel))
return;

this.callAction(obj, 'exit');



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

@@ -32,7 +32,7 @@ define([
previewSpritesheet: character.previewSpritesheet,
name: character.name,
class: character.class,
zoneName: character.zoneName || 'tutorial-cove',
zoneName: character.zoneName || 'tutorial',
x: character.x,
y: character.y,
account: character.account,


+ 0
- 1
src/server/config/maps/mapList.js View File

@@ -4,7 +4,6 @@ define([

) {
return [
'tutorial-cove',
'tutorial',
'estuary',
'city',


+ 160
- 9
src/server/config/maps/tutorial/map.json View File

@@ -140,8 +140,8 @@
"type":"",
"visible":true,
"width":8,
"x":688,
"y":712
"x":672,
"y":672
},
{
"gid":229,
@@ -556,8 +556,8 @@
"type":"",
"visible":true,
"width":8,
"x":648,
"y":536
"x":592,
"y":544
},
{
"gid":229,
@@ -732,8 +732,8 @@
"type":"",
"visible":true,
"width":8,
"x":656,
"y":632
"x":672,
"y":504
},
{
"gid":233,
@@ -766,6 +766,38 @@
"width":8,
"x":400,
"y":320
},
{
"gid":229,
"height":8,
"id":626,
"name":"Seagull",
"properties":
{

},
"rotation":0,
"type":"",
"visible":true,
"width":8,
"x":616,
"y":688
},
{
"gid":229,
"height":8,
"id":635,
"name":"Crazed Seagull",
"properties":
{

},
"rotation":0,
"type":"",
"visible":true,
"width":8,
"x":616,
"y":808
}],
"opacity":1,
"properties":
@@ -1001,6 +1033,126 @@
"width":24,
"x":632,
"y":400
},
{
"height":112,
"id":627,
"name":"",
"properties":
{
"cpnNotice":"{\"maxLevel\": 1, \"msg\": \"You open your eyes and cough. Saltwater burns your throat. You remember the storm, and the crash that left your ship in pieces.<br \/><br \/>You realize you need to find shelter. Use <font class='color-green'>wasd<\/font> or the <ont class='color-green'>arrow keys<\/font> to move.\"}"
},
"rotation":0,
"type":"",
"visible":true,
"width":120,
"x":384,
"y":824
},
{
"height":32,
"id":628,
"name":"",
"properties":
{
"cpnNotice":"{\"maxLevel\": 1, \"msg\": \"You take a few steps, still weak from the ordeal. Through the glare of the sun, you see a creature to the north-east.<br \/><br \/>Press <font class='color-green'>v<\/font> to toggle nameplates.\"}"
},
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":520,
"y":824
},
{
"height":80,
"id":629,
"name":"",
"properties":
{
"cpnNotice":"{\"maxLevel\": 1, \"msg\": \"You take a few steps, still weak from the ordeal. Through the glare of the sun, you see a creature to the north-east.<br \/><br \/>Press <font class='color-green'>v<\/font> to toggle nameplates.\"}"
},
"rotation":0,
"type":"",
"visible":true,
"width":136,
"x":504,
"y":856
},
{
"height":40,
"id":630,
"name":"",
"properties":
{
"cpnNotice":"{\"maxLevel\": 2, \"msg\": \"The seagull's eyes are bloodshot and in its beak you see a glinting locket. It stole your family heirloom!<br \/><br \/>Click on it to target it then press <font class='color-green'>1<\/font> to toggle auto-attack. Remember to stand close if you are a warrior or thief.\"}"
},
"rotation":0,
"type":"",
"visible":true,
"width":8,
"x":568,
"y":800
},
{
"height":8,
"id":631,
"name":"",
"properties":
{
"cpnNotice":"{\"maxLevel\": 1, \"msg\": \"You take a few steps, still weak from the ordeal. Through the glare of the sun, you see a creature to the north-east.<br \/><br \/>Press <font class='color-green'>v<\/font> to toggle nameplates.\"}"
},
"rotation":0,
"type":"",
"visible":true,
"width":8,
"x":568,
"y":848
},
{
"height":40,
"id":632,
"name":"",
"properties":
{
"cpnNotice":"{\"maxLevel\": 1, \"msg\": \"You can loot items by standing on them then open your inventory with <font class='color-green'>i<\/font>.<br \/><br \/>To equip an item, simply click on the item in your inventory.\"}"
},
"rotation":0,
"type":"",
"visible":true,
"width":144,
"x":568,
"y":760
},
{
"height":32,
"id":633,
"name":"",
"properties":
{
"cpnNotice":"{\"maxLevel\": 1, \"msg\": \"You can loot items by standing on them then open your inventory with <font class='color-green'>i<\/font>.<br \/><br \/>To equip an item, simply click on the item in your inventory.\"}"
},
"rotation":0,
"type":"",
"visible":true,
"width":144,
"x":592,
"y":728
},
{
"height":56,
"id":634,
"name":"",
"properties":
{
"cpnNotice":"{\"maxLevel\": 2, \"msg\": \"The seagull's eyes are bloodshot and in its beak you see a glinting locket. It stole your family heirloom!<br \/><br \/>Click on it to target it then press <font class='color-green'>1<\/font> to toggle auto-attack. Remember to stand close if you are a warrior or thief.\"}"
},
"rotation":0,
"type":"",
"visible":true,
"width":112,
"x":576,
"y":800
}],
"opacity":1,
"type":"objectgroup",
@@ -1261,14 +1413,13 @@
"x":0,
"y":0
}],
"nextobjectid":617,
"nextobjectid":636,
"orientation":"orthogonal",
"properties":
{
"instanced":"0",
"name":"Test Zone",
"padding":"{\"tiles\":[[6,10],[7,5]]}",
"spawn":"{\"x\":72,\"y\":86}"
"spawn":"{\"x\":60,\"y\":116}"
},
"renderorder":"right-down",
"tileheight":8,


+ 24
- 0
src/server/config/maps/tutorial/zone.js View File

@@ -96,6 +96,30 @@ module.exports = {
}
}
},
'crazed seagull': {
level: 1,

rare: {
count: 0
},

regular: {
drops: {
chance: 100,
rolls: 1,
noRandom: true,
blueprints: [{
maxLevel: 1,
name: 'Family Heirloom',
quality: 2,
slot: 'neck',
type: 'Pendant',
noSalvage: true,
stats: ['hpMax', 'regenHp', 'regenMana']
}]
}
}
},
seagull: {
level: 2,
regular: {


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

@@ -27,7 +27,7 @@ define([
instanceId = -1;

if (!thread) {
thread = this.getThreadFromName('tutorial-cove');
thread = this.getThreadFromName('tutorial');
obj.zoneName = thread.name;
}

@@ -172,7 +172,7 @@ define([
var thread = this.getThreadFromName(obj.zoneName);

if (!thread) {
thread = this.getThreadFromName('tutorial-cove');
thread = this.getThreadFromName('tutorial');
obj.zoneName = thread.name;
serverObj.zoneName = thread.name;
}


+ 5
- 10
src/server/world/instancer.js View File

@@ -140,13 +140,11 @@ define([
objects.addObject(obj, this.onAddObject.bind(this));
else {
var o = objects.transferObject(obj);
if (o.zoneName != 'tutorial-cove')
questBuilder.obtain(o);
questBuilder.obtain(o);
}
},
onAddObject: function(obj) {
if (obj.zoneName != 'tutorial-cove')
questBuilder.obtain(obj);
questBuilder.obtain(obj);
},
updateObject: function(msg) {
var obj = objects.find(o => o.serverId == msg.id);
@@ -360,9 +358,7 @@ define([
}

obj.instance.spawners.scale(obj.stats.values.level);

if (obj.zoneName != 'tutorial-cove')
obj.instance.questBuilder.obtain(obj);
obj.instance.questBuilder.obtain(obj);
},
updateObject: function(msg) {
var id = msg.id;
@@ -502,9 +498,8 @@ define([
obj = instance.objects.transferObject(objToAdd);
obj.x = instance.map.spawn.x;
obj.y = instance.map.spawn.y;
if (obj.zoneName != 'tutorial-cove')
instance.questBuilder.obtain(obj);

instance.questBuilder.obtain(obj);
obj.instance.spawners.scale(obj.stats.values.level);
}



Loading…
Cancel
Save