|
@ -183,10 +183,8 @@ impl Inventory { |
|
|
self.0.iter()
|
|
|
self.0.iter()
|
|
|
.enumerate()
|
|
|
.enumerate()
|
|
|
.fold([InventoryItem::default(); 30], |mut inventory, (index, item)| {
|
|
|
.fold([InventoryItem::default(); 30], |mut inventory, (index, item)| {
|
|
|
log::warn!("inv item: {:?}", item);
|
|
|
|
|
|
if let Some(i) = item {
|
|
|
if let Some(i) = item {
|
|
|
let bytes = i.item.as_bytes();
|
|
|
let bytes = i.item.as_bytes();
|
|
|
log::warn!("inv item bytes:{:?} ", bytes);
|
|
|
|
|
|
inventory[index].data1.copy_from_slice(&bytes[0..12]);
|
|
|
inventory[index].data1.copy_from_slice(&bytes[0..12]);
|
|
|
inventory[index].item_id = i.id.0;
|
|
|
inventory[index].item_id = i.id.0;
|
|
|
|
|
|
|
|
|