update MezFes config for SignV2

This commit is contained in:
wish
2023-11-26 20:44:13 +11:00
parent dfc359f5e2
commit 662c137467

View File

@@ -8,6 +8,7 @@ import (
"erupe-ce/server/channelserver" "erupe-ce/server/channelserver"
"net/http" "net/http"
"strings" "strings"
"time"
"github.com/lib/pq" "github.com/lib/pq"
"go.uber.org/zap" "go.uber.org/zap"
@@ -82,19 +83,17 @@ func (s *Server) newAuthData(userID uint32, userRights uint32, userToken string,
resp.Characters[i].HR = 7 resp.Characters[i].HR = 7
} }
} }
if s.erupeConfig.DevModeOptions.MezFesEvent { stalls := []uint32{10, 3, 6, 9, 4, 8, 5, 7}
stalls := []uint32{10, 3, 6, 9, 4, 8, 5, 7} if s.erupeConfig.GameplayOptions.MezFesSwitchMinigame {
if s.erupeConfig.DevModeOptions.MezFesAlt { stalls[4] = 2
stalls[4] = 2 }
} resp.MezFes = &MezFes{
resp.MezFes = &MezFes{ ID: uint32(channelserver.TimeWeekStart().Unix()),
ID: uint32(channelserver.TimeWeekStart().Unix()), Start: uint32(channelserver.TimeWeekStart().Add(-time.Duration(s.erupeConfig.GameplayOptions.MezFesDuration) * time.Second).Unix()),
Start: uint32(channelserver.TimeWeekStart().Unix()), End: uint32(channelserver.TimeWeekNext().Unix()),
End: uint32(channelserver.TimeWeekNext().Unix()), SoloTickets: s.erupeConfig.GameplayOptions.MezfesSoloTickets,
SoloTickets: s.erupeConfig.GameplayOptions.MezfesSoloTickets, GroupTickets: s.erupeConfig.GameplayOptions.MezfesGroupTickets,
GroupTickets: s.erupeConfig.GameplayOptions.MezfesGroupTickets, Stalls: stalls,
Stalls: stalls,
}
} }
if !s.erupeConfig.HideLoginNotice { if !s.erupeConfig.HideLoginNotice {
resp.Notices = append(resp.Notices, strings.Join(s.erupeConfig.LoginNotices[:], "<PAGE>")) resp.Notices = append(resp.Notices, strings.Join(s.erupeConfig.LoginNotices[:], "<PAGE>"))