Skip to content

Commit

Permalink
update MezFes config for SignV2
Browse files Browse the repository at this point in the history
  • Loading branch information
sekaiwish committed Nov 26, 2023
1 parent dfc359f commit 662c137
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions server/signv2server/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"erupe-ce/server/channelserver"
"net/http"
"strings"
"time"

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

0 comments on commit 662c137

Please sign in to comment.