mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-19 19:06:45 -05:00
9e58b134e5
* Refactored animation mode enum * More d2enum changes * Refactored tile enum * Refactored weapon class enum * Refactored more enums * Refactored item event enum * Fixed init_functions animation mode * Removed string2enum from MonsterAnimationMode * Refactored ItemStatCost description * Last enum lint errors * Regenerated monster stringer file
41 lines
923 B
Go
41 lines
923 B
Go
// Code generated by "string2enum -samepkg -linecomment -type ObjectAnimationMode -output object_animation_mode_string2enum.go"; DO NOT EDIT.
|
|
|
|
package d2enum
|
|
|
|
import "fmt"
|
|
|
|
// ObjectAnimationModeFromString returns the ObjectAnimationMode enum corresponding to s.
|
|
func ObjectAnimationModeFromString(s string) ObjectAnimationMode {
|
|
if len(s) == 0 {
|
|
return 0
|
|
}
|
|
for i := range _ObjectAnimationMode_index[:len(_ObjectAnimationMode_index)-1] {
|
|
if s == _ObjectAnimationMode_name[_ObjectAnimationMode_index[i]:_ObjectAnimationMode_index[i+1]] {
|
|
return ObjectAnimationMode(i)
|
|
}
|
|
}
|
|
panic(fmt.Errorf("unable to locate ObjectAnimationMode enum corresponding to %q", s))
|
|
}
|
|
|
|
func _(s string) {
|
|
// Check for duplicate string values in type "ObjectAnimationMode".
|
|
switch s {
|
|
// 0
|
|
case "NU":
|
|
// 1
|
|
case "OP":
|
|
// 2
|
|
case "ON":
|
|
// 3
|
|
case "S1":
|
|
// 4
|
|
case "S2":
|
|
// 5
|
|
case "S3":
|
|
// 6
|
|
case "S4":
|
|
// 7
|
|
case "S5":
|
|
}
|
|
}
|