Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Loading...
Searching...
No Matches
itemmarketentrygcpokemon.h
Go to the documentation of this file.
1/*
2 * Copyright 2020 Twilight
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15*/
16#pragma once
17#include "./itemmarketentry.h"
18
20class Storage;
21class PlayerPokemon;
22class PlayerBasics;
23
32{
33 Q_OBJECT
34
35public:
38
39 virtual QString _name() override;
40 virtual int _inStockCount() override;
41 virtual bool _canSell() override;
42 virtual int _itemWorth() override;
43 virtual QString _whichType() override;
44 virtual int onCartLeft() override;
45 virtual int stackCount() override;
46
47public slots:
48 virtual void checkout() override;
49
50public:
51 static constexpr const char* type = "gcPokemon";
53 PlayerPokemon* party = nullptr;
54 Storage* storage = nullptr;
55};
virtual QString _name() override
Subtype: compute the display name.
virtual void checkout() override
Buy the prize mon (into party/storage).
virtual int _itemWorth() override
Subtype: compute the unit value.
virtual int _inStockCount() override
Subtype: compute the owned/sellable count.
PlayerPokemon * party
Destination party.
virtual int stackCount() override
Subtype: new stack slots needed (see note above).
static constexpr const char * type
This row's type key.
virtual bool _canSell() override
Subtype: compute sellability.
GameCornerDBEntry * toGameCorner
The prize definition.
ItemMarketEntryGCPokemon(GameCornerDBEntry *toGameCorner, PlayerPokemon *party, Storage *storage)
Storage * storage
Overflow PC storage.
virtual QString _whichType() override
Subtype: report the type label.
virtual int onCartLeft() override
Subtype: how many more may be added.
ItemMarketEntry(int compatMoneyCurrency=CompatEither, int compatBuyMode=CompatEither)
The trainer's headline values: name, ID, money, coins, badges, starter.
The player's active party – a specialized PokemonStorageBox.
The PC: the item storage box and all 12 Pokemon boxes.
Definition storage.h:49
One Game Corner prize: a Pokemon or item, its coin price, and level.