db

package
v0.0.0-...-b6f29c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2020 License: ISC Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultEntityService *sqlService

Functions

func ConnectEntityService

func ConnectEntityService()

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 LoadItemLocations

func LoadItemLocations()

LoadItemLocations Loads the games ground items into memory from the SQLite3 database.

func LoadNpcDefinitions

func LoadNpcDefinitions()

LoadNpcDefinitions Loads game NPC data into memory for quick access.

func LoadNpcLocations

func LoadNpcLocations()

LoadNpcLocations Loads the games NPCs into memory from the SQLite3 database.

func LoadObjectDefinitions

func LoadObjectDefinitions()

LoadObjectDefinitions Loads game object data into memory for quick access.

func LoadObjectLocations

func LoadObjectLocations()

LoadObjectLocations Loads the game objects into memory from the SQLite3 database.

func LoadTileDefinitions

func LoadTileDefinitions()

LoadTileDefinitions Loads game tile attribute data into memory for quick access.

func SaveObjectLocations

func SaveObjectLocations() int

SaveObjectLocations Clears definitions.db game object locations and repopulates it with the current game locations.

Types

type EntityService

type EntityService interface {
	Objects() []definitions.ScenaryDefinition
	Boundarys() []definitions.BoundaryDefinition
	Tiles() []definitions.TileDefinition
	Items() []definitions.ItemDefinition
	Npcs() []definitions.NpcDefinition
}

type PlayerService

type PlayerService interface {
	PlayerCreate(string, string, string) bool
	PlayerNameExists(username string) bool
	PlayerHasRecoverys(uint64) bool
	PlayerValidLogin(uint64, string) bool
	PlayerChangePassword(uint64, string) bool
	PlayerLoadRecoverys(uint64) []string
	PlayerLoad(*world.Player) bool
	PlayerSave(*world.Player)
	OnlineCount() int
}

PlayerService An interface for manipulating player save data.

var DefaultPlayerService PlayerService

DefaultPlayerService the default player save managing service in use by the game server Currently using an sqlService.

func NewPlayerServiceSql

func NewPlayerServiceSql() PlayerService

NewPlayerServiceSql Returns a new SqlPlayerService to manage the specified *sql.DB instance, configured against the default players database.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL