Knowing if an equippable item is "valid" for the player character's class
I'm writing a thing to replace the non-functional IsContainerItemAnUpgrade(), because I can.
The core logic for my code is functional, but it doesn't check if an item is of the right armor type, or if it's even equipable at all by the player character's class. There doesn't seem to be an API function to directly check this. Is there an "agreed upon" good way of doing this?
I have an idea in mind involving hardcoded arrays and for loops, to check if the current item is valid for the player character's class, but I'm probably missing something and this is probably not the best way to do it. I'd rather not have to reinvent the wheel if somebody else already has a solution, anyway.