每日任务周奖励优化

This commit is contained in:
hahwu 2026-03-18 16:32:12 +08:00
parent 2341d2d144
commit 1b125ca222
2 changed files with 9 additions and 1 deletions

View File

@ -131,6 +131,7 @@ func ReqGmCommand_(player *Player, Command string) error {
VarMod.WeeklyResetTime = 0
player.ZeroUpdate(nil)
G_GameLogicPtr.ZeroFlush()
player.PushClientRes(player.GetDailyTaskMod().BackData())
case "setSevenLoginActive":
num, _ := strconv.Atoi(arg[1])
player.PlayMod.getSevenLoginMod().Active = num

View File

@ -9,7 +9,7 @@ import (
)
func getTaskReward(Id, AreaId, activityId int) []*item.Item {
switch Id {
case 2:
StarNum := int(50 * math.Pow(1.04, float64(AreaId)))
@ -32,6 +32,7 @@ func randJackpot(jackpot map[int]dailyTaskCfg.Jackpot, num int) map[int][]*item.
lastIds1 = Ids1
prevIsCard := 0
valid := true
cardCount := 0
for _, k := range Ids1 {
curIsCard := jackpot[k].Is_card
if prevIsCard == 1 && curIsCard == 1 {
@ -39,6 +40,12 @@ func randJackpot(jackpot map[int]dailyTaskCfg.Jackpot, num int) map[int][]*item.
break
}
prevIsCard = curIsCard
if curIsCard == 1 {
cardCount++
}
}
if cardCount < 2 {
continue
}
if valid {
r := make(map[int][]*item.Item, num)