```
feat(common): 添加GlowFilter的Level字段 添加了GlowFilter结构体中的Level字段,用于表示等级信息, 对应JSON标签为"level,omitempty" --- fix(utils): 修复concurrent_swiss_map中的panic处理 - 使用goroutine替代线程池来监听通道 - 添加panic恢复机制,当发生panic时记录错误日志 - 确保在异常情况下程序能够
This commit is contained in:
@@ -80,6 +80,34 @@ func (s *InfoService) SetLogin() *model.PlayerInfo {
|
||||
}
|
||||
tt.Data.AllPetNumber = uint32(NewPetService(s.userid).PetCount(0))
|
||||
|
||||
if tt.Data.MapID > 300 || tt.Data.MapID == 0 { //如果位于基地,就重置到传送仓
|
||||
tt.Data.MapID = 1
|
||||
|
||||
}
|
||||
if tt.Data.IsNewPlayer() { //重置新手地图,放到机械仓
|
||||
tt.Data.SetTask(4, model.Completed) //设置新手任务默认完成
|
||||
tt.Data.MapID = 8
|
||||
if len(tt.Data.PetList) == 0 {
|
||||
//这个是添加后防止卡死
|
||||
rr := NewPetService(s.userid).PetInfo(0)
|
||||
if len(rr) > 0 {
|
||||
tt.Data.PetList = append(tt.Data.PetList, rr[0].Data)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if tt.Data.MaxPuniLv < 9 {
|
||||
|
||||
for i := 291; i < 299; i++ {
|
||||
|
||||
if tt.Data.GetTask(i) == model.Completed {
|
||||
tt.Data.MaxPuniLv = uint32(i) - 290
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if !IsToday(tt.LastResetTime) { //判断是否是今天
|
||||
|
||||
//每天login时候检查重置时间,然后把电池,任务,挖矿重置
|
||||
|
||||
Reference in New Issue
Block a user