lint src/ship/packet/builder/*
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3cf834ed55
commit
60bcfd78ec
@ -18,7 +18,7 @@ pub fn join_lobby(id: ClientId,
|
||||
let playerinfo = lobby_clients.iter()
|
||||
.map(|area_client| {
|
||||
let client = clients.get(&area_client.client).ok_or(ShipError::ClientNotFound(area_client.client)).unwrap();
|
||||
player_info(0x100, &client, area_client, item_manager, level_table)
|
||||
player_info(0x100, client, area_client, item_manager, level_table)
|
||||
});
|
||||
|
||||
let client = clients.get(&id).ok_or(ShipError::ClientNotFound(id)).unwrap();
|
||||
@ -55,7 +55,7 @@ pub fn add_to_lobby(id: ClientId,
|
||||
block: client.block as u16,
|
||||
event: 0,
|
||||
padding: 0,
|
||||
playerinfo: player_info(0x100, &client, &area_client, item_manager, level_table),
|
||||
playerinfo: player_info(0x100, client, &area_client, item_manager, level_table),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -142,8 +142,8 @@ pub fn player_no_longer_has_item(area_client: AreaClient, item_id: ClientItemId,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn shop_list<I: ShopItem>(shop_type: u8, items: &Vec<I>) -> ShopList {
|
||||
let items = items.into_iter()
|
||||
pub fn shop_list<I: ShopItem>(shop_type: u8, items: &[I]) -> ShopList {
|
||||
let items = items.iter()
|
||||
.enumerate()
|
||||
.map(|(i, item)| {
|
||||
ShopListItem {
|
||||
|
@ -22,7 +22,7 @@ pub fn quest_category_list(quests: &QuestList) -> QuestCategoryList {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn quest_list(category_id: u32, quests: &Vec<Quest>) -> QuestOptionList {
|
||||
pub fn quest_list(category_id: u32, quests: &[Quest]) -> QuestOptionList {
|
||||
let quest_entries = quests.iter()
|
||||
.map(|quest| {
|
||||
QuestEntry {
|
||||
|
@ -20,7 +20,7 @@ pub fn join_room(id: ClientId,
|
||||
let header_client = clients.get(&c.client).ok_or(ShipError::ClientNotFound(id))?;
|
||||
let header_area_client = client_location.get_local_client(id).map_err(|err| -> ClientLocationError { err.into() })?;
|
||||
acc.map(|mut a| {
|
||||
a[i] = player_header(0x10000, &header_client, &header_area_client);
|
||||
a[i] = player_header(0x10000, header_client, &header_area_client);
|
||||
a
|
||||
})
|
||||
})?;
|
||||
@ -67,7 +67,7 @@ pub fn add_to_room(_id: ClientId,
|
||||
block: 0,
|
||||
event: 0,
|
||||
padding: 0,
|
||||
playerinfo: player_info(0x10000, client, &area_client, item_manager, level_table),
|
||||
playerinfo: player_info(0x10000, client, area_client, item_manager, level_table),
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user