ecs/proto/check.go

26 lines
555 B
Go
Raw Normal View History

2025-06-04 18:17:39 +08:00
package proto
import "ecs/proto/pb"
func CheckPlatform(platform uint32) bool {
switch pb.Platform(platform) {
case pb.Platform_Dev, pb.Platform_Android, pb.Platform_IOS:
return true
default:
return false
}
}
func CheckChannel(channel uint32) bool {
switch pb.Channel(channel) {
case pb.Channel_Internal /*, pb.ChannelWechatMiniGame, pb.ChannelTapTap*/ :
return true
default:
return false
}
}
func CheckAttrType(attrType int) bool {
return pb.AttrType(attrType) > pb.AttrType_AttrTypeNone && pb.AttrType(attrType) < pb.AttrType_Nums
}