InventoryType - jimdroberts/FishMMO GitHub Wiki
Specifies the types of inventories available to a character, used for item management and slot operations.
-
Inventory
The main inventory for storing general items.
-
Equipment
The equipment inventory for storing equipped items (e.g., armor, weapons).
-
Bank
The bank inventory for storing items in a bank or safe location.
- Use the InventoryType enum to specify the type of inventory when performing item management or slot operations.
- Integrate InventoryType with inventory, equipment, and bank systems as needed.
// Example 1: Checking inventory type before performing an operation
InventoryType type = InventoryType.Equipment;
if (type == InventoryType.Equipment) {
// Perform equipment-specific logic
}
// Example 2: Switching behavior based on inventory type
switch (type) {
case InventoryType.Inventory:
// Handle general inventory logic
break;
case InventoryType.Equipment:
// Handle equipment logic
break;
case InventoryType.Bank:
// Handle bank logic
break;
}
- Always use InventoryType to clearly distinguish between inventory, equipment, and bank operations.
- Document any custom inventory types if you extend the enum.
- Use descriptive comments for each enum value to aid maintainability.