技能实现
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user