From d03db6d9f8c331c10434defb3695fd3ed8f9941b Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 5 Feb 2024 16:30:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E6=B6=88=E9=9A=8F=E6=9C=BA=E6=B6=88?= =?UTF-8?q?=E9=99=A4=20=E8=BF=87=E6=BB=A4=E7=89=B9=E6=AE=8A=E5=85=83?= =?UTF-8?q?=E7=B4=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/entertainment/xxlPlat.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/entertainment/xxlPlat.go b/modules/entertainment/xxlPlat.go index 5e8a7f40f..93b6562d0 100644 --- a/modules/entertainment/xxlPlat.go +++ b/modules/entertainment/xxlPlat.go @@ -526,7 +526,15 @@ func (this *MapData) SkillUp(pos int32, color int32, skillid int32, value int32, switch skillid { case 1: - ids = utils.RandomNumbers(0, Total-1, int(value)) + randNum := utils.RandomNumbers(0, Total-1, int(value)*2) + for _, v := range randNum { + if this.Plat[v].Special > 0 { + ids = append(ids, v) + if len(ids) >= int(value) { + break + } + } + } case 2: for i := 0; i < Height; i++ { ids = append(ids, 3*Width+i)