Item refactor and more (#1)

This commit is contained in:
Héctor Giménez
2023-08-18 22:33:54 +09:00
committed by GitHub
parent 9a3b131826
commit 1c8aab1580
13 changed files with 213 additions and 64 deletions

18
pkg/data/item/location.go Normal file
View File

@@ -0,0 +1,18 @@
package item
type Location string
const (
LocationEquipped Location = "equipped"
LocationStash Location = "stash"
LocationSharedStash1 Location = "shared_stash_1"
LocationSharedStash2 Location = "shared_stash_2"
LocationSharedStash3 Location = "shared_stash_3"
LocationBelt Location = "belt"
LocationInventory Location = "inventory"
LocationCube Location = "cube"
LocationVendor Location = "vendor"
LocationGround Location = "ground"
LocationSocket Location = "socket"
LocationUnknown Location = "unknown"
)

View File

@@ -41,6 +41,26 @@ var typeMapping = map[string][]string{
"voodooheads": {"PreservedHead", "ZombieHead", "UnravellerHead", "GargoyleHead", "DemonHeadShield", "MummifiedTrophy", "FetishTrophy", "SextonTrophy", "CantorTrophy", "HierophantTrophy", "MinionSkull", "HellspawnSkull", "OverseerSkull", "SuccubusSkull", "BloodlordSkull"},
}
var QuestItems = []string{
"TheGidbinn",
"WirtsLeg",
"HoradricMalus",
"HellforgeHammer",
"HoradricStaff",
"StaffOfKings",
"KhalimsFlail",
"AmuletOfTheViper",
"KhalimsEye",
"KhalimsHeart",
"KhalimsBrain",
"KhalimsWill",
"ScrollOfInifuss",
"HoradricCube",
"HoradricScroll",
"MephistosSoulstone",
"BookOfSkill",
}
func TypeForItemName(itemName string) (string, bool) {
for t, itemNames := range typeMapping {
for _, name := range itemNames {