fix check type charm and torch

This commit is contained in:
vietdungdev
2026-06-07 19:32:47 +07:00
parent 9408f1f980
commit 2a899bdfb2

View File

@@ -13,3 +13,15 @@ type Type struct {
func (t Type) IsType(typeName string) bool { func (t Type) IsType(typeName string) bool {
return t.Code == typeName 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
}