Browse Source

bug: fixed a crash when an object without effects cpn dies

tags/v0.8.2.1^2
Shaun 3 years ago
parent
commit
f7b8e3f0ac
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/server/components/stats.js

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

@@ -429,7 +429,8 @@ module.exports = {

obj.player.die(killSource, deathEvent.permadeath);
} else {
obj.effects.die();
if (obj.effects)
obj.effects.die();
if (this.obj.spellbook)
this.obj.spellbook.die();
obj.destroyed = true;


Loading…
Cancel
Save