Documentation

Overview

Package things implements a registry for items, creatures etc.

Index

Constants

const (
	OutfitOverlayMaskNone = OutfitOverlayMask(1 << iota)
	OutfitOverlayMaskFirst
	OutfitOverlayMaskSecond
	OutfitOverlayMaskThird
	OutfitOverlayMaskFourth

	OutfitOverlayMaskLast
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Creature

type Creature struct {
	// contains filtered or unexported fields
}

func (*Creature) AnimCount

func (c *Creature) AnimCount() int

func (*Creature) ColorizedCreatureFrame

func (c *Creature) ColorizedCreatureFrame(idx, dir int, outfitOverlayMask OutfitOverlayMask, colors []color.Color) image.Image

func (*Creature) CreatureFrame

func (c *Creature) CreatureFrame(idx, dir int, outfitOverlayMask OutfitOverlayMask, colorTemplate bool) image.Image

func (*Creature) GraphicsSize

func (c *Creature) GraphicsSize() struct{ W, H int }

func (*Creature) IdleAnim

func (c *Creature) IdleAnim() bool

func (*Creature) LightInfo

func (c *Creature) LightInfo() dat.LightInfo

func (*Creature) Name

func (c *Creature) Name() string

type Item

type Item struct {
	// contains filtered or unexported fields
}

func (*Item) GraphicsSize

func (i *Item) GraphicsSize() struct{ W, H int }

func (*Item) ItemFrame

func (i *Item) ItemFrame(idx int, x, y, z int) image.Image

func (*Item) LightInfo

func (i *Item) LightInfo() dat.LightInfo

func (*Item) Name

func (i *Item) Name() string

type OutfitColor

type OutfitColor int

func (OutfitColor) RGBA

func (col OutfitColor) RGBA() (r, g, b, a uint32)

type OutfitOverlayMask

type OutfitOverlayMask int

type Things

type Things struct {
	// contains filtered or unexported fields
}

func New

func New() (*Things, error)

func (*Things) AddItemsOTB

func (t *Things) AddItemsOTB(i *itemsotb.Items) error

func (*Things) AddSpriteSet

func (t *Things) AddSpriteSet(s *spr.SpriteSet) error

func (*Things) AddTibiaDataset

func (t *Things) AddTibiaDataset(d *dat.Dataset) error

func (*Things) CreatureWithClientID

func (t *Things) CreatureWithClientID(clientID uint16, clientVersion uint16) (*Creature, error)

func (*Things) Item

func (t *Things) Item(serverID uint16, clientVersion uint16) (*Item, error)

func (*Things) ItemWithClientID

func (t *Things) ItemWithClientID(clientID uint16, clientVersion uint16) (*Item, error)

func (*Things) SpriteSetSignature

func (t *Things) SpriteSetSignature() uint32

func (*Things) Temp__GetClientIDForServerID

func (t *Things) Temp__GetClientIDForServerID(serverID uint16, clientVersion uint16) uint16

func (*Things) Temp__GetItemFromOTB

func (t *Things) Temp__GetItemFromOTB(serverID uint16, clientVersion uint16) *itemsotb.Item

func (*Things) TibiaDatasetSignature

func (t *Things) TibiaDatasetSignature() uint32