Thread Tools Display Modes
12-15-20, 12:01 PM   #1
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
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.
  Reply With Quote
12-15-20, 03:02 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
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.
__________________
  Reply With Quote
12-17-20, 03:12 AM   #3
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
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.
  Reply With Quote
12-17-20, 06:21 AM   #4
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Originally Posted by maqjav View Post
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.
__________________
  Reply With Quote
12-17-20, 11:20 AM   #5
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
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).
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Extract conduit information

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off