Files
bl/modules/blazing/model/monster_refresh.go
昔念 75e428f62e refactor(blazing): 重构任务系统并优化相关功能
- 重构了任务系统的数据结构和执行逻辑
- 优化了地图加载和怪物刷新机制
- 改进了宠物系统的基础架构
- 调整了玩家信息和背包的处理方式
- 统一了数据访问层的接口和实现
2025-08-30 21:59:52 +08:00

48 lines
1.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
import (
"blazing/cool"
)
const (
TableNameMonsterRefresh = "monster_refresh" // 怪物刷新规则表
)
// MonsterRefresh 怪物刷新规则模型对应XML中的<monster>标签)
type MonsterRefresh struct {
*cool.Model
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
func (*MonsterRefresh) TableName() string {
return TableNameMonsterRefresh
}
// GroupName MonsterRefresh's table group
func (*MonsterRefresh) GroupName() string {
return "default"
}
// NewMonsterRefresh create a new MonsterRefresh
func NewMonsterRefresh() *MonsterRefresh {
return &MonsterRefresh{
Model: cool.NewModel(),
}
}
// 初始化表结构
func init() {
cool.CreateTable(&MonsterRefresh{})
}