mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 23:44:52 +01:00
fix Warehouse Equipment dereference
This commit is contained in:
@@ -533,11 +533,11 @@ func handleMsgMhfUpdateWarehouse(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
oEquips := warehouseGetEquipment(s, pkt.BoxIndex)
|
oEquips := warehouseGetEquipment(s, pkt.BoxIndex)
|
||||||
for _, uEquip := range pkt.UpdatedEquipment {
|
for _, uEquip := range pkt.UpdatedEquipment {
|
||||||
exists := false
|
exists := false
|
||||||
for _, oEquip := range oEquips {
|
for i := range oEquips {
|
||||||
if oEquip.WarehouseID == uEquip.WarehouseID {
|
if oEquips[i].WarehouseID == uEquip.WarehouseID {
|
||||||
exists = true
|
exists = true
|
||||||
// Will set removed items to 0
|
// Will set removed items to 0
|
||||||
oEquip.ItemID = uEquip.ItemID
|
oEquips[i].ItemID = uEquip.ItemID
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user