fix(Monster.go): 修复怪物生成时的闪光率判断逻辑
在生成怪物时,增加对宠物捕获率是否为0的检查,避免无效的闪光率计算。
This commit is contained in:
@@ -50,7 +50,8 @@ func (p *Player) genMonster() {
|
||||
if ttt.Id != 0 {
|
||||
|
||||
ttt.Lv = gconv.Uint32(RandomStringFromSlice(lv))
|
||||
if grand.Meet(1, 100) {
|
||||
|
||||
if xmlres.PetMAP[int(ttt.Id)].CatchRate != 0 && grand.Meet(1, 100) {
|
||||
ttt.RandSHiny()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user