Quantcast C_AuctionHouse.ReplicateItems() - Problem - WoWInterface
Thread Tools Display Modes
04-02-20, 10:22 AM   #1
flatt83
A Defias Bandit
Join Date: Apr 2020
Posts: 3
C_AuctionHouse.ReplicateItems() - Problem

Hi there,

I've wrote a little piece to test out the abilities of the function C_AuctionHouse.ReplicateItems(), with a button which onclick executes the function,but it keeps returning nil. While executing the function, my auctionhouse-frame is open. storedVar is a saved Variable and the function doesn't seem to need any parameters.

Lua Code:
  1. local b = CreateFrame("Button", "MyButton", UIParent, "UIPanelButtonTemplate")
  2. b:SetSize(80 ,22)
  3. b:SetText("Button!")
  4. b:SetPoint("CENTER")
  5. b:SetScript("OnClick", function()
  6.     storedVar = ""
  7.     storedVar = C_AuctionHouse.ReplicateItems()
  8. end)

i'm fairly new to LUA and maybe i made a mistake somehow.

Any hint on what i'm possibly doing wrong would be appreciated.
  Reply With Quote
04-02-20, 12:04 PM   #2
Kanegasi
A Firelord
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 482
It's doing nothing because you aren't passing any arguments. ReplicateItems is the 8.3 replacement for QueryAuctionItems. Check out the old function for more info: https://wow.gamepedia.com/API_QueryAuctionItems
  Reply With Quote
04-02-20, 12:55 PM   #3
flatt83
A Defias Bandit
Join Date: Apr 2020
Posts: 3
yeah, i've read about the auctionhouse api-changes but my problem is, that the documentation states, that it is a replacement for a old allitems-query of QueryAuctionItems where the getAll parameter had to be set to 0 to download the complete data of the auctions. I've tried passing different sets of parameters, but i can't figure out a working one.

Last edited by flatt83 : 04-02-20 at 01:10 PM.
  Reply With Quote
04-02-20, 03:11 PM   #4
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 926
I'd say just from looking at Deprecated_8_3_0.lua you don't have to pass any parameters to ReplicateItems() and can subsequently call GetReplicateItemInfo(index) up to GetNumReplicateItems()
  Reply With Quote
04-02-20, 05:10 PM   #5
flatt83
A Defias Bandit
Join Date: Apr 2020
Posts: 3
Thanks for your answer Ketho. Never noticed that the function has no return-values, the rest is somehow obvious.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » C_AuctionHouse.ReplicateItems() - Problem

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