# Charge Count

Grammar — Charge remainingMax count of item inItem
FlagsNative | Function

Returns the current/max charges for the item.

# Arguments

Returns — fixed

native fixed ItemGetChargeCount(
	unit inItem,
	bool remainingMax,
);

Category: Item / Basic

# Examples

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicSystem.galaxy:469

        if (lv_item == null) { break; }
        lv_slot = UnitInventorySlot(lv_item);
        lv_itItemStack = ItemGetChargeCount(lv_item, false);
        lv_container = UnitInventoryContainer(lv_item);
        UnitInventoryCreate(lv_target, UnitGetType(lv_item));

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicSystem.galaxy:1404

        if (lv_itItem == null) { break; }
        if ((UnitGetType(lv_itItem) == lv_itemType)) {
            ItemSetChargeCount(lv_itItem, (ItemGetChargeCount(lv_itItem, false)-1));
            if ((ItemGetChargeCount(lv_itItem, false) <= 0.0)) {
                UnitInventoryRemove(lv_itItem);

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicSystem.galaxy:1405

        if ((UnitGetType(lv_itItem) == lv_itemType)) {
            ItemSetChargeCount(lv_itItem, (ItemGetChargeCount(lv_itItem, false)-1));
            if ((ItemGetChargeCount(lv_itItem, false) <= 0.0)) {
                UnitInventoryRemove(lv_itItem);
            }