Ver código fonte

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

tags/v0.12.0
Shaun 1 ano atrás
pai
commit
aa7e70e367
1 arquivos alterados com 3 adições e 0 exclusões
  1. +3
    -0
      src/server/components/inventory.js

+ 3
- 0
src/server/components/inventory.js Ver arquivo

@@ -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) {


Carregando…
Cancelar
Salvar