blade

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBladePool

func GetBladePool() *sync.Pool

func ReleasePoolBlade

func ReleasePoolBlade(x interface{})

Types

type Blade

type Blade interface {
	store.StoreObjector
	define.PluginObj

	GetOptions() *Options
	SetTalentManager(*talent.TalentManager)
	GetTalentManager() *talent.TalentManager
	GetAttManager() *att.AttManager

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

func NewBlade

func NewBlade(opts ...Option) Blade

func NewPoolBlade

func NewPoolBlade() Blade

type BladeV1

type BladeV1 struct {
	Options                `bson:"inline" json:",inline"`
	TalentManager          *talent.TalentManager `bson:"-" json:"-"`
	AttManager             *att.AttManager       `bson:"-" json:"-"`
	utils.WaitGroupWrapper `bson:"-" json:"-"`
}

func (*BladeV1) AddExp

func (b *BladeV1) AddExp(exp int64) int64

func (*BladeV1) AddLevel

func (b *BladeV1) AddLevel(level int32) int32

func (*BladeV1) AfterLoad

func (b *BladeV1) AfterLoad() error

func (*BladeV1) CalcAtt

func (b *BladeV1) CalcAtt()

func (*BladeV1) GetAttManager

func (b *BladeV1) GetAttManager() *att.AttManager

func (*BladeV1) GetID

func (b *BladeV1) GetID() int64

func (*BladeV1) GetLevel

func (b *BladeV1) GetLevel() int32

func (*BladeV1) GetObjID

func (b *BladeV1) GetObjID() int64

func (*BladeV1) GetOptions

func (b *BladeV1) GetOptions() *Options

func (*BladeV1) GetStoreIndex

func (b *BladeV1) GetStoreIndex() int64

func (*BladeV1) GetTalentManager

func (b *BladeV1) GetTalentManager() *talent.TalentManager

func (*BladeV1) GetType

func (b *BladeV1) GetType() int32

func (*BladeV1) LoadFromDB

func (b *BladeV1) LoadFromDB() error

func (*BladeV1) SetTalentManager

func (b *BladeV1) SetTalentManager(t *talent.TalentManager)

type Option

type Option func(*Options)

func Entry

func Entry(entry *auto.BladeEntry) Option

func Exp

func Exp(exp int64) Option

func Id

func Id(id int64) Option

func Level

func Level(level int32) Option

func OwnerId

func OwnerId(id int64) Option

func OwnerType

func OwnerType(tp int32) Option

func TypeId

func TypeId(id int) Option

type Options

type Options struct {
	Id        int64            `bson:"_id" json:"_id"`
	OwnerId   int64            `bson:"owner_id" json:"owner_id"`
	OwnerType int32            `bson:"owner_type" json:"owner_type"`
	TypeId    int              `bson:"type_id" json:"type_id"`
	Exp       int64            `bson:"exp" json:"exp"`
	Level     int32            `bson:"level" json:"level"`
	Entry     *auto.BladeEntry `bson:"-" json:"-"`
}

blade options

func DefaultOptions

func DefaultOptions() Options

Jump to

Keyboard shortcuts

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