Files
bl/modules/config/model/map_node.go
昔念 5995f0670c
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
```
feat(game): 实现扭蛋系统批量物品添加功能并优化地图逻辑

- 新增ItemAddBatch方法用于批量添加物品,支持普通道具和特殊道具的分别处理
- 优化扭蛋游戏玩法中的物品添加逻辑,使用新的批量接口提升性能
- 在扭蛋机器人命令中实现完整的物品检查和批量添加流程

refactor(map): 重构地图控制器代码结构并添加注释

- 为EnterMap、LeaveMap、GetMapPlayerList等方法添加中文注释
- 统一地图相关的命名规范,如enter
2026-04-01 20:10:29 +08:00

58 lines
1.4 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 (
TableNameMapNode = "config_map_node"
)
const (
MapNodeTypeBoss = 1
MapNodeTypeNPC = 2
MapNodeTypeScene = 3
MapNodeTypePortal = 4
)
// MapNode stores map node config used by the existing boss/node flow.
type MapNode struct {
*BaseConfig
*Event
MapID int32 `gorm:"not null;index;comment:'所属地图ID'" json:"map_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:"节点名称"`
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"`
IsBroadcast uint32 `gorm:"type:int;default:0;comment:'广播模型ID(0表示不广播)'" json:"is_broadcast"`
TriggerPlotID uint32 `gorm:"default:0;comment:'触发剧情ID0表示无剧情'" json:"trigger_plot_id" description:"触发剧情ID"`
BossIds []uint32 `gorm:"type:jsonb;comment:'塔层BOSS ID列表'" json:"boss_ids"`
}
func (*MapNode) TableName() string {
return TableNameMapNode
}
func (*MapNode) GroupName() string {
return "default"
}
func NewMapNode() *MapNode {
return &MapNode{
BaseConfig: NewBaseConfig(),
Event: &Event{},
}
}
func init() {
cool.CreateTable(&MapConfig{})
cool.CreateTable(&MapNode{})
}