mirror of
https://github.com/redstrate/Kawari.git
synced 2025-07-09 15:37:45 +00:00
Move it to a constant, and remove redundant comment
This commit is contained in:
parent
5284801554
commit
fde43a560d
2 changed files with 6 additions and 2 deletions
|
@ -21,6 +21,8 @@ pub use storage::{ContainerType, Storage};
|
|||
mod currency;
|
||||
pub use currency::CurrencyStorage;
|
||||
|
||||
use crate::INVENTORY_ACTION_DISCARD;
|
||||
|
||||
const MAX_NORMAL_STORAGE: usize = 35;
|
||||
const MAX_LARGE_STORAGE: usize = 50;
|
||||
|
||||
|
@ -164,8 +166,7 @@ impl Inventory {
|
|||
}
|
||||
|
||||
pub fn process_action(&mut self, action: &ItemOperation) {
|
||||
if action.operation_type == 145 {
|
||||
// discard
|
||||
if action.operation_type == INVENTORY_ACTION_DISCARD {
|
||||
let src_container = self.get_container_mut(&action.src_storage_id);
|
||||
let src_slot = src_container.get_slot_mut(action.src_container_index);
|
||||
*src_slot = Item::default();
|
||||
|
|
|
@ -75,3 +75,6 @@ pub const AETHERYTE_UNLOCK_BITMASK_SIZE: usize = 30;
|
|||
|
||||
/// The size of the completed quest bitmask.
|
||||
pub const COMPLETED_QUEST_BITMASK_SIZE: usize = 691;
|
||||
|
||||
/// The operation opcode/type when discarding an item from the inventory.
|
||||
pub const INVENTORY_ACTION_DISCARD: u8 = 145;
|
||||
|
|
Loading…
Add table
Reference in a new issue