LibProcessable

14.8k Downloads

Slightly faulty logic when checking :IsDisenchantable with Garrison building?

Blazeflack opened this issue ยท 1 comments

commented

The following code is the return in the garrison block of the :IsDisenchantable function code:
return skillRequired and skillRequired <= 1, skillRequired, enchantingSkill
Shouldn't it only allow a skillRequired less than (<) 1 and not less than or equal to (<=) ?

I'm asking because the item with itemID 8178 has an item level of 10 and is being reported as being disenchantable.

Doing /dump LibStub("LibProcessable"):IsDisenchantable(8178, nil, true) gives the following return:

Dump: value=LibStub("LibProcessable"):IsDisenchantable(8178, nil, true)
[1]=true,
[2]=1,
[3]=0

Which is according to the GetSkillRequired function return, so it is not because the item is marked as "not disenchantable" by the WoW client, even if it wasn't it would still not be disenchantable in the Garrison.

commented

Simply put, it should check if skillRequired is equal to 0, since that is your enchantingSkill as a non-enchanter.