feat(fight): 新增疲惫状态并优化睡眠状态机制 - 实现疲惫状态(StatusTired),仅限制攻击技能,允许属性技能正常使用 - 重构睡眠状态,改为在被攻击且未miss时立即解除,而非技能使用后 - 修复寄生种子效果触发时机,改为回合开始时触发 - 调整寄生效果的目标为技能施放者而非
This commit is contained in:
@@ -31,6 +31,10 @@ type DonationServerListReq struct {
|
||||
g.Meta `path:"/donation/serverIds" method:"GET"`
|
||||
}
|
||||
|
||||
type DonationCurrentReq struct {
|
||||
g.Meta `path:"/donation/current" method:"GET"`
|
||||
}
|
||||
|
||||
type DonationServerInfoReq struct {
|
||||
g.Meta `path:"/donation/serverInfo" method:"GET"`
|
||||
ServerID uint32 `json:"server_id" v:"required|min:1#服务器ID不能为空|服务器ID非法"`
|
||||
@@ -68,6 +72,18 @@ func (c *CdkController) DonationServerIDs(ctx context.Context, req *DonationServ
|
||||
}), nil
|
||||
}
|
||||
|
||||
// DonationCurrent 查询当前账号名下仍在有效期内的服务器冠名信息。
|
||||
func (c *CdkController) DonationCurrent(ctx context.Context, req *DonationCurrentReq) (res *cool.BaseRes, err error) {
|
||||
admin := cool.GetAdmin(ctx)
|
||||
if admin == nil || admin.UserId == 0 {
|
||||
return cool.Fail("未登录或登录已失效"), nil
|
||||
}
|
||||
|
||||
return cool.Ok(g.Map{
|
||||
"list": configservice.NewServerService().GetOwnerActiveDonationServers(uint32(admin.UserId)),
|
||||
}), nil
|
||||
}
|
||||
|
||||
// DonationServerInfo 查询冠名兑换前展示的服务器名称与备注。
|
||||
func (c *CdkController) DonationServerInfo(ctx context.Context, req *DonationServerInfoReq) (res *cool.BaseRes, err error) {
|
||||
if err = g.Validator().Data(req).Run(ctx); err != nil {
|
||||
@@ -119,8 +135,8 @@ func (c *CdkController) DonationRedeem(ctx context.Context, req *DonationRedeemR
|
||||
if cdkInfo == nil {
|
||||
return cool.Fail("CDK不存在或已被使用"), nil
|
||||
}
|
||||
if cdkInfo.CDKType != configservice.CDKTypeServerNaming {
|
||||
return cool.Fail("CDK类型不匹配"), nil
|
||||
if cdkInfo.Type != configservice.CDKTypeServerNaming {
|
||||
return cool.Fail("当前页面仅支持服务器冠名CDK,请确认输入的是服务器冠名类型"), nil
|
||||
}
|
||||
if cdkInfo.BindUserId != 0 && cdkInfo.BindUserId != ownerID {
|
||||
return cool.Fail("CDK已绑定其他用户"), nil
|
||||
|
||||
Reference in New Issue
Block a user