Auctionator / Journalator

World of Warcraft addon. Keep track of your gold making on the AH, crafting orders and with vendors
https://www.curseforge.com/wow/addons/journalator
MIT License
10 stars 6 forks source link

[Wrath] 3.4.1 still needs a shim for GetCurrencyListSize #57

Closed Road-block closed 1 year ago

Road-block commented 1 year ago

Please include as much of the following information as possible to help me fix the bug:

Brief Description of Bug

An error happens when interacting with some currency vendors.

Steps to Reproduce

Buy an item from a vendor for currency.

Loaded Addons

Include a list of addons you were running at the time this bug occurred.

Back Trace (LUA Error Output)

2x Journalator/Source/Utilities.lua:68: attempt to call field 'GetCurrencyListSize' (a nil value)
[string "@Journalator/Source/Utilities.lua"]:68: in function `GetCurrencyID'
[string "@Journalator/Source/Monitor/VendorItems.lua"]:432: in function <...ceJournalator/Source/Monitor/VendorItems.lua:417>
[string "=[C]"]: in function `BuyMerchantItem'
[string "@FrameXML/StaticPopup.lua"]:280: in function `OnAccept'
[string "@FrameXML/StaticPopup.lua"]:5235: in function `StaticPopup_OnClick'
[string "*StaticPopup.xml:24_OnClick"]:1: in function <[string "*StaticPopup.xml:24_OnClick"]:1>

Locals:
currencyName = "Stone Keeper's Shard"
index = 0
(*temporary) = nil
(*temporary) = "attempt to call field 'GetCurrencyListSize' (a nil value)"
currencyMap = <table> {
}
Road-block commented 1 year ago

An easy fix is

local GetCurrencyListSize = _G.GetCurrencyListSize or C_CurrencyInfo.GetCurrencyListSize

at the top of Utilities.lua for example.

plusmouse commented 1 year ago

Thanks for the report. I haven't been able to test the currency tracking on Wrath - lacking a character with the right level, location and inventory to do it - so missed that case.

Can you try this version? Journalator-1.38-1-g10368f4.zip

Road-block commented 1 year ago

Seems to be working fine.

Clipboard 1 In the current Wrath Build if it's any use

plusmouse commented 1 year ago

Thanks. I've added the fix to the next alpha release (pending build scripts and processing by Curseforge or Wago)