resources/[ui]/caue-inventory/nui/scripts.js
// if amount2 is zero, we moved the entire stack.
if amount2 is zero, we moved the entire stack.
if amount2 is zero we moved the entire stack .
function CompileStacks(
    targetSlot,
    originSlot,
    inv1,
    inv2,
    originAmount,
    remainingAmount,
    targetAmount,
    purchase,
    itemCosts,
    itemidsent,
    metainformation,
    moveAmount,
    arraySlot
) {
    let originInventory;
    let targetInventory;
    if (inv2 == 'wrapmain') {
        originInventory = PlayerInventoryName;
    } else {
        originInventory = TargetInventoryName;
    }
    if (inv1 == 'wrapmain') {
        targetInventory = PlayerInventoryName;
    } else {
        targetInventory = TargetInventoryName;
    }
    $.post(
        'https://caue-inventory/SlotJustUsed',
        JSON.stringify({
            targetslot: targetSlot,
            origin: originSlot,
            itemid: itemidsent,
            move: false,
            MyInvMove: targetInventory === PlayerInventoryName,
            metadata: metainformation,
        }),
    );
    var isWeapon = false;
    if (itemList[itemidsent].weapon != null && !exluded[itemidsent] && !isCop && targetInventory !== originInventory) {
        brought = true;
        isWeapon = itemList[itemidsent].weapon;
    }
    invStack(
        targetSlot,
        moveAmount,
        targetInventory,
        originSlot,
        originInventory,
        purchase,
        itemCosts,
        itemidsent,
        metainformation,
        moveAmount,
        crafting,
        isWeapon,
        remainingAmount,
        StoreId,
    );
    if (crafting) {
        removeCraftItems(itemidsent, moveAmount, arraySlot);
        return;
    }
    UpdateSetWeights('');
}
function CompileStacks ( targetSlot , originSlot , inv1 , inv2 , originAmount , remainingAmount , targetAmount , purchase , itemCosts , itemidsent , metainformation , moveAmount , arraySlot ) { let originInventory ; let targetInventory ; if ( inv2 == 'wrapmain' ) { originInventory = PlayerInventoryName ; } else { originInventory = TargetInventoryName ; } if ( inv1 == 'wrapmain' ) { targetInventory = PlayerInventoryName ; } else { targetInventory = TargetInventoryName ; } $ . post ( 'https://caue-inventory/SlotJustUsed' , JSON . stringify ( { targetslot : targetSlot , origin : originSlot , itemid : itemidsent , move : false , MyInvMove : targetInventory === PlayerInventoryName , metadata : metainformation , } ) , ) ; var isWeapon = false ; if ( itemList [ itemidsent ] . weapon != null && ! exluded [ itemidsent ] && ! isCop && targetInventory !== originInventory ) { brought = true ; isWeapon = itemList [ itemidsent ] . weapon ; } invStack ( targetSlot , moveAmount , targetInventory , originSlot , originInventory , purchase , itemCosts , itemidsent , metainformation , moveAmount , crafting , isWeapon , remainingAmount , StoreId , ) ; if ( crafting ) { removeCraftItems ( itemidsent , moveAmount , arraySlot ) ; return ; } UpdateSetWeights ( '' ) ; }
if amount2 is zero, we moved the entire stack.
if amount2 is zero we moved the entire stack .
//("Changed Slot: " + targetSlot + "(" + targetAmount + ") of " + inv2 + " to " + originSlot + "(" + originAmount + ") of " + inv1 + " ") //closeInv();