From b6477c60efd685034648482c09e9fcc9ecfd8ef3 Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Tue, 23 Jul 2024 14:57:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E6=9C=BA=E5=99=A8=E4=BA=BA?= =?UTF-8?q?=E5=AE=A0=E7=89=A9=E6=8A=80=E8=83=BD=E7=AD=89=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/player.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/worldsrv/player.go b/worldsrv/player.go index d7bf4ee..22382ea 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -324,7 +324,21 @@ func (this *Player) OnLogined() { if this.Pets.SkillInfo == nil { this.Pets.SkillInfo = make(map[int32]map[int32]int32) for petId, _ := range this.Pets.ModUnlock { - skillLevel := rand.Int31n(10) + 1 + skillLevel := int32(0) + if this.VIP < 1 { + skillLevel = rand.Int31n(2) + } else if this.VIP >= 1 && this.VIP <= 3 { + skillLevel = rand.Int31n(3) + 1 + } else if this.VIP >= 4 && this.VIP <= 6 { + skillLevel = rand.Int31n(4) + 2 + } else if this.VIP >= 7 && this.VIP <= 9 { + skillLevel = rand.Int31n(4) + 3 + } else if this.VIP >= 10 && this.VIP <= 12 { + skillLevel = rand.Int31n(5) + 4 + } else if this.VIP >= 13 && this.VIP <= 16 { + skillLevel = rand.Int31n(6) + 5 + } + this.Pets.SkillInfo[petId] = make(map[int32]int32) this.Pets.SkillInfo[petId][10001] = skillLevel }