Help us shape the future of Go! Take the 2026 Go Developer Survey

chatgen

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildTemplateProfessionGuardian = iota + 1
	BuildTemplateProfessionWarrior
	BuildTemplateProfessionEngineer
	BuildTemplateProfessionRanger
	BuildTemplateProfessionThief
	BuildTemplateProfessionElementalist
	BuildTemplateProfessionMesmer
	BuildTemplateProfessionNecromancer
	BuildTemplateProfessionRevenant
)

IDs for all professions

View Source
const (
	RevenantLegendDragonStance = iota + 14
	RevenantLegendAssassinStance
	RevenantLegendDwarfStance
	RevenantLegendDemonStance
	RevenantLegendRenegadeStance
	RevenantLegendCentaurStance
)

Revenant Legends

Variables

View Source
var (
	ErrInvalidHeader = errors.New("Invalid header byte")
)

Error constants

Functions

func DecodeMapPoI

func DecodeMapPoI(link string) (int, error)

DecodeMapPoI decodes a map poi chatcode and returns the contained id

func DecodeOutfit

func DecodeOutfit(link string) (int, error)

DecodeOutfit decodes a chatlink into the contained outfit

func DecodeRecipe

func DecodeRecipe(link string) (int, error)

DecodeRecipe decodes a chatlink into the contained recipe

func DecodeSkill

func DecodeSkill(link string) (int, error)

DecodeSkill decodes a skill chatlink into the contained id

func DecodeSkin

func DecodeSkin(link string) (int, error)

DecodeSkin decodes a chatlink into the contained skin

func DecodeTrait

func DecodeTrait(link string) (int, error)

DecodeTrait decodes a chatcode into the contained trait

func DecodeWvWObjective

func DecodeWvWObjective(link string) (int, int, error)

DecodeWvWObjective decodes a chatlink into the contained wvw objective

func EncodeBuildTemplate added in v0.2.2

func EncodeBuildTemplate(data BuildTemplate) string

EncodeBuildTemplate encodes a buildtemplate into a chatlink

func EncodeItem

func EncodeItem(item Item) string

EncodeItem returns the encoded chatlink for that item

func EncodeMapPoI

func EncodeMapPoI(id int) string

EncodeMapPoI encodes a map poi into a chatcode

func EncodeOutfit

func EncodeOutfit(id int) string

EncodeOutfit encodes an outfit into a chatlink

func EncodeRecipe

func EncodeRecipe(id int) string

EncodeRecipe encodes a recipe into the chatcode

func EncodeSkill

func EncodeSkill(id int) string

EncodeSkill encodes a skill into the chatlink

func EncodeSkin

func EncodeSkin(id int) string

EncodeSkin encodes a skin into a chatlink

func EncodeTrait

func EncodeTrait(id int) string

EncodeTrait encodes a trait into the chatcode

func EncodeWvWObjective

func EncodeWvWObjective(objectiveID, mapID int) string

EncodeWvWObjective encodes a wvw objective into a chatlink

Types

type BuildTemplate added in v0.2.2

type BuildTemplate struct {
	Profession                   uint8
	Specializations              [3]BuildTemplateSpecialization
	Skills                       [5]int
	AquaticSkills                [5]int
	RangerPets                   [4]uint8 // Terrestrial Pet 1, Terrestrial Pet 2, Aquatic Pet 1, Aquatic Pet 2
	RevenantLegends              [4]uint8 // Terrestrial Legend 1, Terrestrial Legend 2, Aquatic Legend 1, Aquatic Legend 2
	RevenantInactiveLegendSkills [6]int   // Terrestrial Skill 1, 2, 3, Aquatic Skill 1, 2, 3
}

BuildTemplate contains data contained in a buildtemplate chatlink

func DecodeBuildTemplate added in v0.2.2

func DecodeBuildTemplate(link string) (*BuildTemplate, error)

DecodeBuildTemplate decodes a chatlink into the contained buildtemplate

type BuildTemplateSpecialization added in v0.2.2

type BuildTemplateSpecialization struct {
	ID     int
	Traits [3]int
}

BuildTemplateSpecialization contains information about one traitline

type Item

type Item struct {
	Quantity uint8
	ID       int
	Upgrades [2]int
	Skin     int
}

Item contains information for encoding or decoding item links

func DecodeItem

func DecodeItem(link string) (*Item, error)

DecodeItem reads the item data from a link

Jump to

Keyboard shortcuts

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