1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-11 02:10:43 +00:00
OpenDiablo2/d2game/d2player/equipment_slot.go
Ripolak f729ff6101
Feature/load misc items (#424)
* Add InventoryItemMisc struct

* Add GetMiscItemByCode function

* Implement InventoryItem interface for InventoryItemMisc

* Add rings and amulets to the example items loading.

* Fix Y of LeftHand and RightHand equipment slots.

* Add "Ripolak" name to CONTRIBUTORS

* Remove double item
2020-06-23 15:28:03 -04:00

87 lines
1.3 KiB
Go

package d2player
import "github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
type EquipmentSlot struct {
item InventoryItem
x int
y int
width int
height int
}
func genEquipmentSlotsMap() map[d2enum.EquippedSlotType]EquipmentSlot {
return map[d2enum.EquippedSlotType]EquipmentSlot{
d2enum.LeftArm: {
item: nil,
x: 418,
y: 224,
width: 61,
height: 116,
},
d2enum.RightArm: {
item: nil,
x: 648,
y: 224,
width: 61,
height: 116,
},
d2enum.Head: {
item: nil,
x: 532,
y: 125,
width: 62,
height: 62,
},
d2enum.Neck: {
item: nil,
x: 604,
y: 125,
width: 32,
height: 32,
},
d2enum.Torso: {
item: nil,
x: 532,
y: 224,
width: 62,
height: 90,
},
d2enum.Belt: {
item: nil,
x: 533,
y: 269,
width: 62,
height: 32,
},
d2enum.LeftHand: {
item: nil,
x: 491,
y: 270,
width: 32,
height: 32,
},
d2enum.RightHand: {
item: nil,
x: 606,
y: 270,
width: 32,
height: 32,
},
d2enum.Gloves: {
item: nil,
x: 417,
y: 299,
width: 62,
height: 62,
},
d2enum.Legs: {
item: nil,
x: 648,
y: 299,
width: 62,
height: 62,
},
}
}