fix equipping bought weapon
This commit is contained in:
parent
6e2fab31f0
commit
8fae8d11af
@ -316,7 +316,12 @@ where
|
|||||||
EG: EntityGateway
|
EG: EntityGateway
|
||||||
{
|
{
|
||||||
let client = clients.get(&id).ok_or(ShipError::ClientNotFound(id))?;
|
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?;
|
item_manager.player_equips_item(entity_gateway, &client.character, ClientItemId(pkt.item_id), equip_slot).await?;
|
||||||
Ok(Box::new(None.into_iter()))
|
Ok(Box::new(None.into_iter()))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user