fix(fight): 修正空变更导致的潜在逻辑问题
This commit is contained in:
@@ -96,7 +96,7 @@ func (h *Controller) Login(data *user.MAIN_LOGIN_IN, c gnet.Conn) (result *user.
|
||||
result = user.NewOutInfo() //设置登录消息
|
||||
|
||||
result.PlayerInfo = *t.Info
|
||||
space.GetSpace(t.Info.MapID).EnterMap(t)
|
||||
defer space.GetSpace(t.Info.MapID).EnterMap(t)
|
||||
|
||||
return result, 0
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user