Files
honoka-chan/internal/schema/rlive/reward.go
T
YumeMichi 0aacf8a4e9 Improve live and random live handling
- Add random live handlers, schemas and persistence for lot/play/continue/gameover/reward flow
- Update live status and schedule generation, including special rotation handling and CN timezone alignment
- Add config support for unlocking all daily special rotation songs and document the option
- Refresh live play, reward, precise score and session logic plus bundled main.db updates

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 20:59:45 +08:00

55 lines
2.3 KiB
Go

package rliveschema
import liveschema "honoka-chan/internal/schema/live"
type RewardReq struct {
Module string `json:"module"`
Action string `json:"action"`
GoodCnt int `json:"good_cnt"`
MissCnt int `json:"miss_cnt"`
IsTraining bool `json:"is_training"`
GreatCnt int `json:"great_cnt"`
CommandNum string `json:"commandNum"`
LoveCnt int `json:"love_cnt"`
RemainHp int `json:"remain_hp"`
MaxCombo int `json:"max_combo"`
ScoreSmile int `json:"score_smile"`
PerfectCnt int `json:"perfect_cnt"`
BadCnt int `json:"bad_cnt"`
Mgd int `json:"mgd"`
EventPoint int `json:"event_point"`
LiveDifficultyID int `json:"live_difficulty_id"`
TimeStamp int `json:"timeStamp"`
PreciseScoreLog liveschema.PreciseScoreLog `json:"precise_score_log"`
ScoreCute int `json:"score_cute"`
EventID any `json:"event_id"`
ScoreCool int `json:"score_cool"`
Token string `json:"token"`
}
func (req RewardReq) ToLiveRewardReq(liveDifficultyID int) liveschema.RewardReq {
return liveschema.RewardReq{
Module: req.Module,
Action: req.Action,
GoodCnt: req.GoodCnt,
MissCnt: req.MissCnt,
IsTraining: req.IsTraining,
GreatCnt: req.GreatCnt,
CommandNum: req.CommandNum,
LoveCnt: req.LoveCnt,
RemainHp: req.RemainHp,
MaxCombo: req.MaxCombo,
ScoreSmile: req.ScoreSmile,
PerfectCnt: req.PerfectCnt,
BadCnt: req.BadCnt,
Mgd: req.Mgd,
EventPoint: req.EventPoint,
LiveDifficultyID: liveDifficultyID,
TimeStamp: req.TimeStamp,
PreciseScoreLog: req.PreciseScoreLog,
ScoreCute: req.ScoreCute,
EventID: req.EventID,
ScoreCool: req.ScoreCool,
}
}