[EO] Bank Currency Fix

Hello,

I don’t hang around here too often, and I probably won’t for a long time, still.

I don’t know if there isn’t a fix for this somewhere else, but I decided to figure it out myself and post it here.
There is a bug in Eclipse Origins, and as I read here, even in Nightly releases.

This bug prevents you from withdrawing currencies from banks in a normal way, while you input the amount of items you want to drop and then hit the button, it withdraws items from the bank based on your inventory amounts, NOT bank amounts. So, for example, if you have 0 Gold in inventory, the bank withdraws an useless “zero” piece of currency. If you have like 50 coins in the inventory, it withdraws 50 from the bank, conclusion is, it doesn’t check for the bank amounts at all.

Here’s the fix (Client Side only):

modGameLogic
Find:

Public Function GetBankItemValue(ByVal bankslot As Long) As Long

Replace With:

Public Function GetBankItemValue(ByVal index As Long, ByVal bankslot As Long) As Long

Add above GetBankItemValue = Bank.Item(bankslot).Value :

If index > MAX_PLAYERS Then Exit Function

modDirectDraw7

Find these two:

If GetBankItemValue(i) > 1 Then

Amount = CStr(GetBankItemValue(i))

Add 0 for Index:

If GetBankItemValue(0, i) > 1 Then

Amount = CStr(GetBankItemValue(0, i))
```
**frmMain (Code)**

Find:
```
Private Sub lblCurrencyOk_Click()
```
Reffer to this:

```
If IsNumeric(txtCurrency.text) Then
        If Val(txtCurrency.text) > GetPlayerInvItemValue(MyIndex, tmpCurrencyItem) Then txtCurrency.text = GetPlayerInvItemValue(MyIndex, tmpCurrencyItem)
```
**Replace the 2 lines with this, instead:**
Here, you make an exception that if we're withdrawing, we use currency menu 3, so we check for Bank amounts instead of Inventory amounts.

```
If IsNumeric(txtCurrency.text) Then
        If CurrencyMenu = 3 Then
            If Val(txtCurrency.text) > GetBankItemValue(MyIndex, tmpCurrencyItem) Then txtCurrency.text = GetBankItemValue(MyIndex, tmpCurrencyItem)
        ElseIf Val(txtCurrency.text) > GetPlayerInvItemValue(MyIndex, tmpCurrencyItem) Then txtCurrency.text = GetPlayerInvItemValue(MyIndex, tmpCurrencyItem)
        End If
```
And that's all.

Regards,
Ravey.

I love you.

Thanks for the fix, didn’t even know this bug existed until now  😛

the fix didn’t work for me, I put in everything 😕

the fix didn’t work for me, I put in everything 😕

Hmm , This works fine on 2.3 and 3.0

Thanks

Thanks

-snip-

Growlith1223, everybody. He’ll be here all week. ❤

Log in to reply