|
@ -352,8 +352,8 @@ impl EntityGateway for InMemoryGateway { |
|
|
|
|
|
|
|
|
async fn set_character_exp(&mut self, char_id: &CharacterEntityId, exp: u32) -> Result<(), GatewayError> {
|
|
|
async fn set_character_exp(&mut self, char_id: &CharacterEntityId, exp: u32) -> Result<(), GatewayError> {
|
|
|
let mut chars = self.characters.lock().unwrap();
|
|
|
let mut chars = self.characters.lock().unwrap();
|
|
|
if let Some(coolhumar) = chars.get_mut(char_id) {
|
|
|
|
|
|
coolhumar.exp = exp;
|
|
|
|
|
|
|
|
|
if let Some(character) = chars.get_mut(char_id) {
|
|
|
|
|
|
character.exp = exp;
|
|
|
Ok(())
|
|
|
Ok(())
|
|
|
} else {
|
|
|
} else {
|
|
|
Err(GatewayError::Error)
|
|
|
Err(GatewayError::Error)
|
|
|