Refine live schedule data

- Add special_live_rotation_m data to main.db for rotated special live scheduling
- Split normal and special live queries to avoid selecting special-only columns from normal_live_m
- Build live schedule/status around rotated special lives and derived training lives
- Reuse user training energy values in login top info and live party list responses
- Set training energy and max training energy defaults to 999

Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
2026-06-06 15:57:06 +08:00
parent 2e72bd4da5
commit f8a0f2db13
7 changed files with 343 additions and 45 deletions
+4 -2
View File
@@ -16,6 +16,8 @@ var defaultLpRecoveryItemIDs = []int{
777015, 777016, 777017, 777018, 777019, 777020,
}
const defaultTrainingEnergy = 999
func (ss *Session) GetUserPref(userID string) usermodel.UserPref {
pref := usermodel.UserPref{}
has, err := ss.UserEng.Table(new(usermodel.UserPref)).
@@ -62,8 +64,8 @@ func (ss *Session) GetUserInfo() userschema.UserInfo {
LicenseLiveEnergyRecoverlyTime: 60,
EnergyFullNeedTime: 0,
OverMaxEnergy: ss.UserPref.EffectiveCurrentEnergy(),
TrainingEnergy: 10,
TrainingEnergyMax: 10,
TrainingEnergy: defaultTrainingEnergy,
TrainingEnergyMax: defaultTrainingEnergy,
FriendMax: 99,
InviteCode: ss.UserPref.InviteCode,
InsertDate: "2015-08-10 18:58:30",