QcRuneScript Namespace
How the enchanting screen writes an offer's clue (decision E-884): every letter is either readable or hidden behind a rune (QcRuneGlyphs), and the bookshelves around the table decide how many are readable: floor(letters x shelves / 15), all of them at 15. More...
| Header: | #include <clientcore/session/QcRuneScript.h> |
Classes
| struct | Legibility |
| struct | Sign |
Variables
| const int | fullShelves |
Functions
| QcRuneScript::Legibility | legibility(const std::vector<QcRuneScript::Sign> &signs) |
| int | readableCount(int letters, int shelves) |
| std::vector<QcRuneScript::Sign> | write(const QString &text, quint32 seed, int slot, int shelves) |
Detailed Description
Which letters come first follows from the rune seed the server sends with the offers (EnchantingState::runeSeed, drawn apart from the player's enchanting seed) and the offer's slot alone, so a letter, once readable, stays readable when more shelves are added, nothing flickers while the screen is open, and the order changes only after the player enchants. A hidden letter's rune follows from the seed and the letter (a substitution cipher for the seed: the same letter shows the same rune in all three offers). Spaces stay gaps.
Classes
class Legibility
How much of a clue a reader can make out: its letters (no spaces) and how many of them are readable. More...
class Sign
One character of a clue as the screen draws it: a rune (its index), or the readable character (rune -1). More...
Variable Documentation
const int QcRuneScript::fullShelves
Bookshelves at which every letter is readable.
Function Documentation
QcRuneScript::Legibility QcRuneScript::legibility(const std::vector<QcRuneScript::Sign> &signs)
Returns how many letters of signs there are and how many are readable (what screen readers say: "n of m letters readable", or the clue when all are).
int QcRuneScript::readableCount(int letters, int shelves)
Returns how many of letters are readable with shelves bookshelves (0..15, clamped).
std::vector<QcRuneScript::Sign> QcRuneScript::write(const QString &text, quint32 seed, int slot, int shelves)
Returns the clue text of offer slot as runes and readable characters, with the rune seed seed and shelves bookshelves.