- 重构了任务系统的数据结构和执行逻辑 - 优化了地图加载和怪物刷新机制 - 改进了宠物系统的基础架构 - 调整了玩家信息和背包的处理方式 - 统一了数据访问层的接口和实现
29 lines
454 B
Go
29 lines
454 B
Go
package service
|
|
|
|
import (
|
|
"blazing/cool"
|
|
"blazing/modules/blazing/model"
|
|
)
|
|
|
|
type UserService struct {
|
|
userid uint32
|
|
|
|
task *cool.Service //任务
|
|
reg *cool.Service //注册
|
|
pet *cool.Service //精灵
|
|
}
|
|
|
|
func NewUserService(id uint32) *UserService {
|
|
return &UserService{
|
|
userid: id,
|
|
task: &cool.Service{
|
|
Model: model.NewTask(),
|
|
},
|
|
reg: &cool.Service{
|
|
Model: model.NewPlayer(),
|
|
},
|
|
pet: &cool.Service{Model: model.NewPet()},
|
|
}
|
|
|
|
}
|