View Single Post
01/05/24, 09:08 PM   #4
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 409
Originally Posted by robert.labrie View Post
Posting here for a bit of feedback/advice. I finally made an add-on. It has two major issues I think:
Originally Posted by robert.labrie View Post
* I'm not supposed to use LLC_Global but I'm not sure what to use in it's stead
* LCCGetCurrentPlayerRacialPatternId() probably won't work for Imperials since I doubt the raceId aligns with the patternId for it but I don't have Imperial race on my acct

Any other feedback/commentary. As a sysadmin with over 20 years experience I'm a degenerate programmer who writes mediocre code and would love a once-over from someone experienced before I publish the addon.

https://github.com/robertlabrie/Lazy...gCertification

Cheers,
Robert
Well, could have just asked me :P
But anyway, what you'll want to do is to call
local interactionTable = LibLazyCrafting:AddRequestingAddon(String addonName, boolean autoCraft, function callbackFunction, string optionalDebugAuthor, table optionalStyleTable)

Then replace any instances of LLC_Global with interactionTable.
You can even add a callback function, and LLC will spit back a table containing the location of the newly crafted item. So you don't need to worry about that weird tristat epic iron dagger that someone made.

Notably, you might be interested in the optionalStyleTable. This lets you specify 'allowed' styles (for example, all base racial styles, and maybe some cheap stuff like barbaric), and then you can just pass LLC_FREE_STYLE_CHOICE as the style ID. Then LLC will choose whatever you have the most of, (and can use) in that allowed style list. This is admittedly, not documented iirc bc it was a later addition.
  Reply With Quote