技能实现

This commit is contained in:
1
2025-10-05 07:13:43 +00:00
parent 4e2073e185
commit b93a4dd1a2
6 changed files with 12 additions and 31 deletions

View File

@@ -4,7 +4,6 @@ import (
"blazing/logic/service/fight/info"
"blazing/modules/blazing/model"
"reflect"
"github.com/brunoga/deep"
"github.com/tnnmigga/enum"
@@ -104,23 +103,6 @@ func (c *Input) GetCurrAttr(id int) *model.PetInfo {
//todo 获取后GetEffect
}
func getTypeName(v interface{}) string {
// 获取类型信息
t := reflect.TypeOf(v)
// 如果是指针类型,需要先获取其指向的元素类型
if t.Kind() == reflect.Ptr {
t = t.Elem()
}
// 如果是结构体类型,返回其名称
if t.Kind() == reflect.Struct {
return t.Name()
}
// 非结构体类型返回空或对应的类型名
return t.Kind().String()
}
func (c *Input) AddEffect(e *EffectID) {
if e.ID == 0 {