diff --git a/src/ship/items/bank.rs b/src/ship/items/bank.rs index c9d280a..2bbe097 100644 --- a/src/ship/items/bank.rs +++ b/src/ship/items/bank.rs @@ -5,7 +5,6 @@ use crate::entity::item::tool::Tool; use crate::ship::items::inventory::{InventoryItemHandle, InventoryItem}; const BANK_CAPACITY: usize = 200; -// const BANK_MESETA_CAPACITY: u32 = 999999; compiler error: private module #[derive(Debug, Clone)] pub struct IndividualBankItem { diff --git a/src/ship/items/inventory.rs b/src/ship/items/inventory.rs index 52d1d79..6360037 100644 --- a/src/ship/items/inventory.rs +++ b/src/ship/items/inventory.rs @@ -8,7 +8,6 @@ use crate::ship::items::{ClientItemId, BankItem, BankItemHandle}; use crate::ship::items::floor::{IndividualFloorItem, StackedFloorItem}; const INVENTORY_CAPACITY: usize = 30; -// const INVENTORY_MESETA_CAPACITY: u32 = 999999; // compiler error: private module #[derive(Debug, Clone)] diff --git a/src/ship/packet/handler/direct_message.rs b/src/ship/packet/handler/direct_message.rs index 2ff98b3..7513838 100644 --- a/src/ship/packet/handler/direct_message.rs +++ b/src/ship/packet/handler/direct_message.rs @@ -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(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 {