ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Bag_subscriber_bank (https://www.esoui.com/forums/showthread.php?t=7095)

Ayantir 06/01/17 06:07 PM

Bag_subscriber_bank
 
Hello,

This new bag come in addition to BAG_BANK if IsESOPlusSubscriber().

Few things :

- Assume user has maxed his bank (240).



Non subscriber :
  • GetBagUseableSize(BAG_SUBSCRIBER_BANK) = 0
  • GetBagUseableSize(BAG_BANK) = 240

Subscriber :
  • GetBagSize(BAG_SUBSCRIBER_BANK) = 240
  • GetBagSize(BAG_BANK) = 240

Everyone :
  • StackBag(BAG_BANK) = Stacks ONLY BAG_BANK
  • StackBag(BAG_SUBSCRIBER_BANK) = Stacks ONLY BAG_SUBSCRIBER_BANK
  • local stackCountBackpack, stackCountBank, stackCountCraftBag = GetItemLinkStacks(itemLink)
    stackCountBank is BAG_BANK + BAG_SUBSCRIBER_BANK
    Please note, this function don't work in "real time" but have a small refresh delay.
  • FindFirstEmptySlotInBag(BAG_BANK) = Find First Empty Slot In BAG_BANK
    Please note, this function don't work in "real time" but have a small refresh delay.
  • FindFirstEmptySlotInBag(BAG_SUBSCRIBER_BANK) = Find First Empty Slot In BAG_SUBSCRIBER_BANK
    Please note, this function don't work in "real time" but have a small refresh delay.


Few snippets of mass transfer / handling are in BankManager if needed.

Baertram 06/03/17 05:14 PM

The but shouldn't the second one of FindFirstEmptySlotInBag be like this:

Lua Code:
  1. FindFirstEmptySlotInBag(BAG_SUBSCRIBER_BANK) = Find First Empty Slot In BAG_SUBSCRIBER_BANK

iwontsay 06/03/17 10:13 PM

I wonder why they did it in that convoluted way. It could have been much easier to introduce GetBagSize(BAG_BANK) and GetUsableBagSize(BAG_BANK), where the former one indicates the slot range and the latter one the number of slots that can be filled at the same time, like

Without ESO+:
GetBagSize(BAG_BANK) = 500
GetUsableBagSize(BAG_BANK) = 250

Then, with ESO+:
GetBagSize(BAG_BANK) = 500
GetUsableBagSize(BAG_BANK) = 500

Then, deny transfers to the bank if the fill state reached or exceeded GetUsableBagSize(BAG_BANK). Mission accomplished.

Or, simply leave it with GetBagSize(BAG_BANK), have its return value doubled when ESO+ is active, but lift the constraint that the slot table indices are numbered 1..(size).

Ayantir 06/04/17 04:39 AM

Quote:

Originally Posted by Baertram (Post 31292)
The but shouldn't the second one of FindFirstEmptySlotInBag be like this:

Lua Code:
  1. FindFirstEmptySlotInBag(BAG_SUBSCRIBER_BANK) = Find First Empty Slot In BAG_SUBSCRIBER_BANK

Ups;) fixed


All times are GMT -6. The time now is 07:48 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI