Module character

Source
Expand description

Database operations related to character data

Methods in this module should remain private to the persistence module - database updates and loading are communicated via requests to the [CharacterLoader] and [CharacterUpdater] while results/responses are polled and handled each server tick.

Modules§

conversions πŸ”’
Private module for very tightly coupled database conversion methods. In general, these have many invariants that need to be maintained when they’re called–do not assume it’s safe to make these public!

Structs§

CharacterContainers πŸ”’

Constants§

CHARACTER_PSEUDO_CONTAINER_DEF_ID πŸ”’
INVENTORY_PSEUDO_CONTAINER_DEF_ID πŸ”’
INVENTORY_PSEUDO_CONTAINER_POSITION πŸ”’
LOADOUT_PSEUDO_CONTAINER_DEF_ID πŸ”’
LOADOUT_PSEUDO_CONTAINER_POSITION πŸ”’
OVERFLOW_ITEMS_PSEUDO_CONTAINER_DEF_ID πŸ”’
OVERFLOW_ITEMS_PSEUDO_CONTAINER_POSITION πŸ”’
RECIPE_BOOK_PSEUDO_CONTAINER_DEF_ID πŸ”’
RECIPE_BOOK_PSEUDO_CONTAINER_POSITION πŸ”’
WORLD_PSEUDO_CONTAINER_ID πŸ”’

Functions§

check_character_limit
Before creating a character, we ensure that the limit on the number of characters has not been exceeded
create_character
delete_character
Permanently deletes a character
delete_pets πŸ”’
edit_character
get_new_entity_ids πŸ”’
NOTE: This relies heavily on serializability to work correctly.
get_pet_ids πŸ”’
get_pseudo_container_id πŸ”’
get_pseudo_containers πŸ”’
Fetches the pseudo_container IDs for a character
load_character_data
Load stored data for a character.
load_character_list
Loads a list of characters belonging to the player. This data is a small subset of the character’s data, and is used to render the character and their level in the character list.
load_items
Load the inventory/loadout
update
update_pets πŸ”’
Stores new pets in the database, and removes pets from the database that the player no longer has. Currently there are no actual updates to pet data since we don’t store any updatable data about pets in the database.

Type Aliases§

EntityId πŸ”’