style: 移除 Monster.go 中的多余空行

This commit is contained in:
xinian
2026-02-26 17:16:38 +08:00
committed by cnb
parent 1e71ebbd44
commit de711bec7a
2 changed files with 11 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ import (
"blazing/logic/service/fight/info"
"blazing/logic/service/player"
configmodel "blazing/modules/config/model"
"blazing/modules/config/service"
"blazing/modules/player/model"
@@ -33,12 +34,17 @@ func (Controller) PlayerFightBoss(data1 *fight.ChallengeBossInboundInfo, p *play
if mdata == nil {
return nil, errorcode.ErrorCodes.ErrPokemonNotExists
}
if len(mdata.BossIds) == 0 {
var bosinfo []configmodel.BossConfig
switch len(mdata.BossIds) {
case 0:
return nil, errorcode.ErrorCodes.ErrPokemonNotExists
case 1:
bosinfo = service.NewBossService().Get(mdata.BossIds[0])
default:
bosinfo = service.NewBossService().Get(mdata.BossIds[grand.Intn(len(mdata.BossIds))])
}
bosinfo := service.NewBossService().Get(mdata.BossIds[0])
if bosinfo == nil {
if len(bosinfo) == 0 {
return nil, errorcode.ErrorCodes.ErrPokemonNotExists
}
dv := 24