dbBaseClassHandler Documentation
Overview
The dbBaseClassHandler is responsible for managing base class data in the Magicbane database. Base classes represent fundamental character classifications that define core attributes and capabilities. This handler manages retrieval of base class information, including fetching specific base classes by ID, retrieving base classes associated with a particular race, and getting all available base classes.
Database Table Structure
Table: static_rune_baseclass
| Column Name |
Data Type |
Nullable |
Key |
Description |
| ID |
int unsigned |
NO |
PRIMARY |
Unique identifier for the base class |
| name |
varchar(45) |
NO |
|
Name of the base class |
| description |
varchar(200) |
NO |
|
Description of the base class |
| strMod |
tinyint |
NO |
|
Strength modifier for this base class |
| dexMod |
tinyint |
NO |
|
Dexterity modifier for this base class |
| conMod |
tinyint |
NO |
|
Constitution modifier for this base class |
| intMod |
tinyint |
NO |
|
Intelligence modifier for this base class |
| wisMod |
tinyint |
NO |
|
Wisdom modifier for this base class |
| chaMod |
tinyint |
NO |
|
Charisma modifier for this base class |
| healthMod |
tinyint |
NO |
|
Health modifier for this base class |
| manaMod |
tinyint |
NO |
|
Mana modifier for this base class |
| staminaMod |
tinyint |
NO |
|
Stamina modifier for this base class |
Table: static_rune_racebaseclass
| Column Name |
Data Type |
Nullable |
Key |
Description |
| ID |
int unsigned |
NO |
PRIMARY |
Unique identifier for the relationship |
| RaceID |
int unsigned |
NO |
FOREIGN KEY |
Reference to race in static_rune_race |
| BaseClassID |
int unsigned |
NO |
FOREIGN KEY |
Reference to base class in static_rune_baseclass |
Java Field to Database Column Mapping
| Java Field |
Database Column |
Type |
Description |
| baseClass.getId() |
ID |
int unsigned |
Base class unique identifier |
| baseClass.getName() |
name |
varchar(45) |
Base class name |
| baseClass.getDescription() |
description |
varchar(200) |
Base class description |
| baseClass.getStrMod() |
strMod |
tinyint |
Strength modifier |
| baseClass.getDexMod() |
dexMod |
tinyint |
Dexterity modifier |
| baseClass.getConMod() |
conMod |
tinyint |
Constitution modifier |
| baseClass.getIntMod() |
intMod |
tinyint |
Intelligence modifier |
| baseClass.getWisMod() |
wisMod |
tinyint |
Wisdom modifier |
| baseClass.getChaMod() |
chaMod |
tinyint |
Charisma modifier |
| baseClass.getHealthMod() |
healthMod |
tinyint |
Health modifier |
| baseClass.getManaMod() |
manaMod |
tinyint |
Mana modifier |
| baseClass.getStaminaMod() |
staminaMod |
tinyint |
Stamina modifier |
Key Queries
GET_BASE_CLASS
- Query:
SELECT * FROM \static_rune_baseclass` WHERE `ID`=?`
- Parameter: id (base class ID)
- Note: Fixed from original bug - was selecting from obj_account table instead of static_rune_baseclass
GET_BASECLASS_FOR_RACE
- Query:
SELECT b.* FROM \static_rune_baseclass` b, `static_rune_racebaseclass` r WHERE b.`ID` = r.`BaseClassID` && r.`RaceID` = ?`
- Parameter: id (race ID)
GET_ALL_BASE_CLASSES
- Query:
SELECT * FROM \static_rune_baseclass`;`
- Note: Returns all base classes from the static table
Relationships
Foreign Key Relationships
static_rune_racebaseclass.BaseClassID references static_rune_baseclass.ID
static_rune_racebaseclass.RaceID references static_rune_race.ID
Associated Objects
- BaseClass: Core character classification data
- Race: Associated races that can use specific base classes (via
static_rune_racebaseclass)