Closed zmarotrix closed 3 years ago
Rather than hardcoding 3 separate string checks and not using the allocated ImportantClasses
array:
ImportantClasses.Contains(rImportant[i]));
should have been
ImportantClasses.Any(rImportant[i].Contains));
"entry's type contains any of the important class names"
Had things been designed better, we would be using enums instead of strings and could have an extension class to check if the enum value was important :P
I never knew about that .any
thing, that would be a lot cleaner. I was rooting around to see if I could find a enum for the pokemon but I never found it so that would explain why. At least I didn't find it because it simply does not exist.
The logic failed to properly detect "GYM6" as a GYM trainer that needed to have Type themed Pokemon. Same for ELITE trainers.
Type themed trainers still sometimes have non-typed Pokemon. I plan to continue looking into this.
Also want to reduce duplicate Pokemon because it seems to be happening very often.