Documentation ¶
Overview ¶
Package otbm implements an OTBM map file format reader and a gameworld map data source.
Index ¶
- type ItemAttribute
- type Map
- func (m *Map) AddCreature(c gameworld.Creature) error
- func (m *Map) GetCreatureByID(id gameworld.CreatureID) (gameworld.Creature, error)
- func (m *Map) GetCreatureByIDBytes(idBytes [4]byte) (gameworld.Creature, error)
- func (m *Map) GetMapTile(x, y uint16, z uint8) (gameworld.MapTile, error)
- func (m *Map) Private_And_Temp__DefaultPlayerSpawnPoint(c gameworld.CreatureID) tnet.Position
- func (m *Map) RemoveCreatureByID(id gameworld.CreatureID) error
- func (m *Map) String() string
- type MapData
- type MapNodeType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ItemAttribute ¶
type ItemAttribute uint8
const ( OTBM_ATTR_DESCRIPTION ItemAttribute = 0x01 OTBM_ATTR_EXT_FILE ItemAttribute = 0x02 OTBM_ATTR_TILE_FLAGS ItemAttribute = 0x03 OTBM_ATTR_ACTION_ID ItemAttribute = 0x04 OTBM_ATTR_UNIQUE_ID ItemAttribute = 0x05 OTBM_ATTR_TEXT ItemAttribute = 0x06 OTBM_ATTR_DESC ItemAttribute = 0x07 OTBM_ATTR_TELE_DEST ItemAttribute = 0x08 OTBM_ATTR_ITEM ItemAttribute = 0x09 OTBM_ATTR_DEPOT_ID ItemAttribute = 0x0A OTBM_ATTR_EXT_SPAWN_FILE ItemAttribute = 0x0B OTBM_ATTR_RUNE_CHARGES ItemAttribute = 0x0C OTBM_ATTR_EXT_HOUSE_FILE ItemAttribute = 0x0D OTBM_ATTR_HOUSEDOORID ItemAttribute = 0x0E OTBM_ATTR_COUNT ItemAttribute = 0x0F OTBM_ATTR_DURATION ItemAttribute = 0x10 OTBM_ATTR_DECAYING_STATE ItemAttribute = 0x11 OTBM_ATTR_WRITTENDATE ItemAttribute = 0x12 OTBM_ATTR_WRITTENBY ItemAttribute = 0x13 OTBM_ATTR_SLEEPERGUID ItemAttribute = 0x14 OTBM_ATTR_SLEEPSTART ItemAttribute = 0x15 OTBM_ATTR_CHARGES ItemAttribute = 0x16 OTBM_ATTR_ATTRIBUTE_MAP ItemAttribute = 128 )
func (ItemAttribute) String ¶
func (a ItemAttribute) String() string
type Map ¶
type Map struct { gameworld.MapDataSource // contains filtered or unexported fields }
func (*Map) GetCreatureByID ¶
func (*Map) GetCreatureByIDBytes ¶
func (*Map) Private_And_Temp__DefaultPlayerSpawnPoint ¶
func (m *Map) Private_And_Temp__DefaultPlayerSpawnPoint(c gameworld.CreatureID) tnet.Position
func (*Map) RemoveCreatureByID ¶
func (m *Map) RemoveCreatureByID(id gameworld.CreatureID) error
type MapNodeType ¶
type MapNodeType uint8
Implementation detail: iota is not used primarily for easier referencing in case of an error.
const ( OTBM_ROOT MapNodeType = 0x00 OTBM_ROOTV1 MapNodeType = 0x01 OTBM_MAP_DATA MapNodeType = 0x02 OTBM_ITEM_DEF MapNodeType = 0x03 OTBM_TILE_AREA MapNodeType = 0x04 OTBM_TILE MapNodeType = 0x05 OTBM_ITEM MapNodeType = 0x06 OTBM_TILE_SQUARE MapNodeType = 0x07 OTBM_TILE_REF MapNodeType = 0x08 OTBM_SPAWNS MapNodeType = 0x09 OTBM_SPAWN_AREA MapNodeType = 0x0A OTBM_MONSTER MapNodeType = 0x0B OTBM_TOWNS MapNodeType = 0x0C OTBM_TOWN MapNodeType = 0x0D OTBM_HOUSETILE MapNodeType = 0x0E OTBM_WAYPOINTS MapNodeType = 0x0F OTBM_WAYPOINT MapNodeType = 0x10 )
Click to show internal directories.
Click to hide internal directories.