From a4333ad9c05f27c59e5e962559e6fdbdf978b3fa Mon Sep 17 00:00:00 2001 From: Vehn Date: Sat, 26 Jan 2019 14:23:33 -0600 Subject: [PATCH 1/3] Fix: Items with a previously-saved inventory (eg, containers) will now properly hydrate. --- src/Inventory.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Inventory.js b/src/Inventory.js index 18c89257..c5fd9248 100644 --- a/src/Inventory.js +++ b/src/Inventory.js @@ -101,6 +101,7 @@ class Inventory extends Map { let newItem = state.ItemFactory.create(area, def.entityReference); newItem.uuid = uuid; newItem.belongsTo = belongsTo; + newItem.initializeInventory(def.inventory); newItem.hydrate(state, def); this.set(uuid, newItem); state.ItemManager.add(newItem); From 09bc9adff124c4844d60b146e3037cc1d3b06121 Mon Sep 17 00:00:00 2001 From: Vehn Date: Wed, 30 Jan 2019 01:44:35 -0600 Subject: [PATCH 2/3] Fix: Multiple instantaneously-queued spells/skills now show correct lag. --- src/CommandQueue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CommandQueue.js b/src/CommandQueue.js index 1ece9c42..63655690 100644 --- a/src/CommandQueue.js +++ b/src/CommandQueue.js @@ -80,7 +80,7 @@ class CommandQueue { const command = this.commands[i]; lagTotal += command.lag; if (i === commandIndex) { - return Math.max(0, this.lastRun + lagTotal - Date.now()) / 1000; + return Math.max((lagTotal - command.lag), this.lastRun + lagTotal - Date.now()) / 1000; } } } From 32c7ca01fe5c77fef1e81534a2aac54221210ff6 Mon Sep 17 00:00:00 2001 From: Vehn Date: Sun, 17 Feb 2019 12:31:29 -0600 Subject: [PATCH 3/3] Fix: can now force character independence regardless of current following status. --- src/Character.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Character.js b/src/Character.js index 8b63883c..9dfd5933 100644 --- a/src/Character.js +++ b/src/Character.js @@ -500,13 +500,15 @@ class Character extends Metadatable(EventEmitter) { * @fires Character#unfollowed */ unfollow() { - this.following.removeFollower(this); - /** - * @event Character#unfollowed - * @param {Character} following - */ - this.emit('unfollowed', this.following); - this.following = null; + if (this.following) { + this.following.removeFollower(this); + /** + * @event Character#unfollowed + * @param {Character} following + */ + this.emit('unfollowed', this.following); + this.following = null; + } } /**