smaitch / Grail

World of Warcraft addon to provide a database of quest information.
31 stars 20 forks source link

TODO:Tradeskill changes in BFA #42

Open yoshimo opened 6 years ago

yoshimo commented 6 years ago

Tradeskills are divided by expansion now and their skills are said to have seperate levels too for each expansion. We might need to adjust profession related requirements therefore

smaitch commented 3 years ago

First of all we need to figure out what levels of a skill are now needed for specific quests. That may be just a conversion of the old point value into the new levels by expansion that are used. One major question I have is what happens when someone basically has not enough points from a previous expansion but has lots of points from the next expansion. Does this allow the quests that needed more points from a previous expansion to be available?

GetProfessions() still returns the IDs of the professions known.

GetProfessionInfo(id) still returns information about the "top-level" expansion value for that profession.

The last trade skills UI that was opened (or is still open) allows the following API to return values:

C_TradeSkillUI.GetCategories() returns a list of categoryId values which includes things that might not be showable (as the player does not have them), and headers, etc.

C_TradeSkillUI.GetCategoryInfo(categoryId) returns some useful information including: parentCategoryID type hasProgressBar skillLineCurrentLevel numIndents categoryID skillLineMaxLevel skillLineStartingRank name enabled

We can make use of skilLineCurrentLevel and skillLineMaxLevel to know you are 23/75 for example. The parentCategoryID I still cannot find a way to use properly. The problem I also have is knowing how this specific category of information relates to any other category by examining this information. However, assuming the C_TradeSkillUI.GetCategories() always returns the information in the order it should appear in the UI (and that order is in reverse order of expansion (most recent on top)), we can do math we may need.

So, assuming we can open up the proper trade skill UIs at startup (once they are readily available to be opened), we should be able to mine the information we might need. However, we cannot just keep a running total of each of the expansion's levels because one can continue on with the next expansion without filling up the previous expansion. Basically we have for each skill (except odd ones like archaeology) an array for each expansion. Then we need to come up with a mechanism to indicate what is needed for a specific quest, including whether progress in later expansions can qualify even if the specific expansion requirement is not fulfilled. For example (which is really contrived but just to illustrate a point), if the basic requirement is 200 Alchemy (which is the basic skill), but the user only has 175 Alchemy the quest is not available. However, if the user then is able to get Outland Alchemy at 50 (while still with basic Alchemy at 175) does this allow the quest to be available?

smaitch commented 3 years ago

We can use C_TradeSkillUI.GetAllProfessionTradeSkillLines() to get a list of all the profession ids that are not cooking, fishing and archaeology. Then for each we can use C_TradeSkillUI.GetTradeSkillLineInfoByID(id) to get the current and maximum values. This will work but we will need to keep an order ourselves for each of them by expansion.