fix check type charm and torch
This commit is contained in:
@@ -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
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user