View Single Post
02/27/23, 04:14 AM   #22
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 247
Originally Posted by Baertram View Post
You should maybe check, before charging, if the slot you want to charge is actually "slotted".
Lua Code:
  1. if HasItemInSlot(BAG_WORN, slotId) then

And doing the recharge in the GetGems function does not make sense, but it's your code and addon.
I'd rename that to TryRecharge instead as it will recharg in the end, and not get the soulgem info ;-)

And as these kind of addons often heppn to get you disconnected due to death
https://www.esoui.com/forums/showthread.php?t=10464
I'd check if the player is dead more than once here before calling the charge API function!
Once before your GetGems func is called and once before ChargeItemWithSoulGem is executed then maybe, until this ZOs bug is fixed.
Ya death was a bit of a concern but i left it at once because im only running it on using charges so it will only fire once i think without a repeating loop during death. if thats still a risk of disconnect ill add more checks.

re: the actually slotted weap comment... i believe I am with the isitemchargeable which is in live version. It was commented out for testing purposes. I assume an empty slot isnt chargeable?
  Reply With Quote