I am dumb
This commit is contained in:
		
							parent
							
								
									6de3ee1cbf
								
							
						
					
					
						commit
						dffa636247
					
				| @ -494,6 +494,7 @@ fn equip_inventory_item(character_id: CharacterEntityId, item_id: ClientItemId, | ||||
|             let mut inventory = item_state.inventory(&character_id)?; | ||||
|             inventory.equip(&item_id, equip_slot); | ||||
|             transaction.gateway().set_character_equips(&character_id, &inventory.as_equipped_entity()).await?; | ||||
|             item_state.set_inventory(inventory); | ||||
| 
 | ||||
|             Ok(((item_state, transaction), ())) | ||||
|         }) | ||||
| @ -522,7 +523,6 @@ where | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| fn unequip_inventory_item(character_id: CharacterEntityId, item_id: ClientItemId) | ||||
|                           -> impl for<'a> Fn((ItemStateProxy<'a>, Box<dyn EntityGatewayTransaction + 'a>), ()) | ||||
|                                              -> Pin<Box<dyn Future<Output=Result<((ItemStateProxy<'a>, Box<dyn EntityGatewayTransaction + 'a>), ()), ItemStateError>> + Send + 'a>> | ||||
| @ -532,6 +532,7 @@ fn unequip_inventory_item(character_id: CharacterEntityId, item_id: ClientItemId | ||||
|             let mut inventory = item_state.inventory(&character_id)?; | ||||
|             inventory.unequip(&item_id); | ||||
|             transaction.gateway().set_character_equips(&character_id, &inventory.as_equipped_entity()).await?; | ||||
|             item_state.set_inventory(inventory); | ||||
| 
 | ||||
|             Ok(((item_state, transaction), ())) | ||||
|         }) | ||||
|  | ||||
| @ -47,8 +47,8 @@ async fn test_equip_unit_from_equip_menu() { | ||||
|         }).await.unwrap()); | ||||
| 
 | ||||
|     let equipped = item::EquippedEntity { | ||||
|         weapon: Some(p1_inv[0].id), | ||||
|         armor: None, | ||||
|         weapon: None, | ||||
|         armor: Some(p1_inv[0].id), | ||||
|         shield: None, | ||||
|         unit: [None; 4], | ||||
|         mag: None, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user