CheckBaseLevel fails on identified magic items since ItemTypeName includes affixes. Rather than checking base name equality, this version uses substring matching. Unlike the previous versions using substring matching, this one then finds the base name with the longest substring match, instead of just the first. It should work under all circumstances.
CheckBaseLevel fails on identified magic items since ItemTypeName includes affixes. Rather than checking base name equality, this version uses substring matching. Unlike the previous versions using substring matching, this one then finds the base name with the longest substring match, instead of just the first. It should work under all circumstances.