Browse Source

fix: item effects that can't be found will now simply be removed withou crashing the server

tags/v0.12.0
Shaun 1 year ago
parent
commit
aa7e70e367
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/server/components/inventory.js

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

@@ -407,9 +407,12 @@ module.exports = {
e.text = effectModule.events.onGetText(item, e);
} catch (error) {
_.log(`Effect not found: ${e.type}`);
_.log(error);
}
}
});

item.effects.spliceWhere(e => !e.events);
}

if (!item.has('pos') && !item.eq) {


Loading…
Cancel
Save