1
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
昔念
2026-04-20 01:02:57 +08:00
parent 04038cd16b
commit d517c822ef
3 changed files with 9 additions and 9 deletions

View File

@@ -28,7 +28,7 @@ type PetBaseConfig struct {
Nature int32 `gorm:"not null;default:0;comment:'BOSS属性-性格'" json:"nature"`
Effect []uint32 `gorm:"type:jsonb;not null;default:'[]';comment:'BOSS特性'" json:"effect"`
Lv int32 `gorm:"not null;comment:'BOSS等级LvHpMatchUser非0时此配置无效'" json:"lv"`
Color string `gorm:"comment:'BOSS颜色'" json:"color"`
ColorID uint32 `gorm:"not null;default:0;comment:'BOSS颜色配置ID'" json:"color_id"`
Skin int32 `gorm:"not null;default:0;comment:'BOSS皮肤ID'" json:"skin"`
Hp int32 `gorm:"comment:'BOSS血量值LvHpMatchUser非0时此配置无效'" json:"hp"`

View File

@@ -2,6 +2,7 @@ package model
import (
"blazing/cool"
"context"
"encoding/json"
"fmt"
"strings"
@@ -161,8 +162,9 @@ func bindBossScriptFunctions(vm *goja.Runtime, hookAction any) {
})
_ = vm.Set("debug", func(call goja.FunctionCall) goja.Value {
logCtx := context.Background()
if len(call.Arguments) == 0 {
g.Log().Debugf(ctx, "[boss-script] debug() called with no arguments")
g.Log().Debugf(logCtx, "[boss-script] debug() called with no arguments")
return goja.Undefined()
}
@@ -176,7 +178,7 @@ func bindBossScriptFunctions(vm *goja.Runtime, hookAction any) {
parts = append(parts, arg.String())
}
g.Log().Debugf(ctx, "[boss-script] %s", strings.Join(parts, " "))
g.Log().Debugf(logCtx, "[boss-script] %s", strings.Join(parts, " "))
return goja.Undefined()
})
}