From 87082f6e7236150dfbdd15a1f630f8c287ab4413 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 2 Feb 2024 18:22:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E7=BB=84=E8=B6=8A=E7=95=8C=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_mail.json | 22 ++++++++++++++++++++++ modules/plunder/api_getlist.go | 6 ++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/bin/json/game_mail.json b/bin/json/game_mail.json index 6d7d7fb38..95f4ed8fc 100644 --- a/bin/json/game_mail.json +++ b/bin/json/game_mail.json @@ -515,5 +515,27 @@ }, "reword": [], "duration": 720 + }, + { + "id": "PlunderRankingReward", + "title": { + "key": "mail_mail_title_24", + "text": "海岛排行奖励" + }, + "postmark": "yj_icon_yc_mfjl", + "recipient": { + "key": "mail_mail_recipient_24", + "text": "亲爱的玩家:" + }, + "content": { + "key": "mail_mail_content_8", + "text": "获得第{0}名,奖励请查收。" + }, + "sender": { + "key": "mail_mail_sender_24", + "text": "系统" + }, + "reword": [], + "duration": 720 } ] \ No newline at end of file diff --git a/modules/plunder/api_getlist.go b/modules/plunder/api_getlist.go index 55acb6ae1..4b9d2ccf7 100644 --- a/modules/plunder/api_getlist.go +++ b/modules/plunder/api_getlist.go @@ -171,7 +171,9 @@ func (this *apiComp) sendRankReward(data map[string]int32) (err error) { var sz []string if true { for i := v.ScoreLow; i <= v.ScoreUp; i++ { - sz = append(sz, uid[i-1]) + if int32(len(uid)) > i-1 { // 越界校验 + sz = append(sz, uid[i-1]) + } } } @@ -183,7 +185,7 @@ func (this *apiComp) sendRankReward(data map[string]int32) (err error) { }) } this.module.mail.SendNewMail(&pb.DBMailData{ - Cid: "XXLRankingReward", + Cid: "PlunderRankingReward", Param: []string{fmt.Sprintf("%d-%d", v.ScoreLow, v.ScoreUp)}, // 参数 分数下线和分数上限之间 CreateTime: uint64(configure.Now().Unix()), Items: reward,