feat(boss): 添加伤害值检查避免除零错误

当己方总伤害为零时直接返回,防止在技能计算中出现除零情况,
确保战斗系统的稳定性。

fix(login): 修复登录流程中的数据赋值问题

在用户登录成功后正确设置头像URL,确保用户信息完整。
```
This commit is contained in:
昔念
2026-01-28 22:24:18 +08:00
parent 5bdb896cea
commit 86e07e94b2
2 changed files with 4 additions and 0 deletions

View File

@@ -20,6 +20,9 @@ func (e *NewSel700) SkillUseed() bool {
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().Our.SumDamage == alpacadecimal.Zero {
return true
}
e.Input.Heal(
e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Mul(e.Args()[0].Div(alpacadecimal.NewFromInt(100))),

View File

@@ -93,6 +93,7 @@ func (s *BaseSysLoginService) Login(ctx context.Context, req *v1.BaseOpenLoginRe
err = gerror.New("账户被封禁~")
return
}
user.HeadImg = &userInfo.Data.Attributes.AvatarUrl
var ttt = *user.PasswordV + 1
user.PasswordV = &ttt