item

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: 15 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 EquipBar

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

func NewEquipBar

func NewEquipBar(owner define.PluginObj) *EquipBar

func (*EquipBar) GetEquipByPos

func (eb *EquipBar) GetEquipByPos(pos int32) Item

func (*EquipBar) PutonEquip

func (eb *EquipBar) PutonEquip(i Item) error

func (*EquipBar) TakeoffEquip

func (eb *EquipBar) TakeoffEquip(pos int32) error

type Item

type Item interface {
	Entry() *define.ItemEntry
	EquipEnchantEntry() *define.EquipEnchantEntry
	GetID() int64
	GetOwnerID() int64
	GetTypeID() int32
	GetNum() int32
	GetEquipObj() int64
	GetAttManager() *att.AttManager

	SetOwnerID(int64)
	SetTypeID(int32)
	SetNum(int32)
	SetEquipObj(int64)
	SetEntry(*define.ItemEntry)
	SetEquipEnchantEntry(*define.EquipEnchantEntry)
	SetAttManager(*att.AttManager)

	CalcAtt()
}

func NewItem

func NewItem(id int64) Item

type ItemV1

type ItemV1 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"`
	TypeID  int32 `gorm:"type:int(10);column:type_id;default:-1;not null" bson:"type_id"`
	Num     int32 `gorm:"type:int(10);column:num;default:0;not null" bson:"num"`

	EquipObj int64 `gorm:"type:bigint(20);column:equip_obj;default:-1;not null" bson:"equip_obj"`
	// contains filtered or unexported fields
}

func (*ItemV1) CalcAtt

func (h *ItemV1) CalcAtt()

func (*ItemV1) Entry

func (h *ItemV1) Entry() *define.ItemEntry

func (*ItemV1) EquipEnchantEntry

func (h *ItemV1) EquipEnchantEntry() *define.EquipEnchantEntry

func (*ItemV1) GetAttManager

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

func (*ItemV1) GetEquipObj

func (h *ItemV1) GetEquipObj() int64

func (*ItemV1) GetID

func (h *ItemV1) GetID() int64

func (*ItemV1) GetNum

func (h *ItemV1) GetNum() int32

func (*ItemV1) GetOwnerID

func (h *ItemV1) GetOwnerID() int64

func (*ItemV1) GetTypeID

func (h *ItemV1) GetTypeID() int32

func (*ItemV1) SetAttManager

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

func (*ItemV1) SetEntry

func (h *ItemV1) SetEntry(e *define.ItemEntry)

func (*ItemV1) SetEquipEnchantEntry

func (h *ItemV1) SetEquipEnchantEntry(e *define.EquipEnchantEntry)

func (*ItemV1) SetEquipObj

func (h *ItemV1) SetEquipObj(id int64)

func (*ItemV1) SetNum

func (h *ItemV1) SetNum(num int32)

func (*ItemV1) SetOwnerID

func (h *ItemV1) SetOwnerID(id int64)

func (*ItemV1) SetTypeID

func (h *ItemV1) SetTypeID(id int32)

Jump to

Keyboard shortcuts

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