Browse Source

Merge branch 'master' into '1915-instancing'

# Conflicts:
#   src/server/components/mob.js
tags/v0.11.0
Big Bad Waffle 2 years ago
parent
commit
c0146a1154
4 changed files with 8 additions and 3 deletions
  1. +1
    -1
      src/server/components/auth.js
  2. +1
    -1
      src/server/components/inventory.js
  3. +2
    -1
      src/server/components/mob.js
  4. +4
    -0
      src/server/security/connections.js

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

@@ -57,7 +57,7 @@ module.exports = {
customChannels: [],

play: async function (data) {
if (!this.username)
if (!this.username || this.charname)
return;

let character = this.characters[data.data.name];


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

@@ -148,7 +148,7 @@ module.exports = {
learnAbility: function ({ itemId, slot }) {
let item = this.findItem(itemId);
let statValues = this.obj.stats.values;
if (!item)
if (!item || item.eq)
return;
else if (!item.spell) {
item.eq = false;


+ 2
- 1
src/server/components/mob.js View File

@@ -130,8 +130,9 @@ module.exports = {
/* eslint-disable-next-line no-console */
console.log('MOB HAS NO SPELLBOOK BUT WANTS TO RESET ROTATION');
/* eslint-disable-next-line no-console */
console.log(obj.name, obj.zoneName, obj.x, obj.y);
console.log(obj.name, obj.zone, obj.zoneName, obj.x, obj.y, obj.components.map(c => c.type).join(','));
}

obj.spellbook.resetRotation();
}
}


+ 4
- 0
src/server/security/connections.js View File

@@ -12,6 +12,9 @@ module.exports = {
playing: 0,

onHandshake: function (socket) {
if (this.players.some(f => f.socket.id === socket.id))
return;

const p = objects.build();
p.socket = socket;
p.addComponent('auth');
@@ -107,6 +110,7 @@ module.exports = {
//A hack to allow us to actually call methods again (like retrieve the player list)
player.dead = false;
player.permadead = false;
delete player.auth.charname;

this.modifyPlayerCount(-1);
},


Loading…
Cancel
Save