WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Extract conduit information (https://www.wowinterface.com/forums/showthread.php?t=58464)

maqjav 12-15-20 12:01 PM

Extract conduit information
 
Hello.
I'm trying to extract information of a conduit given it's ID, however checking the documentation I don't see a way to extract the conduit data of a conduit that I haven't learnt and it's not in my soulbind.

Something like the next function but generic for every conduit in the game:
Code:

local conduitData = C_Soulbinds.GetConduitCollectionData(conduitID)
Thanks.

Xrystal 12-15-20 03:02 PM

Have you tried to see if the VirtualID allows you at least some of the information if you plugin in the a valid ID ?

C_Soulbinds.GetConduitCollectionDataByVirtualID(virtualID)

It's on the same page at the moment as the conduitID option. So, maybe it's the equivalent of a generic version.

maqjav 12-17-20 03:12 AM

Hey Xrystal.

No I haven't although the name of the method makes me think that it applies only to my collection.
I will give it a try, although I have to find out how to get that virtualID first.

Thanks.

Xrystal 12-17-20 06:21 AM

Quote:

Originally Posted by maqjav (Post 337954)
Hey Xrystal.

No I haven't although the name of the method makes me think that it applies only to my collection.
I will give it a try, although I have to find out how to get that virtualID first.

Thanks.

I was thinking it may be the same number you use to get your known conduit information. I haven't got that far myself yet to test it out myself, but that's my theory.

Similar to how you can get the spell information from the spellID. The ID doesn't change but certain functions will return the information regardless as to whether you know it or not.

maqjav 12-17-20 11:20 AM

It seems they get that virtualID from the CURSOR_CHANGED event:

Extracted from https://www.townlong-yak.com/framexm...lbindsTree.lua
Code:

function SoulbindTreeMixin:OnEvent(event, ...)
        --
        elseif event == "CURSOR_CHANGED" then
                local isDefault, newCursorType, oldCursorType, oldCursorVirtualID = ...;
                self:OnCursorChanged(isDefault, newCursorType, oldCursorType, oldCursorVirtualID);
        ---
        end
end

function SoulbindTreeMixin:OnCursorChanged(isDefault, newCursorType, oldCursorType, oldCursorVirtualID)
        if isDefault and oldCursorType == Enum.UICursorType.ConduitCollectionItem then
                local previewConduitType, previewConduitID = Soulbinds.GetPreviewConduit();
               
                if previewConduitID and oldCursorVirtualID > 0 then
                        local conduitData = C_Soulbinds.GetConduitCollectionDataByVirtualID(oldCursorVirtualID);
                        if conduitData.conduitID == previewConduitID then
                                return;
                        end
                end
      --
end

I have tried to loop trough half million IDs, and none exists, so I imagine that the ID is created under certain cases (probably that's why its named virtualID).


All times are GMT -6. The time now is 04:30 AM.

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