Documentation ¶
Overview ¶
Package things implements a registry for items, creatures etc.
Index ¶
- Constants
- func OutfitColorCount() int
- type Creature
- func (c *Creature) AnimCount() int
- func (c *Creature) ClientID(clientVersion uint16) uint16
- func (c *Creature) ColorizedCreatureFrame(idx int, dir CreatureDirection, outfitOverlayMask OutfitOverlayMask, ...) image.Image
- func (c *Creature) CreatureFrame(idx int, dir CreatureDirection, outfitOverlayMask OutfitOverlayMask, ...) image.Image
- func (c *Creature) GraphicsSize() struct{ ... }
- func (c *Creature) IdleAnim() bool
- func (c *Creature) LightInfo() dat.LightInfo
- func (c *Creature) Name() string
- func (c *Creature) ServerID() int
- type CreatureDirection
- type Item
- func (i *Item) Article() string
- func (i *Item) ClientID(clientVersion uint16) uint16
- func (i *Item) Description() string
- func (i *Item) GraphicsSize() struct{ ... }
- func (i *Item) ItemFrame(idx int, x, y, z int) image.Image
- func (i *Item) LightInfo() dat.LightInfo
- func (i *Item) MapColor() dat.DatasetColor
- func (i *Item) MapColorOK() bool
- func (i *Item) Name() string
- func (i *Item) RawClientDatasetItem780() *dat.Item
- func (i *Item) ServerID() uint16
- func (i *Item) Temp__ExternalLink() string
- func (i *Item) ValidClientItem() bool
- type OutfitColor
- type OutfitOverlayMask
- type Things
- func (t *Things) AddItemsOTB(i *itemsotb.Items) error
- func (t *Things) AddSpriteSet(s *spr.SpriteSet) error
- func (t *Things) AddTibiaDataset(d *dat.Dataset) error
- func (t *Things) ClientItemCount(clientVersion uint16) int
- func (t *Things) Creature(serverID uint16, clientVersion uint16) (*Creature, error)
- func (t *Things) CreatureCount(clientVersion uint16) int
- func (t *Things) CreatureWithClientID(clientID uint16, clientVersion uint16) (*Creature, error)
- func (t *Things) Item(serverID uint16, clientVersion uint16) (*Item, error)
- func (t *Things) ItemCount(clientVersion uint16) int
- func (t *Things) ItemWithClientID(clientID uint16, clientVersion uint16) (*Item, error)
- func (t *Things) ItemWithSequentialClientID(idx uint16, clientVersion uint16) (*Item, error)
- func (t *Things) ItemWithSequentialOTBIDX(idx int, clientVersion uint16) (*Item, error)
- func (t *Things) ItemWithSequentialServerID(idx uint16, clientVersion uint16) (*Item, error)
- func (t *Things) MaxItemClientID(clientVersion uint16) uint16
- func (t *Things) MaxItemServerID(clientVersion uint16) uint16
- func (t *Things) MinItemClientID(clientVersion uint16) uint16
- func (t *Things) MinItemServerID(clientVersion uint16) uint16
- func (t *Things) ServerItemCount(clientVersion uint16) int
- func (t *Things) SpriteSetSignature() uint32
- func (t *Things) Temp__DATItemCount(clientVersion uint16) int
- func (t *Things) Temp__GetClientIDForServerID(serverID uint16, clientVersion uint16) uint16
- func (t *Things) Temp__GetItemFromOTB(serverID uint16, clientVersion uint16) *itemsotb.Item
- func (t *Things) Temp__GetKnownClientIDItemArrayOffsetInOTB(serverID uint16, clientVersion uint16) int
- func (t *Things) Temp__GetServerItemArrayOffsetInOTB(serverID uint16, clientVersion uint16) int
- func (t *Things) TibiaDatasetSignature() uint32
Constants ¶
const ( OutfitOverlayMaskNone = OutfitOverlayMask(1 << iota) OutfitOverlayMaskFirst OutfitOverlayMaskSecond OutfitOverlayMaskThird OutfitOverlayMaskFourth OutfitOverlayMaskLast )
const ( CreatureDirectionNorth = CreatureDirection(0) CreatureDirectionEast = CreatureDirection(iota) CreatureDirectionSouth CreatureDirectionWest )
Variables ¶
This section is empty.
Functions ¶
func OutfitColorCount ¶ added in v0.0.3
func OutfitColorCount() int
Types ¶
type Creature ¶
type Creature struct {
// contains filtered or unexported fields
}
func (*Creature) ColorizedCreatureFrame ¶
func (c *Creature) ColorizedCreatureFrame(idx int, dir CreatureDirection, outfitOverlayMask OutfitOverlayMask, colors []color.Color) image.Image
func (*Creature) CreatureFrame ¶
func (c *Creature) CreatureFrame(idx int, dir CreatureDirection, outfitOverlayMask OutfitOverlayMask, colorTemplate bool) image.Image
func (*Creature) GraphicsSize ¶
type CreatureDirection ¶ added in v0.0.3
type CreatureDirection int
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
func (*Item) Description ¶ added in v0.0.8
func (*Item) GraphicsSize ¶
func (*Item) MapColor ¶ added in v0.0.3
func (i *Item) MapColor() dat.DatasetColor
func (*Item) MapColorOK ¶ added in v0.0.3
func (*Item) RawClientDatasetItem780 ¶ added in v0.0.5
RawClientDatasetItem780 is for debug or viewing use only; please do not access it outside these scenarios, as it may disappear anytime.
It is currently used for showing opt byte descriptions in the web UI.
It may return nil.
func (*Item) Temp__ExternalLink ¶ added in v0.0.8
func (*Item) ValidClientItem ¶ added in v0.0.3
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 (*Things) AddItemsOTB ¶
func (*Things) ClientItemCount ¶ added in v0.0.8
ClientItemCount returns the serverside items count that have a known client ID for the passed version.
func (*Things) Creature ¶ added in v0.0.3
Creature returns the things-representation of a creature / outfit which has the passed server ID. The used dataset will be for the passed version, if the creature even exists for the passed version.
Currently there is no distinction between client and server IDs. Yet.
func (*Things) CreatureCount ¶ added in v0.0.8
CreatureCount returns the serverside creatures / outfits count that are known for the passed version.
Currently there is no distinction between client and server IDs, so the dataset count is returned.
func (*Things) CreatureWithClientID ¶
CreatureWithClientID returns the things-representation of a creature which has the passed client ID in the passed client version. The outfit returned will have the dataset description for the passed version.
func (*Things) Item ¶
Item returns the things-representation of an item which has the passed server (otb) ID. The used dataset will be for the passed version, if the item even exists for the passed version.
func (*Things) ItemCount ¶ added in v0.0.8
ItemCount returns the serverside items count that are known for the passed version.
func (*Things) ItemWithClientID ¶
ItemWithClientID returns the things-representation of an item which has the passed client ID in the passed client version. The used dataset will be for the passed version.
func (*Things) ItemWithSequentialClientID ¶ added in v0.0.8
ItemWithSequentialClientID returns Nth item with valid client ID. This is useful only for pagination purposes, and the index may change depending on the client version.
idx is zero-based.
func (*Things) ItemWithSequentialOTBIDX ¶ added in v0.0.8
ItemWithSequentialOTBID returns Nth item in OTB storage. This is useful only for pagination purposes, and the index may change depending on the client version.
idx is zero-based.
func (*Things) ItemWithSequentialServerID ¶ added in v0.0.8
ItemWithSequentialServerID returns Nth item with valid server ID. This is useful only for pagination purposes, and the index may change depending on the server version.
idx is zero-based.
func (*Things) MaxItemClientID ¶ added in v0.0.8
MaxItemClientID returns the largest ID of an item for the passed version.
This can be sourced either from OTB or from dataset, with preference for dataset.
func (*Things) MaxItemServerID ¶ added in v0.0.8
MaxItemServerID returns the maximum ID of an item for the passed version.
Due to gaps, not the same as ItemCount.
func (*Things) MinItemClientID ¶ added in v0.0.8
MinItemClientID returns the minimum ID of an item for the passed version.
func (*Things) MinItemServerID ¶ added in v0.0.8
MinItemServerID returns the minimum ID of an item for the passed version.
func (*Things) ServerItemCount ¶ added in v0.0.8
ServerItemCount returns the serverside items count that have a known server ID for the passed version.