character

package
v0.0.0-...-ee475d0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(characterName string) bool

Types

type AccessLevel

type AccessLevel int
const (
	AccessNone AccessLevel = iota
	AccessMonitor
	AccessMapper
	AccessDeveloper
	AccessCreator
)

type Character

type Character struct {
	Id          int64
	AccountId   int64
	Name        string
	Gender      Gender
	Class       int
	Sprite      int
	Level       int
	Exp         int
	Access      AccessLevel
	PK          bool
	Guild       string
	GuildAccess int
	Vitals      vitals.Data
	Stats       stats.Data
	Points      int
	Equipment   equipment.Data
	Inv         [config.MaxInventory]InventorySlot
	Spells      [config.MaxCharacterSpells]int
	Room        int
	X           int
	Y           int
	Dir         common.Direction
}

func CreateCharacter

func CreateCharacter(accountId int64, name string, gender Gender, classId int) (*Character, bool)

func LoadCharactersForAccount

func LoadCharactersForAccount(accountId int64) []Character

func (*Character) Clear

func (c *Character) Clear()

func (*Character) ClearInventory

func (c *Character) ClearInventory()

func (*Character) ClearSpells

func (c *Character) ClearSpells()

func (*Character) Delete

func (c *Character) Delete() bool

func (*Character) Save

func (c *Character) Save() bool

type Gender

type Gender int
const (
	GenderMale Gender = iota
	GenderFemale
)

type InventorySlot

type InventorySlot struct {
	Item  int
	Value int
	Dur   int
}

Jump to

Keyboard shortcuts

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