mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-04 17:02:26 +08:00
配置表访问接口化,简化常量访问
This commit is contained in:
26
common/constant/default_ability.go
Normal file
26
common/constant/default_ability.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package constant
|
||||
|
||||
import "hk4e/pkg/endec"
|
||||
|
||||
var (
|
||||
DEFAULT_ABILITY_STRINGS []string
|
||||
DEFAULT_ABILITY_HASHES []int32
|
||||
DEFAULT_ABILITY_NAME int32
|
||||
)
|
||||
|
||||
func init() {
|
||||
DEFAULT_ABILITY_STRINGS = []string{
|
||||
"Avatar_DefaultAbility_VisionReplaceDieInvincible",
|
||||
"Avatar_DefaultAbility_AvartarInShaderChange",
|
||||
"Avatar_SprintBS_Invincible",
|
||||
"Avatar_Freeze_Duration_Reducer",
|
||||
"Avatar_Attack_ReviveEnergy",
|
||||
"Avatar_Component_Initializer",
|
||||
"Avatar_FallAnthem_Achievement_Listener",
|
||||
}
|
||||
DEFAULT_ABILITY_HASHES = make([]int32, 0)
|
||||
for _, v := range DEFAULT_ABILITY_STRINGS {
|
||||
DEFAULT_ABILITY_HASHES = append(DEFAULT_ABILITY_HASHES, endec.Hk4eAbilityHashCode(v))
|
||||
}
|
||||
DEFAULT_ABILITY_NAME = endec.Hk4eAbilityHashCode("Default")
|
||||
}
|
||||
Reference in New Issue
Block a user