From 4f9b7ed56de874e3212393ed478c90ed0efb467a Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Thu, 12 Mar 2026 20:05:40 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E4=B8=83=E6=97=A5=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E5=A5=96=E5=8A=B1bug=E4=BF=AE=E5=A4=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 53c573d7e003dd56cfa2aa76c88ce193922cc332. --- .../conf/seven_login/seven_login_cfg.go | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/server/conf/seven_login/seven_login_cfg.go b/src/server/conf/seven_login/seven_login_cfg.go index 4e5d57b5..8b464349 100644 --- a/src/server/conf/seven_login/seven_login_cfg.go +++ b/src/server/conf/seven_login/seven_login_cfg.go @@ -5,9 +5,7 @@ import ( "server/game/mod/item" "server/gamedata" "server/pkg/github.com/name5566/leaf/log" - "sort" "strconv" - "time" ) const ( @@ -95,23 +93,10 @@ func GetSevenLoginJackpot(IsMonth int) []*gamedata.SevenLoginJackpotData { } func GetMonthActive(Id int) int { - month := int(time.Now().Month()) - data, err := gamedata.GetData(CFG_SEVEN_LOGIN_MONTH) - active := []int{} + data, err := gamedata.GetDataByIntKey(CFG_SEVEN_LOGIN_MONTH, Id) if err != nil { log.Debug("GetSevenLoginReward err:%v", err) return int(math.Inf(1)) } - for _, v := range data { - if gamedata.GetIntValue(v, "Month") == month { - active = append(active, gamedata.GetIntValue(v, "Active")) - } - } - sort.Ints(active) - if Id-1 < 0 || Id-1 >= len(active) { - log.Debug("GetSevenLoginReward err:%v", err) - return int(math.Inf(1)) - } - id := active[Id-1] - return id + return gamedata.GetIntValue(data, "Active") }