feat(fight): 新增疲惫状态并优化睡眠状态机制 - 实现疲惫状态(StatusTired),仅限制攻击技能,允许属性技能正常使用 - 重构睡眠状态,改为在被攻击且未miss时立即解除,而非技能使用后 - 修复寄生种子效果触发时机,改为回合开始时触发 - 调整寄生效果的目标为技能施放者而非对手 fix(fight): 修正战斗回合逻辑和技能持续时间处理 - 修复Effect2194中状态添加函数调用,使用带时间参数的版本 - 修正Effect13中技能持续时间计算,避免额外减1的问题 - 优化回合处理逻辑,当双方都未出手时跳过动作阶段 refactor(cdk): 重构CDK配置结构和服务器冠名功能 - 将CDKConfig中的CDKType字段重命名为Type以符合GORM映射 - 优化UseServerNamingCDK方法的上下文处理逻辑 - 修复服务器冠名CDK使用时的类型检查条件 feat(player): 完善宠物经验系统和CDK兑换功能 - 增强AddPetExp方法,处理宠物等级达到100级的情况 - 添加查询当前账号有效期内服务器冠名信息的API接口 - 实现服务器服务相关的数据模型和查询方法 fix(task): 任务查询支持启用和未启用状态 - 修改任务服务中的Get、GetDaily、GetWeek方法 - 当启用状态下无结果时,自动查询未启用状态的任务配置 ```
This commit is contained in:
@@ -23,16 +23,16 @@ type ServerService struct {
|
||||
}
|
||||
|
||||
type ServerShowInfo struct {
|
||||
OnlineID uint32 `json:"online_id"`
|
||||
Name string `json:"name"`
|
||||
IP string `json:"ip"`
|
||||
Port uint32 `json:"port"`
|
||||
IsVip uint32 `json:"is_vip"`
|
||||
IsDebug uint8 `json:"is_debug"`
|
||||
IsOpen uint8 `json:"is_open"`
|
||||
Owner uint32 `json:"owner"`
|
||||
ExpireTime time.Time `json:"expire_time"`
|
||||
ServerShow *model.ServerShow `json:"servershow,omitempty"`
|
||||
OnlineID uint32 `json:"online_id"`
|
||||
Name string `json:"name"`
|
||||
IP string `json:"ip"`
|
||||
Port uint32 `json:"port"`
|
||||
IsVip uint32 `json:"is_vip"`
|
||||
IsDebug uint8 `json:"is_debug"`
|
||||
IsOpen uint8 `json:"is_open"`
|
||||
//Owner uint32 `json:"owner"`
|
||||
// ExpireTime time.Time `json:"expire_time"`
|
||||
// ServerShow *model.ServerShow `json:"servershow,omitempty"`
|
||||
}
|
||||
|
||||
type DonationOwnedServerInfo struct {
|
||||
@@ -112,29 +112,33 @@ func (s *ServerService) GetPort(DepartmentID uint) []ServerShowInfo {
|
||||
continue
|
||||
}
|
||||
items = append(items, ServerShowInfo{
|
||||
OnlineID: server.OnlineID,
|
||||
Name: server.Name,
|
||||
IP: server.IP,
|
||||
Port: server.Port,
|
||||
IsVip: server.IsVip,
|
||||
IsDebug: server.IsDebug,
|
||||
IsOpen: server.IsOpen,
|
||||
Owner: 0,
|
||||
ExpireTime: time.Time{},
|
||||
OnlineID: server.OnlineID,
|
||||
Name: server.Name,
|
||||
IP: server.IP,
|
||||
Port: server.Port,
|
||||
IsVip: server.IsVip,
|
||||
IsDebug: server.IsDebug,
|
||||
IsOpen: server.IsOpen,
|
||||
//Owner: 0,
|
||||
// ExpireTime: time.Time{},
|
||||
})
|
||||
for i := range showMap[server.OnlineID] {
|
||||
show := &showMap[server.OnlineID][i]
|
||||
itemOnlineID := server.OnlineID
|
||||
if show.ID > 0 {
|
||||
itemOnlineID = uint32(show.ID)
|
||||
}
|
||||
item := ServerShowInfo{
|
||||
OnlineID: server.OnlineID,
|
||||
Name: server.Name,
|
||||
IP: server.IP,
|
||||
Port: server.Port,
|
||||
IsVip: server.IsVip,
|
||||
IsDebug: server.IsDebug,
|
||||
IsOpen: server.IsOpen,
|
||||
Owner: show.Owner,
|
||||
ExpireTime: show.ExpireTime,
|
||||
ServerShow: show,
|
||||
OnlineID: itemOnlineID,
|
||||
Name: server.Name,
|
||||
IP: server.IP,
|
||||
Port: server.Port,
|
||||
IsVip: server.IsVip,
|
||||
IsDebug: server.IsDebug,
|
||||
IsOpen: server.IsOpen,
|
||||
|
||||
// ExpireTime: show.ExpireTime,
|
||||
// ServerShow: show,
|
||||
}
|
||||
if show.Name != "" {
|
||||
item.Name = show.Name
|
||||
|
||||
Reference in New Issue
Block a user