basic item filter wip
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user