diff --git a/src/ship/packet/handler/message.rs b/src/ship/packet/handler/message.rs index 0bfc4ac..79ceaa5 100644 --- a/src/ship/packet/handler/message.rs +++ b/src/ship/packet/handler/message.rs @@ -316,7 +316,12 @@ where EG: EntityGateway { let client = clients.get(&id).ok_or(ShipError::ClientNotFound(id))?; - let equip_slot = ((pkt.sub_menu & 0x7) - 1) % 4; + let equip_slot = if pkt.sub_menu > 0 { + ((pkt.sub_menu & 0x7) - 1) % 4 + } + else { + 0 + }; item_manager.player_equips_item(entity_gateway, &client.character, ClientItemId(pkt.item_id), equip_slot).await?; Ok(Box::new(None.into_iter())) }