Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Loading...
Searching...
No Matches
TradeDBEntry Struct Reference

One in-game (NPC) trade definition: what you give and get. More...

#include <trades.h>

Collaboration diagram for TradeDBEntry:

Public Member Functions

 TradeDBEntry ()
 Empty entry.
 TradeDBEntry (QJsonValue &data)
 Build from a JSON value.
void deepLink ()
 Resolve the give/get species links.

Public Attributes

QString give
 Species name you give (resolved to toGive).
QString get
 Species name you get (resolved to toGet).
var8 textId = 0
 Trade dialogue text id.
QString nickname
 Nickname the received mon comes with.
bool unused = false
 Whether this trade slot is unused.
PokemonDBEntrytoGive = nullptr
 Resolved species you give (deepLink).
PokemonDBEntrytoGet = nullptr
 Resolved species you get (deepLink).

Detailed Description

One in-game (NPC) trade definition: what you give and get.

Plain-struct DB entry. toGive / toGet resolve the species in deepLink(). See db.md for the entry convention.

See also
TradesDB.

Definition at line 37 of file trades.h.

Constructor & Destructor Documentation

◆ TradeDBEntry() [1/2]

TradeDBEntry::TradeDBEntry ( )

Empty entry.

Definition at line 34 of file trades.cpp.

◆ TradeDBEntry() [2/2]

TradeDBEntry::TradeDBEntry ( QJsonValue & data)

Build from a JSON value.

Definition at line 35 of file trades.cpp.

References get, give, nickname, textId, and unused.

Member Function Documentation

◆ deepLink()

void TradeDBEntry::deepLink ( )

Resolve the give/get species links.

Definition at line 44 of file trades.cpp.

References get, PokemonDB::getIndAt(), give, PokemonDB::inst(), toGet, and toGive.

Member Data Documentation

◆ get

QString TradeDBEntry::get

Species name you get (resolved to toGet).

Definition at line 43 of file trades.h.

Referenced by deepLink(), and TradeDBEntry().

◆ give

QString TradeDBEntry::give

Species name you give (resolved to toGive).

Definition at line 42 of file trades.h.

Referenced by deepLink(), and TradeDBEntry().

◆ nickname

QString TradeDBEntry::nickname

Nickname the received mon comes with.

Definition at line 45 of file trades.h.

Referenced by TradeDBEntry().

◆ textId

var8 TradeDBEntry::textId = 0

Trade dialogue text id.

Definition at line 44 of file trades.h.

Referenced by TradeDBEntry().

◆ toGet

PokemonDBEntry* TradeDBEntry::toGet = nullptr

Resolved species you get (deepLink).

Definition at line 49 of file trades.h.

Referenced by deepLink().

◆ toGive

PokemonDBEntry* TradeDBEntry::toGive = nullptr

Resolved species you give (deepLink).

Definition at line 48 of file trades.h.

Referenced by deepLink().

◆ unused

bool TradeDBEntry::unused = false

Whether this trade slot is unused.

Definition at line 46 of file trades.h.

Referenced by TradeDBEntry().


The documentation for this struct was generated from the following files: