questie

package
v0.7.113 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package questie reads the player's own installed QuestieDB, if there is one, to find quests the character could pick up and where quest givers and objectives are. It is an optional, read-only integration: nothing here ships Questie data or code, and the index built from the player's install is cached only in their local cache folder. See docs/design/questie-interop.md.

Index

Constants

View Source
const (
	FlagGossip        = 0x1
	FlagQuestGiver    = 0x2
	FlagTrainer       = 0x10 // any trainer; ClassTrainer and ProfTrainer are its kinds
	FlagClassTrainer  = 0x20
	FlagProfTrainer   = 0x40
	FlagVendor        = 0x80
	FlagVendorAmmo    = 0x100
	FlagVendorFood    = 0x200
	FlagVendorPoison  = 0x400
	FlagVendorReagent = 0x800
	FlagRepair        = 0x1000
	FlagFlightMaster  = 0x2000
	FlagInnkeeper     = 0x10000
	FlagBanker        = 0x20000
)

The npcFlags bits the advisor reads, in one fixed numbering (the "canonical" bits). QuestieDB numbers them differently per game flavor, so the index translates each NPC's native flags into these by the bit's name when it is built; everything outside this package tests only the canonical bits.

View Source
const (
	KindOre  = "ore"
	KindFish = "fishing"
)

Node kinds a name alone settles; the others are left for the caller to settle from what the node yields.

View Source
const (
	AllianceMask = bitHuman | bitDwarf | bitNightElf | bitGnome | bitDraenei | bitWorgen | bitPandaren | BitSkyborneAlliance
	HordeMask    = bitOrc | bitUndead | bitTauren | bitTroll | bitGoblin | bitBloodElf | bitPandaren | BitSkyborneHorde
)

Side masks: every known race bit of one side. Pandaren take either side.

View Source
const (
	BitSkyborneAlliance, BitSkyborneHorde uint64 = 1 << 32, 1 << 33
)

Race mask bits. A bit is not always 1<<(id-1): Forever's Skyborne has one race id per side (95 Alliance, 96 Horde) that Questie masks as bits 32 and 33, so masks need 64 bits.

View Source
const MaxClassQuestClasses = 3

MaxClassQuestClasses is the most classes a quest's mask may name for it to count as a class quest.

View Source
const MaxEventQuests = 12

MaxEventQuests bounds the quests listed per event.

View Source
const MaxSpots = 2

MaxSpots is how many sample coordinates a zone keeps.

View Source
const SupportedContract = 4

SupportedContract is the QuestieDB baked-storage contract this reader understands (the TOC's X-Contract-Version).

Variables

View Source
var CacheDir = func() string {
	d, err := os.UserCacheDir()
	if err != nil {
		return ""
	}
	return filepath.Join(d, "wowc-advisor", "questie")
}

CacheDir is where the parsed index is kept: the player's local cache folder, never the repo. Tests point it at a temp folder.

View Source
var ErrUnreadable = errors.New("QuestieDB format not recognised")

ErrUnreadable means the database is not in a format this reader understands.

View Source
var Events = []Event{
	{"midsummer", "Midsummer Fire Festival", -369, [2]int{6, 21}, [2]int{7, 5}},
	{"hallows-end", "Hallow's End", -1003, [2]int{10, 18}, [2]int{11, 1}},
	{"winter-veil", "Feast of Winter Veil", -1001, [2]int{12, 16}, [2]int{1, 2}},
	{"lunar-festival", "Lunar Festival", -366, [2]int{1, 21}, [2]int{2, 4}},
	{"love-is-in-the-air", "Love is in the Air", -376, [2]int{2, 6}, [2]int{2, 20}},
	{"noblegarden", "Noblegarden", -374, [2]int{4, 1}, [2]int{4, 14}},
	{"childrens-week", "Children's Week", -1002, [2]int{5, 1}, [2]int{5, 7}},
	{"harvest-festival", "Harvest Festival", -1005, [2]int{9, 22}, [2]int{9, 29}},
	{"brewfest", "Brewfest", -370, [2]int{9, 20}, [2]int{10, 6}},
}

Events is the fact table. Dates follow the public holiday calendars (Wowhead and Blizzard's event pages); sort ids are the quest-sort ids the game data gives holiday quests.

Functions

func EventOfName added in v0.7.88

func EventOfName(name string) string

EventOfName is the key of the event a quest of this name looks like, "" for an ordinary quest.

func FactionAdmits added in v0.7.94

func FactionAdmits(faction, side string) bool

FactionAdmits reports whether a friendlyToFaction value ("A", "H", "AH") includes the player's side; an unknown side admits everything. It is the one test of "friendly to the player's side".

func GameFromSavedVariables

func GameFromSavedVariables(sv string) string

GameFromSavedVariables derives the game folder from a ForeverScribe.lua path, <game>/WTF/Account/<account>/SavedVariables/<file>; "" when the path has another shape.

func LoadXP added in v0.7.85

func LoadXP(savedVariables string) map[int]int

LoadXP reads the quest XP table (xpDB-classic.lua) from the game folder of a SavedVariables file; nil when there is none, in which case XP is estimated from quest levels.

func OpenGame

func OpenGame(game string) (*Index, Status)

OpenGame probes the game folder and loads its index. A nil index with a non-nil Status is the normal "no Questie" or "unreadable" case.

func ParseXP added in v0.7.85

func ParseXP(src string) map[int]int

ParseXP reads a quest XP table ("[quest id] = xp" rows, as in a Lua table) into a map; rows that do not parse are skipped.

func RaceBit added in v0.7.94

func RaceBit(race, faction string) (bit uint64, ok bool)

RaceBit is the mask bit of a capture's race token; ok is false for a race the table does not know. Skyborne needs the faction to pick its side's bit.

func RaceMasks added in v0.7.94

func RaceMasks(race, faction string) (bit, side uint64, fellback bool)

RaceMasks resolves the player's race rule: the bit when the race is known, else the side's full mask as a fallback (fellback true), else neither (the race cannot be checked).

func SideMaskOf added in v0.7.94

func SideMaskOf(faction string) uint64

SideMaskOf is the full race mask of a faction ("Horde" or "Alliance"); 0 when it is neither.

func TrainerOf added in v0.7.39

func TrainerOf(e Entity) (profession string, tier int, ok bool)

TrainerOf says which profession the NPC trains and up to which skill. The subname decides: "<Profession> Trainer" and "Junior <Profession> Trainer" teach up to 75; a rank word (Journeyman 150, Expert 225, Artisan 300, Master 375) before the profession's person noun gives that tier. A subname with "Supplies" is a vendor. A bare person noun ("Blacksmith") counts only with the trainer bit of npcFlags, at tier 75.

Types

type Area

type Area struct {
	UIMap int
	Sub   string // the subzone's own name; empty for a zone
	Zone  string
}

type ClassOffer added in v0.7.45

type ClassOffer struct {
	Quest      *Quest
	Giver      Place
	StartLevel int
	Now        bool
}

ClassOffer is a quest limited to one class (or a few) that the character can take now or soon: StartLevel is the character level it opens at (0 when it is open to the character's level now).

type Creature added in v0.7.33

type Creature struct {
	ID    int
	Name  string
	Level int
	Elite bool
	Boss  bool
}

Creature is a creature inside a dungeon.

type Credit added in v0.7.0

type Credit struct {
	Name string
	NPCs []int
}

Credit is a kill-credit objective: killing any of NPCs counts.

type Dungeon added in v0.7.33

type Dungeon struct {
	Area      int
	Name      string
	Alt       []int // alternative area ids of the same dungeon
	Parent    int   // the zone area the entrance stands in; 0 when unknown
	X, Y      float64
	Entrance  bool // X and Y hold the entrance
	Instance  int  // the instance (map) id, from instanceIdToAreaId.lua; 0 when unknown
	Creatures []int
	Quests    []int
}

Dungeon is one row of Zones/dungeons.lua plus what the index links to it: the creatures that spawn in its areas and the quests that send the player in.

func (Dungeon) Areas added in v0.7.33

func (d Dungeon) Areas() []int

Areas is the dungeon's own area id and its alternatives.

type Entity

type Entity struct {
	Name    string
	Sub     string // the NPC's subname, such as a title
	Level   int
	Rank    int    // 0 normal, 1 elite, 2 rare elite, 3 boss, 4 rare
	Faction string // friendlyToFaction: "A", "H", "AH"; empty when Questie names none
	Flags   int    // npcFlags as canonical bits (the Flag constants)
	Spawns  []Spawn
}

func (Entity) IsFlightMaster added in v0.7.98

func (e Entity) IsFlightMaster() bool

IsFlightMaster reports whether the NPC runs a flight path.

func (Entity) IsInnkeeper added in v0.7.101

func (e Entity) IsInnkeeper() bool

IsInnkeeper reports whether the NPC runs an inn, where a hearthstone is bound.

func (Entity) IsTrainer added in v0.7.98

func (e Entity) IsTrainer() bool

IsTrainer reports whether the NPC trains a class or a profession.

func (Entity) IsVendor added in v0.7.98

func (e Entity) IsVendor() bool

IsVendor reports whether the NPC sells goods.

type Event added in v0.7.84

type Event struct {
	Key   string // short stable key, used in the saved setting
	Name  string
	Sort  int // the game's quest-sort id for the event's quests (a public, long-standing id list)
	Start [2]int
	End   [2]int // month, day; an End before Start runs over New Year
}

Event is a yearly holiday event. Windows are the usual dates (the game's calendar moves some by a few days each year); a quest of an event is offered only inside its window.

func EventByKey added in v0.7.84

func EventByKey(key string) (Event, bool)

EventByKey finds an event by its key.

func FindEvent added in v0.7.84

func FindEvent(text string) (Event, bool)

FindEvent matches free text ("Midsummer", "hallows end", "winter veil") to an event. Only whole words count, so "Winterspring" and "Harvest Golem" name no event, and a few letters name none.

func RunningEvents added in v0.7.84

func RunningEvents(t time.Time) []Event

RunningEvents are the events whose window holds t, in table order.

func (Event) Mention added in v0.7.84

func (e Event) Mention() string

Mention is the one line shown while an event runs and the player has not opted in.

func (Event) Running added in v0.7.84

func (e Event) Running(t time.Time) bool

Running reports whether the event's window holds t.

func (Event) Until added in v0.7.84

func (e Event) Until() string

Until is the window's last day as "July 5".

type EventQuest added in v0.7.84

type EventQuest struct {
	ID    int
	Name  string
	Level int
	Start string // "Giver (Zone)"
}

EventQuest is a holiday quest the character could take, with where it starts.

type FlagLayout added in v0.7.100

type FlagLayout struct {
	Source string
	// contains filtered or unexported fields
}

FlagLayout maps a flag's name to its bit in one flavor's npcFlags. Source says where it came from: "enum <path>" when read from the install, else "fallback classic-era" or "fallback modern" with the reason.

func ReadFlagLayout added in v0.7.100

func ReadFlagLayout(st Status) FlagLayout

ReadFlagLayout reads the npcFlags table for the flavor from the install's src/corrections/enum/expansions.lua. When that file or the flavor's table cannot be found, a classic-era build gets the classic-era layout and any other the modern one; Source says which, and why.

type Index

type Index struct {
	Schema int
	DB     string
	Layout string // which field numbering was read: "meta", "classic" or "mixed"
	// FlagLayout says where the npcFlags bit names came from ("enum ..." or a "fallback ..." with the reason); Npcs' Flags are canonical bits.
	FlagLayout string
	Quests     map[int]*Quest
	Npcs       map[int]Entity
	Objects    map[int]Entity
	Items      map[int]Item
	Areas      map[int]Area
	// Dungeons are the dungeons from Zones/dungeons.lua with their creatures and quests;
	// DungeonReason says why there are none. Drops maps a dungeon creature to the items it drops.
	// Nodes are the objects that yield items (herbs, ore, fish, chests), with spawns; NodesReason
	// says why there are none.
	Nodes         map[int]Node
	NodesReason   string
	Dungeons      []Dungeon
	DungeonReason string
	Drops         map[int][]int
}

func ForSavedVariables

func ForSavedVariables(sv string) *Index

ForSavedVariables is the index for the game folder a ForeverScribe.lua path sits in, or nil when there is no readable Questie there (the normal case). It never fails.

func Load

func Load(st Status) (*Index, error)

Load returns the index for the installed QuestieDB: from the local cache, else a fresh parse that is then cached. A cache that cannot be read or written is ignored.

func Parse

func Parse(st Status) (*Index, error)

Parse reads the baked TOC at st.TOC and the zone tables beside it. It returns ErrUnreadable (wrapped) when the rows do not decode as expected.

func (*Index) Available

func (ix *Index) Available(w Who, at Where, skip func(name string) bool) []Offer

Available lists the quests the character could pick up, whose giver stands on their map: best level fit first, then nearest the character. A character with no position gets none (nothing can be called nearby).

func (*Index) ClassQuests added in v0.7.45

func (ix *Index) ClassQuests(w Who, at Where, ahead int, skip func(name string) bool) []ClassOffer

ClassQuests lists the class-restricted quests the character's class can take now or within ahead levels, with the nearest giver on any map (the character's map first). Race, prerequisites, done and in-log quests follow Eligible; the band below the character's level is w.Below. Available now first, then by level.

func (*Index) ClassTrainers added in v0.7.45

func (ix *Index) ClassTrainers(class string) []Trainer

ClassTrainers lists the NPCs whose subname names the class's trainer ("Warrior Trainer"), by id.

func (*Index) Describe added in v0.7.25

func (ix *Index) Describe(refs []Ref) string

Describe names the NPCs or objects in refs with the zone of each one's first known spawn, such as "Elder Mira (Tidepool Cove)". It needs no character position.

func (*Index) DropsOf added in v0.7.33

func (ix *Index) DropsOf(npc int) []int

DropsOf is the items the creature drops, by id.

func (*Index) DungeonOf added in v0.7.85

func (ix *Index) DungeonOf(quest int) *Dungeon

DungeonOf is the dungeon a quest leads to, nil when the index links it to none.

func (*Index) DungeonOfArea added in v0.7.93

func (ix *Index) DungeonOfArea(area int) *Dungeon

DungeonOfArea is the dungeon whose own area, or one of its alternatives, is area.

func (*Index) EventQuests added in v0.7.84

func (ix *Index) EventQuests(key string, w Who) []EventQuest

EventQuests lists an event's quests the character could pick up at their level (the setting is ignored: this is what opting in would add), nearest the level first.

func (*Index) FindByName added in v0.7.25

func (ix *Index) FindByName(name string) []int

FindByName returns the ids of quests named name: the exact (case-insensitive) matches, else those whose name contains it. Ids are ascending.

func (*Index) FindDungeon added in v0.7.33

func (ix *Index) FindDungeon(instance int, name string) *Dungeon

FindDungeon is the dungeon for an instance (map) id, else the one named name (exactly, else by containment either way, case-insensitive). nil when there is none.

func (*Index) Giver added in v0.7.89

func (ix *Index) Giver(q *Quest, at Where) (Place, bool)

Giver is the quest's nearest starter, on the character's map first, else any NPC starter anywhere.

func (*Index) Hostile added in v0.7.94

func (ix *Index) Hostile(q *Quest, w Who) bool

Hostile reports whether every NPC starter of the quest is friendly only to the other side, so the player cannot take it from them. Unknown factions and object starters are never hostile.

func (*Index) Inside added in v0.7.33

func (ix *Index) Inside(d *Dungeon) Inside

Inside lists what lives in the dungeon and which quests send you there.

func (*Index) Locate

func (ix *Index) Locate(questID int, complete bool, at Where) (p Place, objective, ok bool)

Locate is where to go next for a quest in the log: the turn-in when complete, else the nearest objective, else the turn-in. ok is false when nothing is on the character's map.

func (*Index) NodeZones added in v0.7.38

func (ix *Index) NodeZones(nodes []Node, at Where) []NodeZone

NodeZones groups the spawns of the nodes by zone: the character's own zone first (its spots nearest the character first), then the zones with the most spawns. A zone no area table names is left out.

func (*Index) NpcEntity added in v0.7.98

func (ix *Index) NpcEntity(id int) (Entity, bool)

NpcEntity is the NPC's index entry.

func (*Index) NpcFaction added in v0.7.37

func (ix *Index) NpcFaction(id int) string

NpcFaction is the NPC's "friendly to" field: "A", "H" or "AH"; empty when unknown.

func (*Index) NpcPlace added in v0.7.37

func (ix *Index) NpcPlace(id int, at Where) (Place, bool)

NpcPlace is where the NPC stands: its spawn nearest the character on the character's map, else its first spawn anywhere. ok is false when Questie holds no such NPC or no spawn for it.

func (*Index) ProfessionTrainers added in v0.7.39

func (ix *Index) ProfessionTrainers(profession string) []Trainer

ProfessionTrainers lists the NPCs that train the profession, by id.

func (*Index) Services added in v0.7.98

func (ix *Index) Services(kind string) []Service

Services lists the vendors ("vendor"), trainers ("trainer") or flight masters ("flight") the index holds, by id. An NPC without a spawn is left out: it has no place to name.

func (*Index) TripOf added in v0.7.93

func (ix *Index) TripOf(questID int, at *Where) (Trip, bool)

TripOf classifies a quest: it has no counted objectives (no creature, item, kill-credit or area objective) and a giver the data knows, none of whose is also a finisher. at, when set, picks the finisher spawn on the player's map first. ok is false for any other quest, or when no finisher has a known place.

type Inside added in v0.7.33

type Inside struct {
	Name      string
	Zone      string // where the entrance is, the parent zone's name
	X, Y      float64
	Entrance  bool
	Creatures []Creature
	Quests    []*Quest
}

Inside is what the index knows about one dungeon.

type Item added in v0.7.0

type Item struct {
	Name    string
	Npcs    []int // NPCs that drop it
	Objects []int // objects that contain it
}

Item is the part of an item row the planner uses: where it comes from.

type Layout added in v0.7.94

type Layout struct {
	Source string // "meta" when every table came from the install, "classic" when none did, else "mixed"
	// contains filtered or unexported fields
}

Layout is the field numbering of the installed QuestieDB: which numbered field of a quest, NPC, object or item row holds which named value. The numbers are read at run time from the database's own src/meta/*Meta.lua files (a name-to-number table), never kept here as the truth: a build moves fields around (Forever has extraObjectives at 29, where the classic layout has 27). Only when a meta file is absent does the reader fall back to the classic numbering, and Source says which.

func ReadLayout added in v0.7.94

func ReadLayout(st Status) Layout

ReadLayout reads the key maps of the QuestieDB that st.TOC belongs to.

type Node added in v0.7.38

type Node struct {
	ID     int
	Name   string
	Kind   string // KindOre or KindFish when the name says so, else empty
	Spawns []Spawn
	Yields []Yield
}

Node is an object that yields items: a herb node, an ore vein, a fishing school, or a chest.

type NodeZone added in v0.7.38

type NodeZone struct {
	Zone   string
	Spawns int
	Here   bool // the character is in this zone
	Spots  []Spot
	Nodes  []string // the node names that spawn here, most spawns first
	// contains filtered or unexported fields
}

NodeZone is a zone's spawns of a set of nodes.

type Offer

type Offer struct {
	Quest *Quest
	Giver Place
	Diff  int
	Class bool // a class quest the character's class can take
	Event bool // a holiday-event quest: optional, ranked after the rest
}

Offer is a quest that can be picked up, with its nearest giver.

type Place

type Place struct {
	ID   int    // the NPC's or object's id
	Name string // the NPC or object
	Sub  string // subzone, when the area has one
	Zone string
	Map  int // the uiMapID of the zone, 0 when unknown
	X, Y float64
	Dist float64 // distance from the character in map percent; -1 when unknown
}

func (Place) String

func (p Place) String() string

type Quest

type Quest struct {
	ID         int
	Name       string
	Level      int
	Zone       int // the area or zone the quest belongs to (field 17), 0 when it has none
	MinLevel   int
	MaxLevel   int // 0: none
	Races      uint64
	Classes    uint64
	PreSingle  []int
	PreGroup   []int
	Exclusive  []int
	Next       int // quest that makes this one moot once started or completed
	Parent     int
	Until      int // quest whose completion ends availability
	Disabled   int // quest that disables this one while it is in the log
	Starters   []Ref
	Finishers  []Ref
	Creatures  []Ref // objectives that are kills or talks
	Items      []int // item objectives (item ids)
	SrcItems   []int // items the quest needs besides its objectives: the item it starts with (sourceItemId) and requiredSourceItems
	StartItems []int // items that start the quest when used (startedBy's third list): the quest has no NPC or object to pick it up from
	Credits    []Credit
	Triggers   []Trigger // area objectives ("reach this place"): text and the places Questie marks
	Objective  string    // the objective text shown in the quest log (field 8)
	Event      string    // the holiday event's key (Events) when this is a holiday quest, else ""
	Restricted bool      // a requirement this reader cannot check (skill, reputation, spell, event)
	Elite      bool      // the install's own quest tag or type says elite, group, dungeon or raid (false when the install has no such field)
}

Quest is the part of a quest row the advisor uses.

func (*Quest) ClassQuest added in v0.7.0

func (q *Quest) ClassQuest() bool

ClassQuest reports whether the quest is limited to one class or a few (its class mask names at most MaxClassQuestClasses of them), not open to everyone.

func (*Quest) Eligible

func (q *Quest) Eligible(w Who) bool

Eligible reports whether the quest could be picked up now: level, race, class, prerequisites, not done, not in the log, not a placeholder, no requirement this reader cannot check.

type Ref

type Ref struct {
	Object bool
	ID     int
}

type Seasonal added in v0.7.84

type Seasonal string

Seasonal is the player's setting: "" or "off" (the default), "on" for every event, or "on:midsummer,brewfest" for the listed ones.

func (Seasonal) Describe added in v0.7.84

func (s Seasonal) Describe() string

Describe is the setting in words.

func (Seasonal) Offered added in v0.7.88

func (s Seasonal) Offered(key string, t time.Time) bool

Offered reports whether a holiday quest of the event may be offered at t: the event's window holds t (the base rule) and the player has opted in to it.

func (Seasonal) Wants added in v0.7.84

func (s Seasonal) Wants(key string) bool

Wants reports whether the setting opts in to the event.

func (Seasonal) With added in v0.7.84

func (s Seasonal) With(key string, on bool) Seasonal

With returns the setting after turning one event (key "" is every event) on or off. Turning everything off clears the scoped list; turning one event off while "on" covers all leaves the others on.

type Service added in v0.7.98

type Service struct {
	ID     int
	Entity Entity
}

Service is an NPC with a place, found by its subname or name.

type Spawn

type Spawn struct {
	Area int
	X, Y float64
}

Spawn is a place, as percent of the area's map.

type Spot added in v0.7.38

type Spot struct{ X, Y float64 }

Spot is one place to look, in map percent.

type Status

type Status struct {
	Questie  string // Questie's version, "" when not installed
	DB       string // QuestieDB's version, "" when not installed
	Flavor   string
	TOC      string // path of the QuestieDB TOC that holds the data
	Readable bool
	Reason   string
}

Status is what is installed. Readable is true only when the database is in a format this reader understands; Reason says why not otherwise.

func Probe

func Probe(game string) Status

Probe looks for <game>/Interface/AddOns/Questie and QuestieDB and reads only their TOC headers. It never fails: an unreadable database is reported in the Status.

func (Status) Describe

func (s Status) Describe() (ok bool, text string)

Describe is the one-line setup text for the status.

type Trainer added in v0.7.39

type Trainer struct {
	ID   int
	Name string
	Sub  string
	Tier int
}

Trainer is a profession trainer found among the NPCs: Tier is the highest skill it teaches (75, 150, 225, 300 or 375).

type Trigger added in v0.7.78

type Trigger struct {
	Text   string
	Spawns []Spawn
	End    bool // read from triggerEnd: the quest's exploration objective, whose own text may differ from the log's
}

Trigger is an area objective: Questie marks Spawns on the map for it, and no NPC or object stands there.

type Trip added in v0.7.93

type Trip struct {
	Finisher string // the NPC or object that takes the quest in
	Object   bool
	Sub      string // the finisher's subzone, when the area has one
	Zone     string
	Instance string // the dungeon the finisher stands in; "" when it is in the open world
	Map      int
	X, Y     float64
}

Trip is a quest that is handed in somewhere other than where it was given, and that asks for nothing countable: "find this NPC", "deliver this", "speak to". It is a trip, not a quick stop.

func (Trip) Place added in v0.7.93

func (t Trip) Place() string

Place is where the finisher is in words: the subzone with its zone ("Ratchet (The Barrens)"), or the zone alone.

type Where

type Where struct {
	MapID *int
	Zone  string
	X, Y  float64
}

Where is the character's last known place: the uiMapID, or the zone name without one; X and Y are map percent.

type Who

type Who struct {
	Level           int
	ClassID, RaceID int // 0 when not captured: that rule is not checked
	// RaceMask is the player's race bit (wins over RaceID); SideMask is the faction's full race mask,
	// used only when the race is unknown. Side is "A" or "H" for the giver-faction check.
	RaceMask, SideMask uint64
	Side               string
	Done, InLog        map[int]bool
	Below, Above       int
	// Now is the player's clock (the capture's time); Seasonal is their holiday-event setting. A
	// holiday quest is eligible only when its event is running at Now and the setting opts in.
	Now      time.Time
	Seasonal Seasonal
}

func (Who) RaceAllows added in v0.7.94

func (w Who) RaceAllows(mask uint64) bool

RaceAllows is raceAllows for callers outside the package.

type Yield added in v0.7.38

type Yield struct {
	Item  int
	Name  string
	Level int // the item's required level (item scalar 10); 0 when unknown
}

Yield is one item an object contains, from the item row's objectDrops (item field 3).

Jump to

Keyboard shortcuts

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