Repository navigation
Expand file tree
/
Copy pathAPI.lua
More file actions
39 lines (29 loc) · 1.58 KB
/
Copy pathAPI.lua
File metadata and controls
39 lines (29 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---------------------------------------
-- Profession Shopping List: API.lua --
---------------------------------------
-- Toggle the window
ProfessionShoppingList:ToggleWindow()
-- Attempt to buy tracked items in needed quantities from the currently opened merchant
ProfessionShoppingList:BuyFromMerchant()
-- Get the reagents the tracked recipes need; returns a table of itemID = { required = number, owned = number }
ProfessionShoppingList:GetMerchantShoppingList()
-- Get the reagents the tracked recipes need; returns a TSM-compatible search string
ProfessionShoppingList:GetTSMSearchString()
-- Switch between Ragnaros and Pierre for the button PSL adds
ProfessionShoppingList:SwapCookingPet()
-- Check if an item's appearance is collected; returns true or false
ProfessionShoppingList:IsAppearanceCollected(itemLink)
-- Check if an item's source is collected; returns true or false
ProfessionShoppingList:IsSourceCollected(itemLink)
-- Track a recipe
-- recipeID: number
-- recipeQuantity: number
-- recraft: boolean, optional, defaults to false
-- orderID: number, optional, used to determine provided reagents
ProfessionShoppingList:TrackRecipe(recipeID, recipeQuantity, recraft, orderID)
-- Untrack a recipe
-- recipeID: number
-- recipeQuantity: number, use 0 to untrack all
ProfessionShoppingList:UntrackRecipe(recipeID, recipeQuantity)
-- Event that fires when tracked recipes are changed; returns recipeID and new quantity (nil for both if all recipes are cleared)
EventRegistry:RegisterCallback("ProfessionShoppingList.OnTrackedRecipesChanged", function(_, recipeID, newQuantity) ... end, owner)