activebuff

package
v0.0.0-...-e449b39 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package activebuff timed buff in activeobject

Package activebuff timed buff in activeobject

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveBuff

type ActiveBuff struct {
	Name           string
	ClearOnRebirth bool
	Buff           []statusoptype.OpArg
	AppliedCount   int
}

func (*ActiveBuff) GetOpArgToApply

func (as *ActiveBuff) GetOpArgToApply() (statusoptype.OpArg, bool)

GetOpArgToApply return current oparg and exist, inc appliedcount

func (*ActiveBuff) IsEnded

func (as *ActiveBuff) IsEnded() bool

func (ActiveBuff) String

func (as ActiveBuff) String() string

func (*ActiveBuff) ToPacket_ActiveObjBuff

func (as *ActiveBuff) ToPacket_ActiveObjBuff() *c2t_obj.ActiveObjBuff

type BuffManager

type BuffManager struct {
	Mutex    sync.RWMutex  `prettystring:"hide"`
	BuffList []*ActiveBuff `prettystring:"simple"`
}

func New

func New() *BuffManager

func (*BuffManager) Add

func (bm *BuffManager) Add(name string, clearOnRebirth bool, replaceSameName bool, tb []statusoptype.OpArg) bool

Add return true if replace

func (*BuffManager) ClearOnRebirth

func (bm *BuffManager) ClearOnRebirth()

func (*BuffManager) Exist

func (bm *BuffManager) Exist(name string) bool

func (*BuffManager) GetOpArgListToApply

func (bm *BuffManager) GetOpArgListToApply() []statusoptype.OpArg

func (*BuffManager) ToPacket_ActiveObjBuffList

func (bm *BuffManager) ToPacket_ActiveObjBuffList() []*c2t_obj.ActiveObjBuff

Jump to

Keyboard shortcuts

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