refactor(blazing): 重构任务系统并优化相关功能

- 重构了任务系统的数据结构和执行逻辑
- 优化了地图加载和怪物刷新机制
- 改进了宠物系统的基础架构
- 调整了玩家信息和背包的处理方式
- 统一了数据访问层的接口和实现
This commit is contained in:
2025-08-30 21:59:52 +08:00
parent 2ed5c2db27
commit 75e428f62e
23 changed files with 326 additions and 230 deletions

View File

@@ -38,7 +38,7 @@ func (s *UserService) Reg(nick string, color uint32) {
t1.Nick = nick
t1.Color = color
t1.RegisterTime = uint32(time.Now().Unix())//写入注册时间
t1.RegisterTime = uint32(time.Now().Unix()) //写入注册时间
t22, err := json.Marshal(t1)
if err != nil {
return
@@ -50,7 +50,7 @@ func (s *UserService) Reg(nick string, color uint32) {
glog.Error(context.Background(), err)
return
}
go s.InitTask()
}
func (s *UserService) Person() (ret *model.PlayerInfo) {
@@ -72,7 +72,10 @@ func (s *UserService) Save(data *model.PlayerInfo) {
temp, _ := json.Marshal(data)
tt.Data = string(temp)
m.Save(tt)
_, err := m.Update(tt)
if err != nil {
panic(err)
}
return