// Manually edited to remove duplicate // If you generate it again you need fix it up // Code generated by "string2enum -samepkg -linecomment -type MonsterAnimationMode ."; DO NOT EDIT. package d2enum import "fmt" // MonsterAnimationModeFromString returns the MonsterAnimationMode enum corresponding to s. func MonsterAnimationModeFromString(s string) MonsterAnimationMode { if len(s) == 0 { return 0 } for i := range _MonsterAnimationMode_index[:len(_MonsterAnimationMode_index)-1] { if s == _MonsterAnimationMode_name[_MonsterAnimationMode_index[i]:_MonsterAnimationMode_index[i+1]] { return MonsterAnimationMode(i) } } panic(fmt.Errorf("unable to locate MonsterAnimationMode enum corresponding to %q", s)) } func _(s string) { // Check for duplicate string values in type "MonsterAnimationMode". switch s { // 0 case "DT": // 1 case "NU": // 2 case "WL": // 3 case "GH": // 4 case "A1": // 5 case "A2": // 6 case "BL": // 7 case "SC": // 8 case "S1": // 9 case "S2": // 10 case "S3": // 11 case "S4": // 12 case "DD": // 14 case "xx": // 15 case "RN": } }