View Single Post
01/05/24, 09:30 PM   #5
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 409
LazyCraftingCertification.name = "Lazy Crafting Certification"
IIRC this should generally match the folder name of your addon, as if it's used in
function LazyCraftingCertification.OnAddOnLoaded(event, addonName)
if addonName == LazyCraftingCertification.name then


then the addonName passed to that callback function is the folder name. Not 100% sure. You're not doing anything in the onAddonLoaded function so you wouldn't see any issues from that, but it might cause headaches if you do try to do stuff there (like say, register with LLC)


https://github.com/robertlabrie/Lazy...cation.lua#L22


Personally, I would suggest using the item ID (GetItemId . Also, assuming recipes don't share item ids) rather than the item link, but it doesn't make a big difference.
I also highly suggest making a helper function to find the certification quests. It'll make it a little easier, especially if you ever plan to localize, and you won't need as many for loops either.


https://github.com/robertlabrie/Lazy...ua#L63C8-L63C8


You can do local _,_,_, thingICareAbout,_,_,_,otherThingICareAbout = functionWithTonsOfReturns()
Makes the code a little more readable.

If someone accepts provisioning quest, realizes they don't have the addon on, then turns it on, the addon won't auto learn the recipe and will get stymied when it tries to craft. Probably won't happen too much but something to consider.
(also you have empty function local function LCCScratch()
end)


There's a nifty function DoesItemLinkFulfillJournalQuestCondition that you can use for the craft steps. Just save an example iron dagger item link and ask if that item link fills the quest condition. Also makes it easier for localization. But I doubt it'll work for the deconstruction step.
  Reply With Quote