Possible to take into account racial bonuses?
matthewhively opened this issue ยท 6 comments
I was doing some JC, and thought there was an error with the import data and when things turn yellow/green/gray.... then I realized its because I have +5.
I suppose it would be fairly easy to add a static offset for certain professions when playing specific races, but I'm not sure where that would go in the code.
Gnomes +15 engineering
BE +10 enchanting
Draenei +5 JC
I think that is all the racials.
It might also make sense for any items that boost skill level... though I don't know of any other than skinning/herb/mining
First, I don't have any Classic characters that have a racial bonus so I'll have to create one and level it up to even test it. Second, I don't know if there are any API functions that would allow me to determine if one existed. Can you provide me with some examples that show the error.
As for where it would go in the code, I think SkillLevelData.lua is where it goes. I'd create a local function racialBonus() and add it to a, b, c, d.
Link for (retail) reference https://wowpedia.fandom.com/wiki/Profession
Skillet-Classic-1.32-alpha1 contains (tested) code that should work. I did a Blood Elf with Enchanting (+10). Let me know if it works for your JC.
What is supposed to be the observed effect of that new racial bonus method?
I don't see any difference on my draenei JC.
Is this working the way it should?
a = tonumber(a) or 0 + rb
b = tonumber(b) or 0 + rb
c = tonumber(c) or 0 + rb
d = tonumber(d) or 0 + rb
or should it be?
a = (tonumber(a) or 0) + rb
EDIT: it looks like adding parenthesis fixed it for my draenei
You are correct. I wrote the code before I had a toon to test it with. When I got around to testing, I fixed my bugs around finding the bonus but forgot to check if it was applied correctly. I'll have alpha3 out in a little bit.