ecs/proto/check.go

26 lines
559 B
Go
Raw Permalink 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 {
2025-06-20 15:34:32 +08:00
return pb.AttrType(attrType) > pb.AttrType_AttrTypeNone && pb.AttrType(attrType) < pb.AttrType_AttrNums
2025-06-04 18:17:39 +08:00
}