随机机器人宠物技能等级
This commit is contained in:
parent
b6477c60ef
commit
1322a09297
|
|
@ -317,32 +317,9 @@ func (this *Player) OnLogined() {
|
||||||
this.dirty = true
|
this.dirty = true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.VIP = rand.Int31n(6) + 1
|
this.VIP = rand.Int31n(16) + 1
|
||||||
//机器人随机vip和头像
|
//机器人随机vip和头像
|
||||||
this.RobRandVip()
|
this.RobRandVip()
|
||||||
//随机机器人宠物技能等级
|
|
||||||
if this.Pets.SkillInfo == nil {
|
|
||||||
this.Pets.SkillInfo = make(map[int32]map[int32]int32)
|
|
||||||
for petId, _ := range this.Pets.ModUnlock {
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.VipExtra = VipMgrSington.GetVipPointsExtra(this.Platform, this.VIP)
|
this.VipExtra = VipMgrSington.GetVipPointsExtra(this.Platform, this.VIP)
|
||||||
|
|
@ -4362,6 +4339,31 @@ func (this *Player) RandRobotVip(scene *Scene) {
|
||||||
this.VIP = int32(vip)
|
this.VIP = int32(vip)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *Player) RandRobotPetSkillLevel() {
|
||||||
|
//随机机器人宠物技能等级
|
||||||
|
if this.Pets.SkillInfo == nil {
|
||||||
|
this.Pets.SkillInfo = make(map[int32]map[int32]int32)
|
||||||
|
for petId, _ := range this.Pets.ModUnlock {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// BindTelReward 发送绑定手机号奖励
|
// BindTelReward 发送绑定手机号奖励
|
||||||
func (this *Player) BindTelReward() {
|
func (this *Player) BindTelReward() {
|
||||||
// todo 奖励限额;ip日期最多赠送多少奖励
|
// todo 奖励限额;ip日期最多赠送多少奖励
|
||||||
|
|
|
||||||
|
|
@ -451,7 +451,8 @@ func (this *Scene) PlayerEnter(p *Player, pos int, ischangeroom bool) bool {
|
||||||
this.robotNum++
|
this.robotNum++
|
||||||
p.RobotRandName()
|
p.RobotRandName()
|
||||||
p.RandRobotVip(this)
|
p.RandRobotVip(this)
|
||||||
|
//随机机器人宠物技能等级
|
||||||
|
p.RandRobotPetSkillLevel()
|
||||||
name := this.GetSceneName()
|
name := this.GetSceneName()
|
||||||
logger.Logger.Tracef("(this *Scene) PlayerEnter(%v) robot(%v) robotlimit(%v)", name, this.robotNum, this.robotLimit)
|
logger.Logger.Tracef("(this *Scene) PlayerEnter(%v) robot(%v) robotlimit(%v)", name, this.robotNum, this.robotLimit)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue