38 name = data[
"name"].toString();
39 ind = data[
"ind"].toDouble();
40 readable = data[
"readable"].toString();
43 if(data[
"once"].isBool())
44 once = data[
"once"].toBool();
46 if(data[
"glitch"].isBool())
47 glitch = data[
"glitch"].toBool();
49 if(data[
"tm"].isDouble())
50 tm = data[
"tm"].toDouble();
52 if(data[
"hm"].isDouble())
53 hm = data[
"hm"].toDouble();
55 if(data[
"price"].isDouble())
56 price = data[
"price"].toDouble();
58 if(data[
"info"].isString())
59 info = data[
"info"].toString();
66 else if(
tm > 0 &&
hm > 0)
71 qCritical() <<
"Item: " <<
name <<
", could not be deep linked." ;
77 static bool once =
false;
81 qmlRegisterUncreatableType<ItemDBEntry>(
82 "PSE.DB.ItemDBEntry", 1, 0,
"ItemDBEntry",
"Can't instantiate in QML");
int getBuyPrice() const
The buy rate (backs getBuyPrice).
static GameCornerDB * inst()
< Number of prize entries.
MoveDBEntry * getIndAt(const QString &key) const
Move by name key (for QML).
static MovesDB * inst()
< Number of moves.
static void qmlProtectUtil(const QObject *const obj, const QQmlEngine *const engine)
Pin obj to C++ ownership so the QML engine never garbage-collects it.
int sellPriceMoney() const
QString info
Backing field (read via getInfo()); optional "info" in items.json.
int sellPriceCoins() const
MapDBEntrySpriteItem * getToMapSpriteItemAt(int ind) const
Map-sprite-item ind (for QML).
void deepLink()
Resolve the move/Game-Corner links.
GameCornerDBEntry * getToGameCorner() const
QString readable
Backing field (read via getReadable()).
QString name
Backing field (read via getName()).
MoveDBEntry * toMove
Resolved taught move (deepLink).
friend struct PokemonDBEntry
bool isGameCornerExclusive() const
void qmlRegister() const
Register with QML.
int getToMapSpriteItemSize() const
int getToTeachPokemonSize() const
QString getReadable() const
int tm
Backing field (read via getTm()).
int buyPriceMoney() const
PokemonDBEntry * getToTeachPokemonAt(int ind) const
Taught Pokemon ind (for QML).
int getToEvolvePokemonSize() const
GameCornerDBEntry * toGameCorner
Resolved Game Corner entry (deepLink).
int buyPriceCoins() const
const QVector< PokemonDBEntryEvolution * > getToEvolvePokemon() const
Evolutions triggered by this item.
QVector< PokemonDBEntryEvolution * > toEvolvePokemon
Evolutions using this (back-ref).
bool glitch
Backing field (read via getGlitch()).
QVector< MapDBEntrySpriteItem * > toMapSpriteItem
Map sprites dropping this (back-ref).
QVector< PokemonDBEntry * > toTeachPokemon
Pokemon this teaches (back-ref).
ItemDBEntry()
Empty entry (built by ItemsDB).
QString getName() const
< Internal item name.
PokemonDBEntryEvolution * getToEvolvePokemonAt(int ind) const
Evolution ind (for QML).
int hm
Backing field (read via getHm()).
const QVector< PokemonDBEntry * > getToTeachPokemon() const
Pokemon this TM/HM teaches.
int ind
Backing field (read via getInd()).
bool once
Backing field (read via getOnce()).
MoveDBEntry * getToMove() const
int price
Backing field (read via getPrice()).
friend struct MapDBEntrySpriteItem
Writes toMapSpriteItem.
const QVector< MapDBEntrySpriteItem * > getToMapSpriteItem() const
Map sprites that drop this item.
friend struct PokemonDBEntryEvolution
friend struct GameCornerDBEntry
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
One move's static data (type, power, accuracy, PP, TM/HM), with links.