Add more item flags (#69)

* Add more item flags

- Add more item flags
- Modify some of the stat strings

* fix ethereal

* Rename flag
This commit is contained in:
Arto Simonyan
2025-02-09 01:08:58 +02:00
committed by GitHub
parent 415ac29ab1
commit 09dfe3c65d
3 changed files with 57 additions and 24 deletions

View File

@@ -266,13 +266,38 @@ func (gd *GameReader) getItemStats(statsListExPtr uintptr) (stat.Stats, stat.Sta
}
func setProperties(item *data.Item, flags uint32) {
if 0x00400000&flags != 0 {
item.Ethereal = true
}
if 0x00000010&flags != 0 {
item.Identified = true
}
if 0x04000000&flags != 0 {
if 0x4000000&flags != 0 {
item.IsRuneword = true
}
if 0x1000000&flags != 0 {
item.IsNamed = true
}
if 0x400000&flags != 0 {
item.Ethereal = true
}
if 0x20000&flags != 0 {
item.IsStartItem = true
}
if 0x10000&flags != 0 {
item.IsEar = true
}
if 0x2000&flags != 0 {
item.InTradeOrStoreScreen = true
}
if 0x800&flags != 0 {
item.HasSockets = true
}
if 0x100&flags != 0 {
item.IsBroken = true
}
if 0x10&flags != 0 {
item.Identified = true
}
// Only jewels and runes, gems don't work
if 0x8&flags != 0 {
item.IsInSocket = true
}
if 0x1&flags != 0 {
item.IsEquipped = true
}
}