From b2c710dc5c0901e828904a4d2f51a6a9c886fdbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Gim=C3=A9nez?= Date: Thu, 7 Nov 2024 21:56:02 +0900 Subject: [PATCH] fix necro revive and proper locate items from cube --- pkg/data/npc.go | 2 +- pkg/memory/item.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/data/npc.go b/pkg/data/npc.go index f89e934..ff2d4c4 100644 --- a/pkg/data/npc.go +++ b/pkg/data/npc.go @@ -130,7 +130,7 @@ func (m Monster) IsMerc() bool { func (m Monster) IsPet() bool { // Necro revive - if m.States.HasState(state.Revive) && m.Type == MonsterTypeMinion { + if m.States.HasState(state.Revive) { return true } diff --git a/pkg/memory/item.go b/pkg/memory/item.go index b407bf3..6337f65 100644 --- a/pkg/memory/item.go +++ b/pkg/memory/item.go @@ -121,6 +121,11 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD location = item.LocationInventory break } + if invPage == 3 { + location = item.LocationCube + invPage = 0 + break + } location = item.LocationStash invPage = 0 break