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
|
|
|
|
|
|
|
|
#include "CTradeBase.h"
|
|
|
|
|
|
|
|
class CAltarCreatures : public CExperienceAltar, public CCreaturesSelling
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CAltarCreatures(const IMarket * market, const CGHeroInstance * hero);
|
2024-02-03 22:59:05 +02:00
|
|
|
void updateSlots() override;
|
2023-12-04 23:21:49 +02:00
|
|
|
void deselect() override;
|
|
|
|
TExpType calcExpAltarForHero() override;
|
|
|
|
void makeDeal() override;
|
|
|
|
void sacrificeAll() override;
|
|
|
|
void updateAltarSlot(std::shared_ptr<CTradeableItem> slot);
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<int> unitsOnAltar;
|
|
|
|
std::vector<int> expPerUnit;
|
|
|
|
|
|
|
|
void readExpValues();
|
|
|
|
void updateControls();
|
2024-02-03 22:59:05 +02:00
|
|
|
void updateSelected();
|
2023-12-04 23:21:49 +02:00
|
|
|
void onOfferSliderMoved(int newVal);
|
2024-02-03 22:59:05 +02:00
|
|
|
void onSlotClickPressed(const std::shared_ptr<CTradeableItem> & newSlot, std::shared_ptr<CTradeableItem> & hCurSlot) override;
|
2023-12-04 23:21:49 +02:00
|
|
|
};
|