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)