basic item filter wip

This commit is contained in:
Héctor Giménez
2023-03-12 19:32:50 +09:00
parent 306150e873
commit 66dd506ba7
12 changed files with 273 additions and 26 deletions

View File

@@ -1,9 +1,10 @@
package data
import (
"strings"
"github.com/hectorgimenez/d2go/pkg/data/item"
"github.com/hectorgimenez/d2go/pkg/data/stat"
"strings"
)
type Items struct {
@@ -29,6 +30,12 @@ type Item struct {
IsVendor bool
}
func (i Item) Type() string {
t, _ := item.TypeForItemName(string(i.Name))
return t
}
func (i Item) IsPotion() bool {
return i.IsHealingPotion() || i.IsManaPotion() || i.IsRejuvPotion()
}