hero

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAll

func LoadAll(ds *db.Datastore, ownerID int64, tableName string) interface{}

func Migrate

func Migrate(ds *db.Datastore)

Types

type Hero

type Hero interface {
	define.PluginObj

	Entry() *define.HeroEntry
	GetOwnerID() int64
	GetOwnerType() int32
	GetTypeID() int32
	GetExp() int64
	GetEquipBar() *item.EquipBar
	GetAttManager() *att.AttManager
	GetRuneBox() *rune.RuneBox

	SetOwnerID(int64)
	SetOwnerType(int32)
	SetTypeID(int32)
	SetExp(int64)
	SetLevel(int32)
	SetEntry(*define.HeroEntry)
	SetAttManager(*att.AttManager)
	SetRuneBox(*rune.RuneBox)
	SetEquipBar(*item.EquipBar)

	AddExp(int64) int64
	AddLevel(int32) int32
	BeforeDelete()
	CalcAtt()
}

func NewHero

func NewHero(id int64) Hero

type HeroV1

type HeroV1 struct {
	ID        int64 `gorm:"type:bigint(20);primary_key;column:id;default:-1;not null" bson:"_id"`
	OwnerID   int64 `gorm:"type:bigint(20);column:owner_id;index:owner_id;default:-1;not null" bson:"owner_id"`
	OwnerType int32 `gorm:"type:int(10);column:owner_type;index:owner_type;default:-1;not null" bson:"owner_type"`
	TypeID    int32 `gorm:"type:int(10);column:type_id;default:-1;not null" bson:"type_id"`
	Exp       int64 `gorm:"type:bigint(20);column:exp;default:0;not null" bson:"exp"`
	Level     int32 `gorm:"type:int(10);column:level;default:1;not null" bson:"level"`
	// contains filtered or unexported fields
}

func (*HeroV1) AddExp

func (h *HeroV1) AddExp(exp int64) int64

func (*HeroV1) AddLevel

func (h *HeroV1) AddLevel(level int32) int32

func (*HeroV1) BeforeDelete

func (h *HeroV1) BeforeDelete()

func (*HeroV1) CalcAtt

func (h *HeroV1) CalcAtt()

func (*HeroV1) Entry

func (h *HeroV1) Entry() *define.HeroEntry

func (*HeroV1) GetAttManager

func (h *HeroV1) GetAttManager() *att.AttManager

func (*HeroV1) GetEquipBar

func (h *HeroV1) GetEquipBar() *item.EquipBar

func (*HeroV1) GetExp

func (h *HeroV1) GetExp() int64

func (*HeroV1) GetID

func (h *HeroV1) GetID() int64

func (*HeroV1) GetLevel

func (h *HeroV1) GetLevel() int32

func (*HeroV1) GetOwnerID

func (h *HeroV1) GetOwnerID() int64

func (*HeroV1) GetOwnerType

func (h *HeroV1) GetOwnerType() int32

func (*HeroV1) GetRuneBox

func (h *HeroV1) GetRuneBox() *rune.RuneBox

func (*HeroV1) GetType

func (h *HeroV1) GetType() int32

func (*HeroV1) GetTypeID

func (h *HeroV1) GetTypeID() int32

func (*HeroV1) SetAttManager

func (h *HeroV1) SetAttManager(m *att.AttManager)

func (*HeroV1) SetEntry

func (h *HeroV1) SetEntry(e *define.HeroEntry)

func (*HeroV1) SetEquipBar

func (h *HeroV1) SetEquipBar(eb *item.EquipBar)

func (*HeroV1) SetExp

func (h *HeroV1) SetExp(exp int64)

func (*HeroV1) SetLevel

func (h *HeroV1) SetLevel(level int32)

func (*HeroV1) SetOwnerID

func (h *HeroV1) SetOwnerID(id int64)

func (*HeroV1) SetOwnerType

func (h *HeroV1) SetOwnerType(tp int32)

func (*HeroV1) SetRuneBox

func (h *HeroV1) SetRuneBox(b *rune.RuneBox)

func (*HeroV1) SetTypeID

func (h *HeroV1) SetTypeID(id int32)

Jump to

Keyboard shortcuts

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