Complete documentation for all 44 database handlers with centralized performance considerations
This commit is contained in:
1 parent
69aa91d403
commit
4f60b228d5
45 files changed
+11599
No files matched your search
+43
@@ -0,0 +1,43 @@
|
||||
# Boon Handler Documentation
|
||||
|
||||
## Overview
|
||||
This document describes the database relationships and interactions for the `dbBoonHandler` class. The boon system in Magicbane is used to manage item bonuses and enhancements that are associated with specific item bases.
|
||||
|
||||
## Handler Class
|
||||
**File:** `src/engine/db/handlers/dbBoonHandler.java`
|
||||
**Class:** `dbBoonHandler`
|
||||
**Extends:** `dbHandlerBase`
|
||||
|
||||
## Database Tables
|
||||
|
||||
### Main Boon Table
|
||||
- **Table Name:** `static_item_boons`
|
||||
- **Description:** Contains information about boons (bonuses/enhancements) that can be applied to item bases
|
||||
- **Columns:**
|
||||
- UID (Primary Key)
|
||||
- itemBaseID (Foreign Key to obj_itembase)
|
||||
- boonType
|
||||
- boonValue
|
||||
- boonLevel
|
||||
|
||||
## Key Queries
|
||||
|
||||
### Get Boon Amounts for Item Base
|
||||
```sql
|
||||
SELECT * FROM `static_item_boons` WHERE `itemBaseID` = ?
|
||||
```
|
||||
**File:** `dbBoonHandler.java`, Line ~28
|
||||
|
||||
## Relationships
|
||||
|
||||
1. **Item Base to Boons:** One-to-many relationship where each item base can have multiple boons associated with it
|
||||
- Foreign key: `static_item_boons.itemBaseID` references `obj_itembase.UID`
|
||||
|
||||
## Java Field to Database Column Mappings
|
||||
|
||||
| Java Field | Database Column | Notes |
|
||||
|------------|-----------------|-------|
|
||||
| `itemBaseID` | `static_item_boons.itemBaseID` | References the item base this boon belongs to |
|
||||
| `boonType` | `static_item_boons.boonType` | Type of boon (e.g., damage, defense) |
|
||||
| `boonValue` | `static_item_boons.boonValue` | Value of the boon |
|
||||
| `boonLevel` | `static_item_boons.boonLevel` | Level of the boon |
|
||||
Reference in new issue
Block a user