diff --git a/modules/config/model/map_node.go b/modules/config/model/map_node.go index 13d18241..71fc2094 100644 --- a/modules/config/model/map_node.go +++ b/modules/config/model/map_node.go @@ -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"` diff --git a/modules/config/model/map_pit.go b/modules/config/model/map_pit.go index 9455cd2d..0b7788fd 100644 --- a/modules/config/model/map_pit.go +++ b/modules/config/model/map_pit.go @@ -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实现风格)