From ac67d4f55c366cb7b6bf912ea4d6edb91d7acd2b Mon Sep 17 00:00:00 2001 From: liwei Date: Sat, 1 Apr 2023 18:28:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/equipment/modelEquipment.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/equipment/modelEquipment.go b/modules/equipment/modelEquipment.go index c2405e391..34c6fb59c 100644 --- a/modules/equipment/modelEquipment.go +++ b/modules/equipment/modelEquipment.go @@ -308,6 +308,10 @@ func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.GameEquipData break } } + if satterNum > int32(len(sattr)) { + satterNum = int32(len(sattr)) + } + if satterNum > 0 && satterNum <= 4 { r := rand.New(rand.NewSource(configure.Now().Unix())) if conf.EquipId == 1 {