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
- func Facts(c character.Character, ds store.DataStore, ix *questie.Index, text string, ...) string
- func Hint(s *Scorer, c character.Character, questID int) string
- type Finish
- type Line
- type Scorer
- func (s *Scorer) BestChoice(r character.QuestReward) (it character.RewardItem, slot string, delta float64, ok bool)
- func (s *Scorer) FinishOf(c character.Character, ds store.DataStore, l Line) Finish
- func (s *Scorer) QuestText(c character.Character, ds store.DataStore, id int64) string
- func (s *Scorer) Upgrade(itemID int64) (slot string, delta float64, ok bool)
Constants ¶
const NotSeen = "rewards not seen yet"
NotSeen is said of a quest whose reward window the player never opened.
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.
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 Scorer ¶
type Scorer struct {
// contains filtered or unexported fields
}
Scorer says how much an item improves the character, by the gear scoring.
func NewScorer ¶
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.