CTMod

CTMod

766k Downloads

ct_core opens warband bank tab as a bag

DaGrump2394 opened this issue ยท 1 comments

commented

When you have "...and open all bank slots" under "Player Bank" checked in CT_Core, it opens a 98-slot bag called "Bank Tab Bag (DNT)" for the Warband Tab. This bag does not automatically close with "...and close when finished".

commented

The problem is here:

for i = NUM_BAG_FRAMES + 1, NUM_CONTAINER_FRAMES, 1 do

This isn't using the most appropriate global constants, and it's miscalculating them, resulting in the wrong bagIDs for opening the bank bags (e.g. for live it results in 5-13 instead of 6-12, which opens the reagent bag, and closes 1 bank bag to open the first warbank bag). It should instead be something like this:

for i = BACKPACK_CONTAINER+ITEM_INVENTORY_BANK_BAG_OFFSET+1, BACKPACK_CONTAINER+ITEM_INVENTORY_BANK_BAG_OFFSET+NUM_BANKBAGSLOTS, 1 do

Though I'd recommend setting a local constant for those rather than calculate them on every event.