mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-09-05 19:14:14 -04:00
* adding rules for swap files to .gitignore * main, d2common: load Magic/Rare/Unique Affix * d2common: item affixes only removed Rare/Unique Prefix/Suffix as those are related to monsters, not items. * removed debug print from item_affix.go * changed item affix type names for clarity, removed debug print from data_dictionary * d2common: item affix datadict and records Item Affixes are defined in `/data/global/excel/Magic{Prefix,Suffix}.txt` Rare and Unique Pre/Suffixes seem to be for monsters, not items. d2common: item affixes only removed Rare/Unique Prefix/Suffix as those are related to monsters, not items. removed debug print from item_affix.go changed item affix type names for clarity, removed debug print from data_dictionary * reverting to pre-allocating memory for parsing txt lines * removing the rest of the rare/unique definitions * removing the rest of the rare/unique definitions * adding ItemStatCost data dict loader
40 lines
1.4 KiB
Go
40 lines
1.4 KiB
Go
package d2enum
|
|
|
|
// used in ItemStatCost
|
|
type ItemEventType int
|
|
|
|
const (
|
|
HitByMissile = ItemEventType(iota) // hit By a Missile
|
|
DamagedInMelee // Damaged in Melee
|
|
DamagedByMissile // Damaged By Missile
|
|
AttackedInMelee // melee Attack atttempt
|
|
DoActive // do active state skill
|
|
DoMeleeDamage // do damage in melee
|
|
DoMissileDamage // do missile damage
|
|
DoMeleeAttack // do melee attack
|
|
DoMissileAttack // do missile attack
|
|
Kill // killed something
|
|
Killed // killed By something
|
|
AbsorbDamage // dealt damage
|
|
LevelUp // gain a level
|
|
)
|
|
|
|
func GetItemEventType(s string) ItemEventType {
|
|
strLookupTable := map[string]ItemEventType{
|
|
"HitByMissile": HitByMissile,
|
|
"DamagedInMelee": DamagedInMelee,
|
|
"DamagedByMissile": DamagedByMissile,
|
|
"AttackedInMelee": AttackedInMelee,
|
|
"DoActive": DoActive,
|
|
"DoMeleeDamage": DoMeleeDamage,
|
|
"DoMissileDamage": DoMissileDamage,
|
|
"DoMeleeAttack": DoMeleeAttack,
|
|
"DoMissileAttack": DoMissileAttack,
|
|
"Kill": Kill,
|
|
"Killed": Killed,
|
|
"AbsorbDamage": AbsorbDamage,
|
|
"LevelUp": LevelUp,
|
|
}
|
|
return strLookupTable[s]
|
|
}
|