随机机器人宠物技能等级
This commit is contained in:
parent
dcaf24653b
commit
b6477c60ef
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue