From 275a5f10c9ef95b7de802263ba81a5cc5e7549ee Mon Sep 17 00:00:00 2001 From: bigguy345 Date: Thu, 1 Jan 2026 01:01:47 +0200 Subject: [PATCH] Retrieved true containing type of method calls in hover info (handled inheritance case) --- .../gui/util/script/interpreter/hover/TokenHoverInfo.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/noppes/npcs/client/gui/util/script/interpreter/hover/TokenHoverInfo.java b/src/main/java/noppes/npcs/client/gui/util/script/interpreter/hover/TokenHoverInfo.java index 253e75086..8335ab6a6 100644 --- a/src/main/java/noppes/npcs/client/gui/util/script/interpreter/hover/TokenHoverInfo.java +++ b/src/main/java/noppes/npcs/client/gui/util/script/interpreter/hover/TokenHoverInfo.java @@ -621,6 +621,13 @@ public class TokenHoverInfo { TypeInfo containingType = null; if (callInfo != null) { containingType = callInfo.getReceiverType(); + + //Checks true containing type from resolved method (handles inheritance cases) + if (callInfo.getResolvedMethod() != null) { + TypeInfo trueContainingType = callInfo.getResolvedMethod().getContainingType(); + if (trueContainingType != null) + containingType = trueContainingType; + } } if (containingType == null && methodInfo != null) { containingType = methodInfo.getContainingType();