fix(fight): 修正空变更导致的潜在逻辑问题

This commit is contained in:
1
2025-11-30 02:31:08 +00:00
parent d8718e8eac
commit c55a1fd5fb
2 changed files with 8 additions and 1 deletions

View File

@@ -72,6 +72,13 @@ func (lw *Player) CompleteLogin() {
}
if lw.IsNewPlayer() { //重置新手地图,放到机械仓
lw.Info.MapID = 8
if len(lw.Info.PetList) == 0 {
rr := lw.Service.Pet.PetInfo(0)
if len(rr) > 0 {
lw.Info.PetList = append(lw.Info.PetList, rr[0].Data)
}
}
}
lw.IsLogin = true
}