refactor(fight/xmlres): 重构效果参数处理逻辑,新增JSON解析支持并优化战斗伤害计算
This commit is contained in:
21
common/data/xmlres/effectarg.go
Normal file
21
common/data/xmlres/effectarg.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package xmlres
|
||||
|
||||
type EffectArg struct {
|
||||
SideEffects struct {
|
||||
SideEffect []struct {
|
||||
ID int `json:"ID"`
|
||||
SideEffectArgcount int `json:"SideEffectArgcount"`
|
||||
SideEffectArg string `json:"SideEffectArg,omitempty"`
|
||||
} `json:"SideEffect"`
|
||||
} `json:"SideEffects"`
|
||||
}
|
||||
|
||||
var EffectArgs map[int]int
|
||||
|
||||
func init() {
|
||||
EffectArgs = make(map[int]int)
|
||||
for _, t := range EffectArgsConfig.SideEffects.SideEffect {
|
||||
EffectArgs[t.ID] = t.SideEffectArgcount
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user