rights v3.1

This commit is contained in:
wish
2022-11-02 20:44:53 +11:00
parent ada593990e
commit 5bb9637db8
4 changed files with 41 additions and 25 deletions

View File

@@ -78,6 +78,10 @@ func updateRights(s *Session) {
s.courses = mhfpacket.GetCourseStruct(rightsInt)
rights := []mhfpacket.ClientRight{{1, 0, 0}}
for _, course := range s.courses {
if course.ID == 9 || course.ID == 26 {
rightsInt += 0x40000000 // set netcafe bit
rights = append(rights, mhfpacket.ClientRight{ID: 30})
}
rights = append(rights, mhfpacket.ClientRight{ID: course.ID, Timestamp: 0x70DB59F0})
}
update := &mhfpacket.MsgSysUpdateRight{
@@ -213,7 +217,7 @@ func logoutPlayer(s *Session) {
timePlayed += sessionTime
var rpGained int
if s.FindCourse("Netcafe").ID != 0 {
if s.FindCourse("NetCafe").ID != 0 || s.FindCourse("N").ID != 0 {
rpGained = timePlayed / 900
timePlayed = timePlayed % 900
} else {