initial rights v4 concept

This commit is contained in:
wish
2023-03-11 23:17:14 +11:00
parent 29cf7add11
commit bcb71536ec
7 changed files with 135 additions and 129 deletions

View File

@@ -2,6 +2,7 @@ package channelserver
import (
"erupe-ce/common/byteframe"
"erupe-ce/common/mhfcourse"
ps "erupe-ce/common/pascalstring"
"erupe-ce/network/mhfpacket"
"fmt"
@@ -88,7 +89,7 @@ func handleMsgMhfGetCafeDuration(s *Session, p mhfpacket.MHFPacket) {
if err != nil {
panic(err)
}
if s.FindCourse("NetCafe").ID != 0 || s.FindCourse("N").ID != 0 {
if mhfcourse.CourseExists(30, s.courses) {
cafeTime = uint32(TimeAdjusted().Unix()) - uint32(s.sessionStart) + cafeTime
}
bf.WriteUint32(cafeTime) // Total cafe time