From 2a899bdfb274ccb6473afa3a2b511e3699da1ca4 Mon Sep 17 00:00:00 2001 From: vietdungdev Date: Sun, 7 Jun 2026 19:32:47 +0700 Subject: [PATCH] fix check type charm and torch --- pkg/data/item/type.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/data/item/type.go b/pkg/data/item/type.go index fc194fa..5c7dc44 100644 --- a/pkg/data/item/type.go +++ b/pkg/data/item/type.go @@ -13,3 +13,15 @@ type Type struct { func (t Type) IsType(typeName string) bool { return t.Code == typeName } + +func (itmType Type) IsCharmOrTorch() bool { + if itmType.IsType(TypeCharm) || + itmType.IsType(TypeSmallCharm) || + itmType.IsType(TypeMediumCharm) || + itmType.IsType(TypeLargeCharm) || + itmType.IsType(TypeCraftedSunderCharm) || + itmType.IsType(TypeTorch) { + return true + } + return false +}