public static void LearnBook(ItemShortcut bookShortcut, Combatant user){
StatusRequirement[] requirements = bookShortcut.Setting.requirement.req;
for(int i = 0; i < requirements.Length; i++){
StatusRequirement req = requirements[i];
StatusRequirementSelection s = req.status;
string useCostText = bookShortcut.GetUseCostText(user);
Debug.Log("type: " + s.type);
Debug.Log("check:" + req.CheckRequirement(user));
Debug.Log("useCostText: " + useCostText);
}
}
How to get the require status ID, the Check Type(equal, greater,etc) and the Check Value ? It looks like you're new here. If you want to get involved, click one of these buttons!
The setting's class is derived from the BaseStatusRequirementType class, e.g. for status value requirements, the class is StatusValueRequirementType, for level checks it's LevelRequirementType, etc.
There are over 30 different classes for this - it's a bit complicated, but allows you to extend the requirements with custom checks without having to change anything in ORK's code :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
StatusValueRequirementType is what I need :)