From 9b68b4e2937c8e04016e01b5be7120ed225bf776 Mon Sep 17 00:00:00 2001 From: Cj <161484149+CJ-SPT@users.noreply.github.com> Date: Fri, 21 Jun 2024 14:48:13 -0400 Subject: [PATCH] Fixed IsDerived matching, dont match base System.Object class when looking for base classes --- RecodeItLib/Remapper/Search/TypeDefExtensions.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RecodeItLib/Remapper/Search/TypeDefExtensions.cs b/RecodeItLib/Remapper/Search/TypeDefExtensions.cs index 9f9d388..77702c1 100644 --- a/RecodeItLib/Remapper/Search/TypeDefExtensions.cs +++ b/RecodeItLib/Remapper/Search/TypeDefExtensions.cs @@ -95,6 +95,10 @@ internal static class TypeDefExtensions if (type.BaseType is not null && (bool)parms.IsDerived is true) { + if (type.BaseType.Name.Contains("Object")) { return EMatchResult.NoMatch; } + + Logger.Log($"Match {type.Name} : {type.BaseType}", ConsoleColor.Red); + score.Score++; return EMatchResult.Match; }