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

@@ -12,15 +12,14 @@ const (
// MonsterRefresh 怪物刷新规则模型对应XML中的<monster>标签)
type MonsterRefresh struct {
*cool.Model
MapID int32 `gorm:"not null;index:idx_refresh_by_map_id;comment:'所属地图ID'" json:"map_id"`
MonsterID int32 `gorm:"not null;comment:'怪物唯一编号'" json:"monster_id"`
//Desc string `gorm:"type:varchar(100);not null;comment:'怪物名称(如皮皮)'" json:"desc"`
MinLevel int32 `gorm:"not null;comment:'最低等级'" json:"min_level"`
MaxLevel int32 `gorm:"not null;comment:'最高等级'" json:"max_level"`
Capturable bool `gorm:"not null;comment:'是否可捕捉'" json:"capturable"`
Rate float64 `gorm:"not null;comment:'刷新概率(百分比)'" json:"rate"` //未设置概率的就是默认刷新
Value string `gorm:"type:text;not null;comment:'限制值如19:00-24:00'" json:"value"` //这里是js文本暂定传入时间
MonsterID int32 `gorm:"not null;comment:'对应原怪物唯一编号'" json:"monster_id"`
ShinyID int32 `gorm:"not null;uniqueIndex;comment:'异色唯一标识ID'" json:"shiny_id"`
RefreshScript string `gorm:"type:text;not null;comment:'刷新脚本JS格式可包含时间/天气/地形等条件)'" json:"refresh_script"`
ShinyFilter string `gorm:"type:text;not null;comment:'异色滤镜效果(文本描述或配置参数)'" json:"shiny_filter"`
ShinyEffect string `gorm:"type:text;not null;comment:'异色光效效果(文本描述或配置参数)'" json:"shiny_effect"`
// TODO: 增加ruffle的显示异色效果
}
// TableName MonsterRefresh's table name