All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat(fight): 添加旧组队协议支持并优化战斗系统 - 实现了旧组队协议相关功能,包括GroupReadyFightFinish、GroupUseSkill、 GroupUseItem、GroupChangePet和GroupEscape方法 - 新增组队战斗相关的入站信息结构体定义 - 实现了组队BOSS战斗逻辑,添加groupBossSlotLimit常量 - 重构宠物技能设置逻辑,调整金币消耗时机 - 优化战斗循环逻辑,添加对无行动槽位的处理 - 改进AI行动逻辑,增加多位置目标选择
60 lines
1.6 KiB
Go
60 lines
1.6 KiB
Go
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"`
|
||
|
||
IsGroupBoss uint32 `gorm:"type:int;default:0;comment:'是否为组队Boss(0否1是)'" json:"is_group_boss" description:"是否为组队Boss"`
|
||
|
||
TriggerPlotID uint32 `gorm:"default:0;comment:'触发剧情ID(0表示无剧情)'" 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{})
|
||
}
|