From 2563858a3b1a4db1c4b6d6494f71c065a03bfda7 Mon Sep 17 00:00:00 2001 From: vietdungdev Date: Mon, 11 May 2026 12:58:39 +0700 Subject: [PATCH] =?UTF-8?q?update=20runeword=20Hysterial=20v=C3=A0=20Mania?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/data/item/runeword.go | 2 ++ pkg/memory/item.go | 21 +++++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/pkg/data/item/runeword.go b/pkg/data/item/runeword.go index 263d6af..0b8c8ce 100644 --- a/pkg/data/item/runeword.go +++ b/pkg/data/item/runeword.go @@ -91,6 +91,8 @@ const ( RunewordWrath RunewordName = "Wrath" RunewordZephyr RunewordName = "Zephyr" RunewordHustle RunewordName = "Hustle" + RunewordMania RunewordName = "Mania" + RunewordHysteria RunewordName = "Hysteria" RunewordMosaic RunewordName = "Mosaic" RunewordMetamorphosis RunewordName = "Metamorphosis" RunewordGround RunewordName = "Ground" diff --git a/pkg/memory/item.go b/pkg/memory/item.go index c75bf31..4a6aba2 100644 --- a/pkg/memory/item.go +++ b/pkg/memory/item.go @@ -260,12 +260,6 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD } } - // Set runeword name if applicable - if itm.IsRuneword { - if runeword, exists := item.RunewordIDMap[prefixes[0]]; exists { - itm.RunewordName = runeword - } - } // Determine item location location := item.LocationUnknown switch itemLoc { @@ -374,6 +368,21 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD statsListExPtr := uintptr(ReadUIntFromBuffer(itemDataBuffer, 0x88, Uint64)) itm.BaseStats, itm.Stats = gd.getItemStats(statsListExPtr) + // Set runeword name if applicable + if itm.IsRuneword { + if runeword, exists := item.RunewordIDMap[prefixes[0]]; exists { + itm.RunewordName = runeword + } + + if itm.RunewordName == "" || itm.RunewordName == item.RunewordHustle { + if FasterRunWalk, found := itm.Stats.FindStat(stat.FasterRunWalk, 0); found && FasterRunWalk.Value == 65 { + itm.RunewordName = item.RunewordHysteria + } else if Fanaticism, found := itm.Stats.FindStat(stat.Aura, 122); found && Fanaticism.Value == 1 { + itm.RunewordName = item.RunewordHysteria + } + } + } + // stack quantity as item property stackQty := gd.Process.ReadUInt(unitDataPtr+0x9C, Uint32) itm.StackedQuantity = int(stackQty)