```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(config): 添加事件配置和地图绑定功能

- 在BossConfig中添加MapID字段用于绑定地图ID和Event结构体
- 新增Event结构体包含精灵数组、触发时间、天气等事件相关字段
- 在MapPit中添加MapID字段用于绑定地图ID和Event结构体
- 为MapPit添加IsCapture字段标识是否可捕捉
- 更新NewBossConfig和NewMapPit构造函数初始化Event实例
- 注释掉MapNode中的NodeActiveScript字段
```
This commit is contained in:
昔念
2026-02-22 10:03:46 +08:00
parent f16838a916
commit 790bc21034
3 changed files with 23 additions and 5 deletions

View File

@@ -12,6 +12,9 @@ const (
type BossConfig struct {
*cool.Model // 嵌入通用Model包含ID/创建时间/更新时间等通用字段)
PetBaseConfig
//绑定地图地图ID
MapID []int32 `gorm:"type:int[];comment:'绑定地图地图ID'" json:"map_id"`
*Event
Script string `gorm:"size:1024;default:'';comment:'BOSS脚本'" json:"script"` //boss出招逻辑做成js脚本
// ISboss uint32 `gorm:"not null;default:0;comment:'是否是Boss'" json:"is_boss"`
@@ -33,6 +36,7 @@ func (*BossConfig) GroupName() string {
func NewBossConfig() *BossConfig {
return &BossConfig{
Model: cool.NewModel(),
Event: &Event{},
}
}