rewards

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: 10 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 rewards reads the quest rewards the player's own game showed (WoWCompanionDB.questRewards) and scores them for the character with the gear scoring, for a quest, a quest line and a route's turn-in.

Index

Constants

View Source
const NotSeen = "rewards not seen yet"

NotSeen is said of a quest whose reward window the player never opened.

View Source
const YourGame = "quest rewards seen in your game"

YourGame marks facts that came from the player's own capture.

Variables

This section is empty.

Functions

func Facts

func Facts(c character.Character, ds store.DataStore, ix *questie.Index, text string, named []int64) string

Facts is the facts block for a reward, faction or quest-line question: the rewards the player's own game showed, per quest of each line the text names (or of every line with a captured reward when it names none), scored for the character, with the quest that ends each line and what it offers. "" when the capture has no quest rewards and the text names no line. named are quests the text names by title.

func Hint

func Hint(s *Scorer, c character.Character, questID int) string

Hint is the short note a turn-in step carries when a captured choice is an upgrade: "reward upgrade: Bludgeon of Betrayed Virtues (main hand)"; "" when none is, or the quest's rewards were never seen.

Types

type Finish

type Finish struct {
	Line  Line
	Final quests.Step
	Text  string
	Gain  float64 // the best upgrade among the final quest's choices; 0 when none
	Seen  bool
}

Finish is a line's last quest, what it offers, and how much that helps the character.

type Line

type Line struct {
	Name  string
	Steps []quests.Step
}

Line is a quest line in order; the last quest ends it.

func FollowLine

func FollowLine(ds store.DataStore, ix *questie.Index, id int64) (Line, bool)

FollowLine is the line a quest sits in: the dataset's quest_lines when they hold it, else the player's QuestieDB followed forward through each quest's next-quest link from the quest.

type Scorer

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

Scorer says how much an item improves the character, by the gear scoring.

func NewScorer

func NewScorer(c character.Character, ds store.DataStore) *Scorer

NewScorer scores every item the character could wear now or soon. A nil scorer scores nothing.

func (*Scorer) BestChoice

func (s *Scorer) BestChoice(r character.QuestReward) (it character.RewardItem, slot string, delta float64, ok bool)

BestChoice is the choice that helps the character most; ok is false when none is an upgrade.

func (*Scorer) FinishOf

func (s *Scorer) FinishOf(c character.Character, ds store.DataStore, l Line) Finish

FinishOf describes how a line ends for the character.

func (*Scorer) QuestText

func (s *Scorer) QuestText(c character.Character, ds store.DataStore, id int64) string

QuestText is one quest's rewards as a facts clause.

func (*Scorer) Upgrade

func (s *Scorer) Upgrade(itemID int64) (slot string, delta float64, ok bool)

Upgrade is the slot and gain of an item that beats what the character wears; ok is false for any other.

Jump to

Keyboard shortcuts

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