feat(config): 添加广播节点结构体并重构地图节点配置 - 新增BroadcastNode结构体,包含触发器ID、位置、血量和方向字段 - 将MapNode结构体嵌入BroadcastNode以支持广播节点功能 - 从MapNode中移除重复的TriggerID、Pos、HP字段 - 在Event结构体中新增
This commit is contained in:
@@ -19,21 +19,29 @@ const (
|
||||
MapNodeTypePortal = 4 // 传送门节点
|
||||
)
|
||||
|
||||
type BroadcastNode struct {
|
||||
//节点激活脚本
|
||||
TriggerID uint32 `gorm:"comment:'触发器ID'" json:"trigger_id" description:"触发器ID"`
|
||||
//BOSS位置,多位置就是循环触发,固定点就是单位置,如果要实现原地动,就用2个固定位置来做
|
||||
//0:固定点,1:多位置,2:循环触发 赛有随机的boss和伪装的boss,如果是伪装boss,就触发剧情后实现boss的切换后再操作
|
||||
Pos string `gorm:"type:varchar(255);default:'';comment:'位置'" json:"pos"`
|
||||
HP int32 `gorm:"type:int;default:0;comment:'血量'" json:"hp" description:"血量"`
|
||||
//方向BroadcastNode
|
||||
Direction int32 `gorm:"type:int;default:0;comment:'方向'" json:"direction" description:"方向"`
|
||||
}
|
||||
|
||||
// MapNode 地图节点配置模型
|
||||
type MapNode struct {
|
||||
*BaseConfig
|
||||
*Event // 嵌入BOSS事件配置
|
||||
*BroadcastNode
|
||||
// 基础关联字段
|
||||
MapID int32 `gorm:"not null;index;comment:'所属地图ID'" json:"map_id" description:"地图ID"`
|
||||
//可以是精灵也可以是NPC ,到时候npc用高ID去控制就行
|
||||
TriggerID uint32 `gorm:"comment:'触发器ID'" json:"trigger_id" description:"触发器ID"`
|
||||
NodeID uint32 `gorm:"not null;default:0;comment:'节点ID'" json:"node_id" description:"节点ID"`
|
||||
|
||||
NodeID uint32 `gorm:"not null;default:0;comment:'节点ID'" json:"node_id" description:"节点ID"`
|
||||
|
||||
NodeName string `gorm:"type:varchar(100);default:'';comment:'节点名称'" json:"node_name" description:"节点名称"`
|
||||
//节点激活脚本
|
||||
|
||||
Pos string `gorm:"type:varchar(255);default:'';comment:'位置'" json:"pos"`
|
||||
HP int32 `gorm:"type:int;default:0;comment:'血量'" json:"hp" description:"血量"`
|
||||
|
||||
WinBonusID int `gorm:"type:int;default:0;comment:'胜利奖励ID'" json:"win_bonus_id"`
|
||||
FailBonusID int `gorm:"type:int;default:0;comment:'失败奖励ID'" json:"fail_bonus_id"`
|
||||
|
||||
@@ -19,6 +19,8 @@ type Event struct {
|
||||
Weather []int32 `gorm:"type:int[];comment:'触发天气'" json:"weather"`
|
||||
//触发的星期Event
|
||||
Week []int32 `gorm:"type:int[];comment:'触发的星期'" json:"week"`
|
||||
//首发精灵判断Event
|
||||
FirstSprites []int32 `gorm:"type:int[];comment:'首发精灵判断'" json:"first_sprites"`
|
||||
}
|
||||
|
||||
// MapPit 地图坑位核心配置模型(参照MonsterRefresh实现风格)
|
||||
|
||||
Reference in New Issue
Block a user