Browse Source

bug: Fixed being unable to zone in when DC'ing while dead, fixed a crash with effectStunned being applied to obj's without spellbooks

tags/v0.10.6^2
Shaun 2 years ago
parent
commit
1192d169cf
3 changed files with 10 additions and 3 deletions
  1. +3
    -0
      src/server/components/auth.js
  2. +2
    -1
      src/server/config/effects/effectStunned.js
  3. +5
    -2
      src/server/security/connections.js

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

@@ -93,6 +93,9 @@ module.exports = {

doSave: async function (callback, saveStash = true) {
const simple = this.obj.getSimple(true, true);
delete simple.destroyed;
delete simple.forceDestroy;

simple.components.spliceWhere(f => (f.type === 'stash'));

await io.setAsync({


+ 2
- 1
src/server/config/effects/effectStunned.js View File

@@ -2,7 +2,8 @@ module.exports = {
type: 'stunned',

init: function () {
this.obj.spellbook.stopCasting();
if (this.obj.spellbook)
this.obj.spellbook.stopCasting();
},

events: {


+ 5
- 2
src/server/security/connections.js View File

@@ -77,8 +77,11 @@ module.exports = {
(['getCharacterList', 'getCharacter', 'deleteCharacter'].indexOf(msg.method) === -1)
) ||
(
(player.dead) &&
(msg.data.method !== 'respawn')
player.dead &&
!(
(msg.method === 'performAction' && ['respawn', 'notifyServerUiReady'].includes(msg.data.method)) ||
(msg.method === 'clientAck')
)
)
)
return;


Loading…
Cancel
Save