rune

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRunePool

func GetRunePool() *sync.Pool

func ReleasePoolRune

func ReleasePoolRune(x interface{})

Types

type Option

type Option func(*Options)

func Entry

func Entry(entry *auto.RuneEntry) Option

func EquipObj

func EquipObj(obj int64) Option

func Id

func Id(id int64) Option

func OwnerId

func OwnerId(id int64) 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"`
	TypeId   int             `bson:"type_id" json:"type_id"`
	EquipObj int64           `bson:"equip_obj" json:"equip_obj"`
	Entry    *auto.RuneEntry `bson:"-" json:"-"`
}

rune options

func DefaultOptions

func DefaultOptions() Options

type Rune

type Rune interface {
	store.StoreObjector

	GetOptions() *Options
	GetAtt(int32) *RuneAtt
	GetAttManager() *att.AttManager
	GetEquipObj() int64

	SetAtt(int32, *RuneAtt)
	CalcAtt()
}

func NewPoolRune

func NewPoolRune() Rune

func NewRune

func NewRune(opts ...Option) Rune

type RuneAtt

type RuneAtt struct {
	AttType  int32 `bson:"att_type" json:"att_type"`
	AttValue int64 `bson:"att_value" json:"att_value"`
}

type RuneBox

type RuneBox struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewRuneBox

func NewRuneBox(owner define.PluginObj) *RuneBox

func (*RuneBox) GetRuneByPos

func (rb *RuneBox) GetRuneByPos(pos int) Rune

func (*RuneBox) PutonRune

func (rb *RuneBox) PutonRune(r Rune) error

func (*RuneBox) TakeoffRune

func (rb *RuneBox) TakeoffRune(pos int) error

type RuneV1

type RuneV1 struct {
	Options `bson:"inline" json:",inline"`
	Atts    [define.Rune_AttNum]*RuneAtt `bson:"atts" json:"atts"`
	// contains filtered or unexported fields
}

func (*RuneV1) AfterLoad

func (r *RuneV1) AfterLoad() error

StoreObjector interface

func (*RuneV1) CalcAtt

func (r *RuneV1) CalcAtt()

func (*RuneV1) GetAtt

func (r *RuneV1) GetAtt(idx int32) *RuneAtt

func (*RuneV1) GetAttManager

func (r *RuneV1) GetAttManager() *att.AttManager

func (*RuneV1) GetEquipObj

func (r *RuneV1) GetEquipObj() int64

func (*RuneV1) GetExpire

func (r *RuneV1) GetExpire() *time.Timer

func (*RuneV1) GetID

func (r *RuneV1) GetID() int64

func (*RuneV1) GetObjID

func (r *RuneV1) GetObjID() int64

func (*RuneV1) GetOptions

func (r *RuneV1) GetOptions() *Options

func (*RuneV1) GetOwnerID

func (r *RuneV1) GetOwnerID() int64

func (*RuneV1) GetStoreIndex

func (r *RuneV1) GetStoreIndex() int64

func (*RuneV1) GetType

func (r *RuneV1) GetType() int32

func (*RuneV1) GetTypeID

func (r *RuneV1) GetTypeID() int

func (*RuneV1) SetAtt

func (r *RuneV1) SetAtt(idx int32, att *RuneAtt)

Jump to

Keyboard shortcuts

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