From d5e6e79a386c14b333bda76af89d56666bb3b1b4 Mon Sep 17 00:00:00 2001 From: Timothy Schepens Date: Thu, 1 Jun 2017 07:20:25 +0200 Subject: [PATCH] slice off backpack items if char has no backpack --- lib/mule.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/mule.js b/lib/mule.js index 8cf7685..f5f3906 100644 --- a/lib/mule.js +++ b/lib/mule.js @@ -435,7 +435,11 @@ Mule.prototype.parse = function(data) { // items var eq = (c.Equipment || '').split(','); - this.items.chars.push(eq); + if (+c.HasBackpack) { + this.items.chars.push(eq); + } else { + this.items.chars.push(eq.slice(0, 12)); + } var dobp = this.opt('backpack') && +c.HasBackpack if (this.opt('equipment') || this.opt('inv') || dobp) { f = true;