Documentation ¶
Index ¶
- Variables
- func CreatePlayer(username, password string) bool
- func LoadBoundaryDefinitions()
- func LoadItemDefinitions()
- func LoadNpcDefinitions()
- func LoadObjectDefinitions() error
- func LoadObjectLocations() int
- func LoadPlayer(player *world.Player, usernameHash uint64, password string, ...)
- func LoadPlayerAttributes(player *world.Player) error
- func LoadPlayerContacts(listType string, player *world.Player) error
- func LoadPlayerInventory(player *world.Player) error
- func Open(file string) *sql.DB
- func SaveObjectLocations() int
- func SavePlayer(player *world.Player)
- func UsernameExists(username string) bool
- func ValidateCredentials(usernameHash uint64, password string, loginReply chan byte, ...) error
- type BoundaryDefinition
- type ItemDefinition
- type NpcDefinition
- type ObjectDefinition
Constants ¶
This section is empty.
Variables ¶
var Boundarys []BoundaryDefinition
Boundarys This holds the defining characteristics for all of the game's boundary scene objects, ordered by ID.
var Items []ItemDefinition
Items This holds the defining characteristics for all of the game's items, ordered by ID.
var Npcs []NpcDefinition
Npcs This holds the defining characteristics for all of the game's NPCs, ordered by ID.
var Objects []ObjectDefinition
Objects This holds the defining characteristics for all of the game's scene objects, ordered by ID.
Functions ¶
func CreatePlayer ¶
CreatePlayer Creates a new entry in the player SQLite3 database with the specified credentials. Returns true if successful, otherwise returns false.
func LoadBoundaryDefinitions ¶
func LoadBoundaryDefinitions()
LoadBoundaryDefinitions Loads game boundary object data into memory for quick access.
func LoadItemDefinitions ¶
func LoadItemDefinitions()
LoadItemDefinitions Loads game item data into memory for quick access.
func LoadNpcDefinitions ¶
func LoadNpcDefinitions()
LoadNpcDefinitions Loads game NPC data into memory for quick access.
func LoadObjectDefinitions ¶
func LoadObjectDefinitions() error
LoadObjectDefinitions Loads game object data into memory for quick access.
func LoadObjectLocations ¶
func LoadObjectLocations() int
LoadObjectLocations Loads the game objects into memory from the SQLite3 database.
func LoadPlayer ¶
LoadPlayer Loads a player from the SQLite3 database, returns a login response code.
func LoadPlayerAttributes ¶
LoadPlayerAttributes Looks for a player with the specified credentials in the player database. Returns nil if it finds the player, otherwise returns an error.
func LoadPlayerContacts ¶
LoadPlayerContacts Looks for a player with the specified credentials in the player database. Returns nil if it finds the player, otherwise returns an error.
func LoadPlayerInventory ¶
LoadPlayerInventory Looks for a player with the specified credentials in the player database. Returns nil if it finds the player, otherwise returns an error.
func SaveObjectLocations ¶
func SaveObjectLocations() int
SaveObjectLocations Clears world.db game object locations and repopulates it with the current server locations.
func SavePlayer ¶
SavePlayer Saves a player to the SQLite3 database.
func UsernameExists ¶
UsernameExists Returns true if there is a player with the name 'username' in the player database, otherwise returns false.
Types ¶
type BoundaryDefinition ¶
BoundaryDefinition This represents a single definition for a single boundary object in the game.
type ItemDefinition ¶
type ItemDefinition struct { ID int Name string Description string Command string BasePrice int Stackable bool Quest bool Members bool }
ItemDefinition This represents a single definition for a single item in the game.