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

One wild-encounter slot in a map's encounter table: species + level. More...

#include <mapdbentrywildmon.h>

Inheritance diagram for MapDBEntryWildMon:
Collaboration diagram for MapDBEntryWildMon:

Public Member Functions

const QString getName () const
 < Species name.
int getLevel () const
PokemonDBEntrygetToPokemon () const
MapDBEntrygetParent () const
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.

Protected Member Functions

 MapDBEntryWildMon ()
 Empty entry.
 MapDBEntryWildMon (const QJsonValue &value, MapDBEntry *const parent)
 Build from JSON under parent.
void deepLink ()
 Resolve the species link.
void qmlRegister () const
 Register with QML.

Protected Attributes

QString name = ""
 Species name.
int level = 0
 Encounter level.
PokemonDBEntrytoPokemon = nullptr
 Resolved species (deepLink).
MapDBEntryparent = nullptr
 Owning map.

Friends

class MapsDB
class MapDBEntry

Detailed Description

One wild-encounter slot in a map's encounter table: species + level.

The DB counterpart to the save's AreaPokemonWild. deepLink() resolves toPokemon. A leaf of MapDBEntry (in its red/blue/water tables). See db.md.

See also
MapDBEntry (parent), AreaPokemonWild (the save-side wild slot).

Definition at line 35 of file mapdbentrywildmon.h.

Constructor & Destructor Documentation

◆ MapDBEntryWildMon() [1/2]

MapDBEntryWildMon::MapDBEntryWildMon ( )
protected

Empty entry.

Definition at line 28 of file mapdbentrywildmon.cpp.

References qmlRegister().

◆ MapDBEntryWildMon() [2/2]

MapDBEntryWildMon::MapDBEntryWildMon ( const QJsonValue & value,
MapDBEntry *const parent )
protected

Build from JSON under parent.

Definition at line 32 of file mapdbentrywildmon.cpp.

References level, MapDBEntry, name, parent, and qmlRegister().

Member Function Documentation

◆ deepLink()

void MapDBEntryWildMon::deepLink ( )
protected

Resolve the species link.

Definition at line 41 of file mapdbentrywildmon.cpp.

References PokemonDB::getIndAt(), PokemonDB::inst(), name, and toPokemon.

◆ getLevel()

int MapDBEntryWildMon::getLevel ( ) const
See also
getLevel property.

Definition at line 83 of file mapdbentrywildmon.cpp.

References level.

◆ getName()

const QString MapDBEntryWildMon::getName ( ) const

< Species name.

Encounter level. Resolved species. Owning map.

See also
getName property.

Definition at line 88 of file mapdbentrywildmon.cpp.

References name.

◆ getParent()

MapDBEntry * MapDBEntryWildMon::getParent ( ) const
See also
getParent property.

Definition at line 68 of file mapdbentrywildmon.cpp.

References MapDBEntry, and parent.

◆ getToPokemon()

PokemonDBEntry * MapDBEntryWildMon::getToPokemon ( ) const
See also
getToPokemon property.

Definition at line 78 of file mapdbentrywildmon.cpp.

References toPokemon.

◆ qmlProtect()

void MapDBEntryWildMon::qmlProtect ( const QQmlEngine *const engine) const

Pin to C++ ownership.

Definition at line 73 of file mapdbentrywildmon.cpp.

References Utility::qmlProtectUtil().

◆ qmlRegister()

void MapDBEntryWildMon::qmlRegister ( ) const
protected

Register with QML.

Definition at line 57 of file mapdbentrywildmon.cpp.

Referenced by MapDBEntryWildMon(), and MapDBEntryWildMon().

◆ MapDBEntry

friend class MapDBEntry
friend

Definition at line 64 of file mapdbentrywildmon.h.

References MapDBEntry.

Referenced by getParent(), MapDBEntry, and MapDBEntryWildMon().

◆ MapsDB

friend class MapsDB
friend

Definition at line 63 of file mapdbentrywildmon.h.

References MapsDB.

Referenced by MapsDB.

Member Data Documentation

◆ level

int MapDBEntryWildMon::level = 0
protected

Encounter level.

Definition at line 58 of file mapdbentrywildmon.h.

Referenced by getLevel(), and MapDBEntryWildMon().

◆ name

QString MapDBEntryWildMon::name = ""
protected

Species name.

Definition at line 57 of file mapdbentrywildmon.h.

Referenced by deepLink(), getName(), and MapDBEntryWildMon().

◆ parent

MapDBEntry* MapDBEntryWildMon::parent = nullptr
protected

Owning map.

Definition at line 61 of file mapdbentrywildmon.h.

Referenced by getParent(), and MapDBEntryWildMon().

◆ toPokemon

PokemonDBEntry* MapDBEntryWildMon::toPokemon = nullptr
protected

Resolved species (deepLink).

Definition at line 60 of file mapdbentrywildmon.h.

Referenced by deepLink(), and getToPokemon().


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