All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
fix(fight): 修复单输入战斗中效果处理逻辑错误 - 在Effect201的OnSkill方法中调整了多输入战斗检查的位置, 确保单输入战斗中的单目标效果被正确忽略 - 添加了针对单输入战斗中单目标效果的测试用例 - 移除了重复的多输入战斗检查代码 feat(fight): 添加战斗初始化时捕获标识设置功能 - 在initfightready函数中添加对CanCapture字段的处理 将玩家的捕获能力信息传递到战斗准备信息中 - 在ReadyFightPetInfo结构体中添加IsCapture字段用于 标识宠物是否为捕获类型 refactor(fight): 调整战斗初始化顺序确保数据一致性 - 将ReadyInfo初始化移到绑定输入上下文之后执行 确保团队视图链接完成后再进行准备信息构建 fix(player): 增加宠物血量检查避免无效匹配 - 在玩家匹配检测中增加首只宠物血量检查 当首只宠物血量为0时不参与匹配以防止异常情况 ```
40 lines
1.0 KiB
Go
40 lines
1.0 KiB
Go
package model
|
|
|
|
import (
|
|
"blazing/cool"
|
|
"time"
|
|
)
|
|
|
|
const TableNameServerShow = "server_show"
|
|
|
|
// ServerShow 绑定服务器展示信息(冠名、属主、到期时间)。
|
|
type ServerShow struct {
|
|
*cool.Model
|
|
ServerID uint32 `gorm:"column:server_id;comment:'服务器ID';index:idx_server_show_server_id;uniqueIndex:idx_server_show_server_owner" json:"server_id"`
|
|
Name string `gorm:"comment:'服务器展示名'" json:"name"`
|
|
Owner uint32 `gorm:"comment:'服务器属主';uniqueIndex:idx_server_show_server_owner" json:"owner"`
|
|
ExpireTime time.Time `gorm:"column:expire_time;default:0;comment:'展示到期时间'" json:"expire_time"`
|
|
}
|
|
|
|
// TableName ServerShow's table name
|
|
func (*ServerShow) TableName() string {
|
|
return TableNameServerShow
|
|
}
|
|
|
|
// GroupName ServerShow's table group
|
|
func (*ServerShow) GroupName() string {
|
|
return "default"
|
|
}
|
|
|
|
// NewServerShow create a new ServerShow
|
|
func NewServerShow() *ServerShow {
|
|
return &ServerShow{
|
|
Model: cool.NewModel(),
|
|
}
|
|
}
|
|
|
|
// init 创建表
|
|
func init() {
|
|
cool.CreateTable(&ServerShow{})
|
|
}
|