Documentation
¶
Overview ¶
Package levelup answers "what's new at my next level?": the spells and ranks a class trainer teaches in a level window, what they cost when the dataset knows, the nearest class trainer, whether the character's money covers it, and the class quests coming up. Everything comes from the dataset's class_spells and trainer_spells, the capture, and the player's QuestieDB; nothing is guessed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ClassIDs = map[string]int64{"WARRIOR": 1, "PALADIN": 2, "HUNTER": 3, "ROGUE": 4, "PRIEST": 5, "SHAMAN": 7, "MAGE": 8, "WARLOCK": 9, "DRUID": 11}
ClassIDs maps the capture's class token to the dataset's class_id.
Functions ¶
func Facts ¶
func Facts(c character.Character, ds store.DataStore, qx *questie.Index, from, to int) (text string, spells, quests bool)
Facts is the grounded block for "what's new at my next level": the spells to train from level from to to with costs, the total, the money check, the trainer and the class quests coming up. ok is false when the dataset holds nothing for the class and window.
Types ¶
type ClassQuest ¶
type ClassQuest struct {
ID int
Name string
Level int
Giver string
Zone string
X, Y float64
OpensAt int // the level it opens at; 0 when open now
Objective string
}
ClassQuest is a class quest coming up: its giver and where.
func ClassQuests ¶
ClassQuests lists the character's class quests available now or within ahead levels.
type Spell ¶
type Spell struct {
ID int64
Name string
Rank int // 0 when the ability has no rank
Level int // the level it is learned at
New bool // false when it upgrades a known rank
Cost int64 // copper; 0 when no corroborated offer carries one
Seen bool // the cost is the one a trainer showed the player
// SeenAt is when that trainer window was read (unix s); NeedLevel is the level its window said, 0 when none.
SeenAt int64
NeedLevel int
Blocked bool // the trainer showed it as not yet available
}
Spell is one ability or rank a trainer teaches.
type Trainer ¶
Trainer is the nearest class trainer from the player's QuestieDB.
func NearestTrainer ¶
NearestTrainer is the character's class trainer for their faction, in their zone first, else the nearest by map distance, else the first. ok is false without a QuestieDB or a trainer.
func SeenClassTrainer ¶ added in v0.7.47
SeenClassTrainer is the class trainer the player opened (one whose window carries no profession skill gate), the newest on the character's own map first.