1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-16 10:19:47 +02:00
vcmi/client/widgets/markets/CAltarCreatures.h

37 lines
1.1 KiB
C++
Raw Normal View History

2023-12-04 23:21:49 +02:00
/*
* CAltarCreatures.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
2024-03-02 20:30:29 +02:00
#include "CMarketBase.h"
2023-12-04 23:21:49 +02:00
2024-03-20 13:28:19 +02:00
class CAltarCreatures :
public CExperienceAltar, public CCreaturesSelling, public CMarketSlider, public CMarketTraderText
2023-12-04 23:21:49 +02:00
{
public:
CAltarCreatures(const IMarket * market, const CGHeroInstance * hero);
2024-03-02 20:30:29 +02:00
void update() override;
2023-12-04 23:21:49 +02:00
void deselect() override;
TExpType calcExpAltarForHero() override;
void makeDeal() override;
void sacrificeAll() override;
private:
std::vector<int> unitsOnAltar;
std::vector<int> expPerUnit;
2024-03-20 13:28:19 +02:00
CMarketBase::MarketShowcasesParams getShowcasesParams() const override;
2024-02-22 22:49:30 +02:00
void updateAltarSlot(const std::shared_ptr<CTradeableItem> & slot);
2023-12-04 23:21:49 +02:00
void readExpValues();
void highlightingChanged() override;
2024-03-02 20:30:29 +02:00
void onOfferSliderMoved(int newVal) override;
void onSlotClickPressed(const std::shared_ptr<CTradeableItem> & newSlot, std::shared_ptr<TradePanelBase> & curPanel) override;
2024-03-20 13:28:19 +02:00
std::string getTraderText() override;
2023-12-04 23:21:49 +02:00
};