26 lines
555 B
Go
26 lines
555 B
Go
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
|
|
}
|