|
|
@ -7,8 +7,6 @@ use crate::ship::ship::{SendShipPacket, ShipError, Clients, Rooms, ItemShops}; |
|
|
|
use crate::ship::location::{ClientLocation, ClientLocationError};
|
|
|
|
use crate::ship::drops::ItemDrop;
|
|
|
|
use crate::ship::items::{ItemManager, ClientItemId, TriggerCreateItem, FloorItem};
|
|
|
|
// use crate::ship::items::bank::{BANK_MESETA_CAPACITY}; // compiler error: private module
|
|
|
|
// use crate::ship::items::inventory::{INVENTORY_MESETA_CAPACITY}; // compiler error: private module
|
|
|
|
use crate::entity::gateway::EntityGateway;
|
|
|
|
use libpso::utf8_to_utf16_array;
|
|
|
|
use crate::ship::packet::builder;
|
|
|
@ -222,7 +220,6 @@ pub async fn send_bank_list(id: ClientId, |
|
|
|
Ok(Box::new(vec![(id, SendShipPacket::BankItemList(bank_items_pkt))].into_iter()))
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: error if too much money is deposited/withdrawn
|
|
|
|
pub async fn bank_interaction<EG>(id: ClientId,
|
|
|
|
bank_interaction: &BankInteraction,
|
|
|
|
entity_gateway: &mut EG,
|
|
|
@ -243,7 +240,7 @@ where |
|
|
|
client.character.meseta -= bank_interaction.meseta_amount;
|
|
|
|
client.character.bank_meseta += bank_interaction.meseta_amount;
|
|
|
|
entity_gateway.save_character(&client.character).await?;
|
|
|
|
} /* else {error deposited too much money} */
|
|
|
|
}
|
|
|
|
Vec::new()
|
|
|
|
}
|
|
|
|
else {
|
|
|
@ -258,7 +255,7 @@ where |
|
|
|
client.character.meseta += bank_interaction.meseta_amount;
|
|
|
|
client.character.bank_meseta -= bank_interaction.meseta_amount;
|
|
|
|
entity_gateway.save_character(&client.character).await?;
|
|
|
|
} /* else {error withdrew too much money} */
|
|
|
|
}
|
|
|
|
Vec::new()
|
|
|
|
}
|
|
|
|
else {
|
|
|
|