implement course 31

This commit is contained in:
wish
2024-02-10 17:45:40 +11:00
parent bbf4fa2472
commit 771f240d13

View File

@@ -75,7 +75,7 @@ func GetCourseStruct(rights uint32) ([]Course, uint32) {
sort.Slice(s, func(i, j int) bool { sort.Slice(s, func(i, j int) bool {
return s[i].ID > s[j].ID return s[i].ID > s[j].ID
}) })
var normalCafeCourseSet, netcafeCourseSet bool var normalCafeCourseSet, netcafeCourseSet, hidenCourseSet bool
for _, course := range s { for _, course := range s {
if rights-course.Value() < 0x80000000 { if rights-course.Value() < 0x80000000 {
switch course.ID { switch course.ID {
@@ -92,6 +92,12 @@ func GetCourseStruct(rights uint32) ([]Course, uint32) {
} }
netcafeCourseSet = true netcafeCourseSet = true
resp = append(resp, Course{ID: 30}) resp = append(resp, Course{ID: 30})
case 10:
if hidenCourseSet {
break
}
hidenCourseSet = true
resp = append(resp, Course{ID: 31})
} }
course.Expiry = time.Date(2030, 1, 1, 0, 0, 0, 0, time.FixedZone("UTC+9", 9*60*60)) course.Expiry = time.Date(2030, 1, 1, 0, 0, 0, 0, time.FixedZone("UTC+9", 9*60*60))
resp = append(resp, course) resp = append(resp, course)