View Single Post
02/25/20, 03:33 PM   #3
Shadowfen
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 84
At line 942 in LootAlert.lua file, change

Code:
SLASH_COMMAND_AUTO_COMPLETE:InvalidateSlashCommandCache()
to

Code:
SlashCommandAutoComplete::InvalidateSlashCommandCache()
This should fix the error.

For removing the embedded libraries:
  • Get the list of libraries that the addon uses/embeds
  • Look on ESOUI to make sure they are available standalone.
  • Download the standalone libraries that you don't already have.
  • Create or modify a line in the <addon name>.txt file (in this case LootAlert.txt) that starts with
    Code:
    ## DependsOn:
    and add to the end of it each library name that LootAlert uses but does not include any more. (Names separated by spaces!)
  • Remove references to the libraries being removed in the files section of <addon name>.txt file (the list of file names that follows the ## lines). Remember that it a library is not available as a standalone, you must leave the entry for it here.
  • Remove the embedded library files that you are replacing with standalone references.
  • Test the addon to see if it works now.
  • Look for and fix (if necessary) LibStub calls for libraries in the addon code. (see below)

The tricky part comes in when the old library uses LibStub and the new standalone no longer supports using LibStub. You will see that when you test the addon and it throws one or more nil index errors. Those will point to uses of the libraries that used to support LibStub but no longer do.

In that case, you will have to find all of the uses of LibStub() in the addon files such as:
Code:
local LAM = LibStub("LibAddonMenu-2.0")
and replace them with
Code:
local LAM = LibAddonMenu2
What you are doing here is replacing the LibStub() call with the new name that the library refers to itself as. You may see this in the library documentation on ESOUI (hopefully), but you will certainly find it in the library .lua file itself. In our example above, the reason that the name was not kept the same is because names (in the second version) are not allowed to have '-' or '.' in them.

Edit:
Oh, and if this is for a private version of the addon you will need to be sure to tell Minion to no longer update this addon, or else Minion will remove all this work that you've done.
  Reply With Quote