So, there is an idea, but I'm too lazy to bring to mind. I'll just leave this here:
CharacterCanCast(__char,whatcast,bool)
and
ItemIsInCharacterInventory(_item,_char,_bool)
or
CharacterHasWeaponType(_char,_type)
or something else with similar meaning.
+DB +Proc etc.
Did you try it or something similar?