HandyNotes: Mechagon & Nazjatar

HandyNotes: Mechagon & Nazjatar

875k Downloads

C_TransmogCollection.GetAppearanceSources error in patch 9.2.5

KyrosKrane opened this issue ยท 6 comments

commented

In WoW 9.2.5, I'm getting an error on login:

1x Usage: local sources = C_TransmogCollection.GetAppearanceSources(appearanceID, categoryType, transmogLocation)
[string "=[C]"]: in function `GetAppearanceSources'
[string "@HandyNotes_Shadowlands\core\rewards-Rewards.lua"]:411: in function `IsKnown'
[string "@HandyNotes_Shadowlands\core\rewards-Rewards.lua"]:446: in function `IsObtained'
[string "@HandyNotes_Shadowlands\core\nodes.lua"]:106: in function `IsCollected'
[string "@HandyNotes_Shadowlands\core\nodes.lua"]:472: in function <HandyNotes_Shadowlands\core\nodes.lua:471>
[string "=(tail call)"]: ?
[string "@HandyNotes_Shadowlands\core\nodes.lua"]:200: in function `Prepare'
[string "@HandyNotes_Shadowlands\core\map.lua"]:158: in function `Prepare'
[string "@HandyNotes_Shadowlands\common.lua"]:311: in function `Prepare'
[string "@HandyNotes_Shadowlands\core\core.lua"]:205: in function <HandyNotes_Shadowlands\core\core.lua:194>
[string "=(tail call)"]: ?
[string "@HandyNotes\HandyNotes-v1.6.6.lua"]:435: in function `UpdateMinimapPlugin'
[string "@HandyNotes\HandyNotes-v1.6.6.lua"]:494: in function `?'
[string "@TomTom\libs\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:119: in function <...Tom\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@TomTom\libs\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:29: in function <...Tom\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
[string "@TomTom\libs\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:64: in function `SendMessage'
[string "@HandyNotes_Shadowlands\core\core.lua"]:253: in function `RefreshImmediate'
[string "@HandyNotes_Shadowlands\core\core.lua"]:248: in function <HandyNotes_Shadowlands\core\core.lua:246>
[string "@SharedXML\C_TimerAugment.lua"]:16: in function <SharedXML\C_TimerAugment.lua:14>

Opening the world map in Maldraxxus increases the error count, but it's the same error message.

The root cause appears to be that the C_TransmogCollection.GetAppearanceSources was changed to require an extra parameter.

commented

Me and a friend have the same issue and also there a no longer the "Skull" for any rares on the maps/minimap.

commented
local itemSlots = {
    INVTYPE_HEAD = "HEADSLOT",
    INVTYPE_SHOULDER = "SHOULDERSLOT",
    INVTYPE_CLOAK = "BACKSLOT",
    INVTYPE_CHEST = "CHESTSLOT",
    INVTYPE_ROBE = "CHESTSLOT",
    INVTYPE_TABARD = "TABARDSLOT",
    INVTYPE_BODY = "SHIRTSLOT",
    INVTYPE_WRIST = "WRISTSLOT",
    INVTYPE_HAND = "HANDSSLOT",
    INVTYPE_WAIST = "WAISTSLOT",
    INVTYPE_LEGS = "LEGSSLOT",
    INVTYPE_FEET = "FEETSLOT",
    INVTYPE_WEAPON = "MAINHANDSLOT",
    INVTYPE_RANGED = "MAINHANDSLOT",
    INVTYPE_RANGEDRIGHT = "MAINHANDSLOT",
    INVTYPE_THROWN = "MAINHANDSLOT",
    INVTYPE_SHIELD = "SECONDARYHANDSLOT",
    INVTYPE_2HWEAPON = "MAINHANDSLOT",
    INVTYPE_WEAPONMAINHAND = "MAINHANDSLOT",
    INVTYPE_WEAPONOFFHAND = "SECONDARYHANDSLOT",
    INVTYPE_HOLDABLE = "SECONDARYHANDSLOT",
}

local function GetItemSlot(itemLinkOrID)
    local _, _, _, slot = GetItemInfoInstant(itemLinkOrID)
    if not slot then return end
    return itemSlots[slot]
end

local function GetItemCategory(appearanceID, sourceID)
    return C_TransmogCollection.GetCategoryForItem(appearanceID) or C_TransmogCollection.GetCategoryForItem(sourceID)
end

local function GetTransmogLocation(itemLinkOrID)
    return TransmogUtil.GetTransmogLocation(GetItemSlot(itemLinkOrID), Enum.TransmogType.Appearance, Enum.TransmogModification.Main)
end
C_TransmogCollection.GetAppearanceSources(appearanceID, GetItemCategory(appearanceID, sourceID), GetTransmogLocation(self.item))
commented

I'm following @KyrosKrane around github, and noticed the above comment. @sehra copied in part of my change from 5cd7e57 but you might want to look at the rest for context.

commented

@kemayo Now that C_TransmogCollection.GetAppearanceSources() requires parameters that are essentially "what area of the wardrobe UI is selected right now", it seems like the wrong endpoint. I want to see if there is a more straight-forward solution.

I'm looking at what ATT is doing. They use C_TransmogCollection.GetAllAppearanceSources(appearanceID) instead to get other source IDs to check. Superficial testing seems to indicate it works, but I'll have to keep an eye on it for outliers.

commented

@zarillion it's definitely worth looking at other approaches -- that was mostly me wanting to quickly fix it once I realized it was broken last night after the patch actually came out, which very much led to the first change that'd work. :D

commented

Should be fixed in the most recent release.