|
|
@ -81,7 +81,7 @@ async fn test_character_levels_up() { |
|
|
|
last_hitter: 1,
|
|
|
|
})))).await.unwrap();
|
|
|
|
|
|
|
|
assert!(matches!(levelup_pkt[1].1, SendShipPacket::Message(Message {msg: GameMessage::PlayerLevelUp(PlayerLevelUp {lvl: 2, ..})})));
|
|
|
|
assert!(matches!(levelup_pkt[1].1, SendShipPacket::Message(Message {msg: GameMessage::PlayerLevelUp(PlayerLevelUp {lvl: 1, ..})})));
|
|
|
|
|
|
|
|
let leveltable = CharacterLevelTable::default();
|
|
|
|
ship.clients.with(ClientId(1), |client| Box::pin(async move {
|
|
|
@ -118,7 +118,7 @@ async fn test_character_levels_up_multiple_times() { |
|
|
|
last_hitter: 1,
|
|
|
|
})))).await.unwrap();
|
|
|
|
|
|
|
|
assert!(matches!(levelup_pkt[1].1, SendShipPacket::Message(Message {msg: GameMessage::PlayerLevelUp(PlayerLevelUp {lvl: 8, ..})})));
|
|
|
|
assert!(matches!(levelup_pkt[1].1, SendShipPacket::Message(Message {msg: GameMessage::PlayerLevelUp(PlayerLevelUp {lvl: 7, ..})})));
|
|
|
|
|
|
|
|
ship.clients.with(ClientId(1), |client| Box::pin(async move {
|
|
|
|
assert!(3000 == client.character.exp);
|
|
|
|