View Single Post
07-05-12, 10:09 AM   #5
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Apparently the C_BlackMarket functions simply return nil, without any errors, when not talking to Madam Goya / the BlackMarketUI is not shown
  • C_BlackMarket.GetNumItems
    C_BlackMarket.GetItemInfoByIndex

    http://www.wowhead.com/news=204376/m...-auction-house
    Code:
    numItems = C_BlackMarket.GetNumItems()
    name, texture, quantity, itemType, usable, level, levelType, sellerName, minBid, minIncrement, currBid, youHaveHighBid, numBids, timeLeft, link, marketID = C_BlackMarket.GetItemInfoByIndex(index)
    Lua Code:
    1. for i = 1, C_BlackMarket.GetNumItems() do
    2.     print(C_BlackMarket.GetItemInfoByIndex(i))
    3. end
    example output
    Lua Code:
    1. "Belt of Faith", "Interface\Icons\INV_Belt_08", 1, "Cloth", 1, 60, "REQ_LEVEL_ABBR", "Dran Droffers", 147300000, 7000000, 140300000, false, 5, 3, "|cffa335ee|Hitem:22518:0:0:0:0:0:0:0:85:0|h[Belt of Faith]|h|r", 15
    2. "Bonescythe Waistguard", "Interface\Icons\INV_Belt_27", 1, "Leather", 1, 60, "REQ_LEVEL_ABBR", "Jasper Fel", 472000000, 22000000, 450000000, false, 3, 4, "|cffa335ee|Hitem:22482:0:0:0:0:0:0:0:85:0|h[Bonescythe Waistguard]|h|r", 16
    3. "Earthshatter Headpiece", "Interface\Icons\INV_Helmet_15", 1, "Mail", nil, 60, "REQ_LEVEL_ABBR", "Quincy Cutler", 162300000, 7700000, 154600000, false, 10, 4, "|cffa335ee|Hitem:22466:0:0:0:0:0:0:0:85:0|h[Earthshatter Headpiece]|h|r", 18
    4. "Cat Carrier (Black Tabby)", "Interface\Icons\INV_Box_PetCarrier_01", 1, "Pet", 1, 1, "REQ_LEVEL_ABBR", "Breanni", 385000000, 18000000, 367000000, false, 13, 4, "|cffffffff|Hitem:8491:0:0:0:0:0:0:0:85:0|h[Cat Carrier (Black Tabby)]|h|r", 13
    5. "Redemption Headpiece", "Interface\Icons\INV_Helmet_15", 1, "Plate", nil, 60, "REQ_LEVEL_ABBR", "Malton Droffers", 105000000, 5000000, 100000000, false, 1, 4, "|cffa335ee|Hitem:22428:0:0:0:0:0:0:0:85:0|h[Redemption Headpiece]|h|r", 17
    6. "", nil, 1, nil, nil, 0, nil, "Trade Prince Gallywix", 346000000, 16000000, 330000000, false, 5, 4, nil, 19
    That 6th item seemed bugged:

  • C_BlackMarket.GetHotItem
    Code:
    name, texture, quantity, itemType, usable, level, levelType, sellerName, minBid, minIncrement, currBid, youHaveHighBid, numBids, timeLeft, link, marketID = C_BlackMarket.GetHotItem()
    Lua Code:
    1. "Cat Carrier (Black Tabby)", "Interface\Icons\INV_Box_PetCarrier_01", 1, "Pet", 1, 1, "REQ_LEVEL_ABBR", "Breanni", 385000000, 18000000, 367000000, false, 13, 4, "|cffffffff|Hitem:8491:0:0:0:0:0:0:0:85:0|h[Cat Carrier (Black Tabby)]|h|r", 13

Last edited by Ketho : 07-05-12 at 10:59 AM.