Infinitay / essence-pouch-tracker

A RuneLite plugin that tracks both the amount of essence stored in your essence pouches and the amount of essence until decay.
https://runelite.net/plugin-hub/show/essence-pouch-tracking
BSD 2-Clause "Simplified" License
0 stars 1 forks source link

Invalid stored count when a pouch degrades #1

Closed Infinitay closed 1 month ago

Infinitay commented 1 month ago

image

When quickly depositing essence into a pouch that is just about to degrade and another pouch, it will miscount the essence. First thoughts are I am not re-incrementing the remaining essence after faking the new add essence event to the degraded pouch.

Reproducible: Items: Large pouch, Giant pouch, 18 essence

  1. Fill the giant pouch with essence until ~12 left until decay
  2. Try to fill the giant pouch followed by the large pouch tick-perfect

At this point, the count should show 9 and 6 respectively for the Giant and Large pouches when it should be 9 and 9.

Logs ``` [Client] DEBUG e.EssencePouchTrackingPlugin - onMenuOptionClicked: 1171 [Client] DEBUG e.EssencePouchTrackingPlugin - MenuOptionClicked(getParam0=4, getParam1=9764864, getMenuOption=Fill, getMenuTarget=Giant pouch, getMenuAction=CC_OP, getId=2) [Client] DEBUG e.EssencePouchTrackingPlugin - New Pouch Action Received: FILL Giant pouch [Client] DEBUG e.EssencePouchTrackingPlugin - [Inventory Data] Before | Essence in inventory: 18, Free slots: 3, Used slots: 25 [Client] DEBUG essencepouchtracking.EssencePouch - Given 18 essence, storing 12/12 essence into the Giant pouch. You can store approximately 0 more essence until decay. [Client] DEBUG e.EssencePouchTrackingPlugin - Added 12 essence to the pouch for a total of 12/12 [Client] DEBUG e.EssencePouchTrackingPlugin - [Inventory Data] After | Essence in inventory: 6, Free slots: 15, Used slots: 13 [Client] DEBUG n.r.client.config.ConfigManager - Setting configuration value for essencepouchtracking.rsprofile.vVHzmlVb.trackingState to {"smallPouch":{"pouchType":"SMALL","storedEssence":0,"remainingEssenceBeforeDecay":2147483647,"isDegraded":false,"shouldDegrade":false,"unknownStored":false,"unknownDecay":false},"mediumPouch":{"pouchType":"MEDIUM","storedEssence":0,"remainingEssenceBeforeDecay":270,"isDegraded":false,"shouldDegrade":true,"unknownStored":false,"unknownDecay":false},"largePouch":{"pouchType":"LARGE","storedEssence":0,"remainingEssenceBeforeDecay":261,"isDegraded":false,"shouldDegrade":true,"unknownStored":false,"unknownDecay":false},"giantPouch":{"pouchType":"GIANT","storedEssence":12,"remainingEssenceBeforeDecay":0,"isDegraded":false,"shouldDegrade":true,"unknownStored":false,"unknownDecay":false},"colossalPouch":{"pouchType":"COLOSSAL","storedEssence":0,"remainingEssenceBeforeDecay":320,"isDegraded":false,"shouldDegrade":true,"unknownStored":true,"unknownDecay":true}} [Client] DEBUG e.EssencePouchTrackingPlugin - Saved the tracking state [Client] DEBUG e.EssencePouchTrackingPlugin - onMenuOptionClicked: 1171 [Client] DEBUG e.EssencePouchTrackingPlugin - MenuOptionClicked(getParam0=5, getParam1=9764864, getMenuOption=Fill, getMenuTarget=Large pouch, getMenuAction=CC_OP, getId=2) [Client] DEBUG e.EssencePouchTrackingPlugin - New Pouch Action Received: FILL Large pouch [Client] DEBUG e.EssencePouchTrackingPlugin - [Inventory Data] Before | Essence in inventory: 6, Free slots: 15, Used slots: 13 [Client] DEBUG essencepouchtracking.EssencePouch - Given 6 essence, storing 6/9 essence into the Large pouch. You can store approximately 255 more essence until decay. [Client] DEBUG e.EssencePouchTrackingPlugin - Added 6 essence to the pouch for a total of 6/9 [Client] DEBUG e.EssencePouchTrackingPlugin - [Inventory Data] After | Essence in inventory: 0, Free slots: 21, Used slots: 7 [Client] DEBUG n.r.client.config.ConfigManager - Setting configuration value for essencepouchtracking.rsprofile.vVHzmlVb.trackingState to {"smallPouch":{"pouchType":"SMALL","storedEssence":0,"remainingEssenceBeforeDecay":2147483647,"isDegraded":false,"shouldDegrade":false,"unknownStored":false,"unknownDecay":false},"mediumPouch":{"pouchType":"MEDIUM","storedEssence":0,"remainingEssenceBeforeDecay":270,"isDegraded":false,"shouldDegrade":true,"unknownStored":false,"unknownDecay":false},"largePouch":{"pouchType":"LARGE","storedEssence":6,"remainingEssenceBeforeDecay":255,"isDegraded":false,"shouldDegrade":true,"unknownStored":false,"unknownDecay":false},"giantPouch":{"pouchType":"GIANT","storedEssence":12,"remainingEssenceBeforeDecay":0,"isDegraded":false,"shouldDegrade":true,"unknownStored":false,"unknownDecay":false},"colossalPouch":{"pouchType":"COLOSSAL","storedEssence":0,"remainingEssenceBeforeDecay":320,"isDegraded":false,"shouldDegrade":true,"unknownStored":true,"unknownDecay":true}} [Client] DEBUG e.EssencePouchTrackingPlugin - Saved the tracking state [Client] DEBUG e.EssencePouchTrackingPlugin - [Inventory Data] Blocked updating the inventory [Client] DEBUG e.EssencePouchTrackingPlugin - Added Items: [5515] [Client] DEBUG e.EssencePouchTrackingPlugin - Removed Items: [7936 x 18, 5514] [Client] DEBUG essencepouchtracking.EssencePouch - Created new Essence Pouch: EssencePouch(pouchType=GIANT, storedEssence=0, remainingEssenceBeforeDecay=132, isDegraded=false, shouldDegrade=true, unknownStored=true, unknownDecay=true) [Client] DEBUG e.EssencePouchTrackingPlugin - Giant pouch has degraded [Client] DEBUG e.EssencePouchTrackingPlugin - New Pouch Action Received: EMPTY Giant pouch [Client] DEBUG e.EssencePouchTrackingPlugin - [Inventory Data] Before | Essence in inventory: 0, Free slots: 21, Used slots: 7 [Client] DEBUG essencepouchtracking.EssencePouch - Removing 12 essence, storing 0/12 essence into the Giant pouch. Previously stored 12/12 essence. [Client] DEBUG e.EssencePouchTrackingPlugin - Removed 12 essence from the pouch for a total of 0/9 [Client] DEBUG e.EssencePouchTrackingPlugin - [Inventory Data] After | Essence in inventory: 12, Free slots: 9, Used slots: 19 [Client] DEBUG n.r.client.config.ConfigManager - Setting configuration value for essencepouchtracking.rsprofile.vVHzmlVb.trackingState to {"smallPouch":{"pouchType":"SMALL","storedEssence":0,"remainingEssenceBeforeDecay":2147483647,"isDegraded":false,"shouldDegrade":false,"unknownStored":false,"unknownDecay":false},"mediumPouch":{"pouchType":"MEDIUM","storedEssence":0,"remainingEssenceBeforeDecay":270,"isDegraded":false,"shouldDegrade":true,"unknownStored":false,"unknownDecay":false},"largePouch":{"pouchType":"LARGE","storedEssence":6,"remainingEssenceBeforeDecay":255,"isDegraded":false,"shouldDegrade":true,"unknownStored":false,"unknownDecay":false},"giantPouch":{"pouchType":"GIANT","storedEssence":0,"remainingEssenceBeforeDecay":0,"isDegraded":true,"shouldDegrade":true,"unknownStored":false,"unknownDecay":false},"colossalPouch":{"pouchType":"COLOSSAL","storedEssence":0,"remainingEssenceBeforeDecay":320,"isDegraded":false,"shouldDegrade":true,"unknownStored":true,"unknownDecay":true}} [Client] DEBUG e.EssencePouchTrackingPlugin - Saved the tracking state [Client] DEBUG e.EssencePouchTrackingPlugin - New Pouch Action Received: FILL Giant pouch [Client] DEBUG e.EssencePouchTrackingPlugin - [Inventory Data] Before | Essence in inventory: 12, Free slots: 9, Used slots: 19 [Client] DEBUG essencepouchtracking.EssencePouch - Given 12 essence, storing 9/12 essence into the Giant pouch. You can store approximately -9 more essence until decay. [Client] DEBUG e.EssencePouchTrackingPlugin - Added 9 essence to the pouch for a total of 9/9 [Client] DEBUG e.EssencePouchTrackingPlugin - [Inventory Data] After | Essence in inventory: 3, Free slots: 18, Used slots: 10 [Client] DEBUG n.r.client.config.ConfigManager - Setting configuration value for essencepouchtracking.rsprofile.vVHzmlVb.trackingState to {"smallPouch":{"pouchType":"SMALL","storedEssence":0,"remainingEssenceBeforeDecay":2147483647,"isDegraded":false,"shouldDegrade":false,"unknownStored":false,"unknownDecay":false},"mediumPouch":{"pouchType":"MEDIUM","storedEssence":0,"remainingEssenceBeforeDecay":270,"isDegraded":false,"shouldDegrade":true,"unknownStored":false,"unknownDecay":false},"largePouch":{"pouchType":"LARGE","storedEssence":6,"remainingEssenceBeforeDecay":255,"isDegraded":false,"shouldDegrade":true,"unknownStored":false,"unknownDecay":false},"giantPouch":{"pouchType":"GIANT","storedEssence":9,"remainingEssenceBeforeDecay":-9,"isDegraded":true,"shouldDegrade":true,"unknownStored":false,"unknownDecay":false},"colossalPouch":{"pouchType":"COLOSSAL","storedEssence":0,"remainingEssenceBeforeDecay":320,"isDegraded":false,"shouldDegrade":true,"unknownStored":true,"unknownDecay":true}} [Client] DEBUG e.EssencePouchTrackingPlugin - Saved the tracking state ```
Infinitay commented 1 month ago

9edb6f3 Is working for me. I've had one issue at the very first attempt or two where I

  1. Fill small pouch
  2. Fill giant pouch
  3. Fill large pouch
  4. Fill medium pouch

They all had correct stored amounts except for the medium pouch and it was listed as one. However, this could have been due to not emptying prior, I was seeing things, or it was just a rare instance.

I've been testing this for about 10 minutes now and am failing to recreate the issue above and all the counts have been accurate.