1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-17 18:06:03 -05:00
OpenDiablo2/d2common/d2enum/weapon_class_string.go
Intyre 9e58b134e5
Refactored d2enum (#567)
* 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
2020-07-09 23:12:28 -04:00

38 lines
1.2 KiB
Go

// Code generated by "stringer -linecomment -type WeaponClass -output weapon_class_string.go"; DO NOT EDIT.
package d2enum
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[WeaponClassNone-0]
_ = x[WeaponClassHandToHand-1]
_ = x[WeaponClassBow-2]
_ = x[WeaponClassOneHandSwing-3]
_ = x[WeaponClassOneHandThrust-4]
_ = x[WeaponClassStaff-5]
_ = x[WeaponClassTwoHandSwing-6]
_ = x[WeaponClassTwoHandThrust-7]
_ = x[WeaponClassCrossbow-8]
_ = x[WeaponClassLeftJabRightSwing-9]
_ = x[WeaponClassLeftJabRightThrust-10]
_ = x[WeaponClassLeftSwingRightSwing-11]
_ = x[WeaponClassLeftSwingRightThrust-12]
_ = x[WeaponClassOneHandToHand-13]
_ = x[WeaponClassTwoHandToHand-14]
}
const _WeaponClass_name = "hthbow1hs1htstf2hs2htxbw1js1jt1ss1stht1ht2"
var _WeaponClass_index = [...]uint8{0, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42}
func (i WeaponClass) String() string {
if i < 0 || i >= WeaponClass(len(_WeaponClass_index)-1) {
return "WeaponClass(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _WeaponClass_name[_WeaponClass_index[i]:_WeaponClass_index[i+1]]
}