GetChargeInfoForItem
ESO Lua API function — used by 36 of the 3,030 addons we indexed (combined 5,328,362 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.
Official signature
GetChargeInfoForItem([Bag|#Bag] bagId, integer slotIndex)Returns: integer charges, integer maxCharges
Real usage — from Auto Recharge (and repair)
if slotIndex == nil or (slotIndex ~= nil and slotIndex == slot) then
charge, maxcharge = GetChargeInfoForItem(BAG_WORN,slot)
if maxcharge > 0 thenShort excerpt from the shipping addon Auto Recharge (and repair) — its ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.
Most-downloaded addons using it
| Addon | Total downloads |
|---|---|
| Auto Recharge (and repair) | 1,014,626 |
| AlphaGear 2 (Builds, Gear, Skills, Banking) | 848,683 |
| WPamA (What Pledges at my Alts) | 735,283 |
| Dressing Room for Stonethorn | 527,263 |
| PersonalAssistant (Banking, Consume, Junk, Loot, Repair, Worker) [Masteroshi430's branch] | 487,232 |
| Wizard's Wardrobe | 481,038 |