m
Move page script moved page API GetChannelList to WoW:API GetChannelList without leaving a redirect
No edit summary |
m (Move page script moved page API GetChannelList to WoW:API GetChannelList without leaving a redirect) |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | |||
'''GetChannelList''' | |||
Retrieves joined channels. | Retrieves joined channels. | ||
id1, name1, id2, name2, ... = GetChannelList(); | id1, name1, disabled1, id2, name2, disabled2, ... = GetChannelList(); | ||
== Parameters == | |||
=== Arguments === | |||
:() - none | :() - none | ||
---- | ---- | ||
=== Returns=== | |||
:;id1, name1, ...: | :;id1, name1, disabled, ... | ||
:: triplets of channel number, channel name, and channel disabled. (see Blizzard_TradeSkillUI.lua TradeSkillUIMixin:InitLinkToMenu()). | |||
---- | ---- | ||
<span style="color: #d4d4d4;"></span><span style="color: #dcdcaa;"></span> | |||
<pre> | |||
{{ | function GetJoinedChannels() | ||
local channels = { } | |||
local chanList = { GetChannelList() } | |||
for i=1, #chanList, 3 do | |||
table.insert(channels, { | |||
id = chanList[i], | |||
name = chanList[i+1], | |||
isDisabled = chanList[i+2], -- Not sure what a state of "blocked" would be | |||
}) | |||
end | |||
return channels | |||
end | |||
</pre> | |||