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

40 lines
1.2 KiB
C++
Raw Normal View History

2023-11-05 02:01:23 +02:00
/*
2023-12-04 23:21:49 +02:00
* CAltarArtifacts.h, part of VCMI engine
2023-11-05 02:01:23 +02:00
*
* 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
2023-12-04 23:21:49 +02:00
#include "../CArtifactsOfHeroAltar.h"
2024-03-02 20:30:29 +02:00
#include "CMarketBase.h"
2023-11-05 02:01:23 +02:00
2023-12-04 23:21:49 +02:00
class CAltarArtifacts : public CExperienceAltar
2023-11-05 02:01:23 +02:00
{
public:
CAltarArtifacts(const IMarket * market, const CGHeroInstance * hero);
TExpType calcExpAltarForHero() override;
2024-02-29 12:02:39 +02:00
void deselect() override;
2023-11-05 02:01:23 +02:00
void makeDeal() override;
2024-03-02 20:30:29 +02:00
void update() override;
2023-11-05 02:01:23 +02:00
void sacrificeAll() override;
void sacrificeBackpack();
std::shared_ptr<CArtifactsOfHeroAltar> getAOHset() const;
2024-01-27 23:48:11 +02:00
void putBackArtifacts();
2023-11-05 02:01:23 +02:00
private:
2024-01-12 23:57:19 +02:00
ObjectInstanceID altarId;
const CArtifactSet * altarArtifacts;
2023-11-05 02:01:23 +02:00
std::shared_ptr<CButton> sacrificeBackpackButton;
2024-01-16 16:22:40 +02:00
std::shared_ptr<CArtifactsOfHeroAltar> heroArts;
2024-02-29 12:02:39 +02:00
std::map<std::shared_ptr<CTradeableItem>, const CArtifactInstance*> tradeSlotsMap;
2023-11-05 02:01:23 +02:00
2024-02-29 12:02:39 +02:00
void updateAltarSlots();
2024-03-02 20:30:29 +02:00
CMarketBase::SelectionParams getSelectionParams() const override;
2024-01-16 16:22:40 +02:00
void onSlotClickPressed(const std::shared_ptr<CTradeableItem> & altarSlot, std::shared_ptr<CTradeableItem> & hCurSlot) override;
2024-02-29 12:02:39 +02:00
TExpType calcExpCost(ArtifactID id);
2023-11-05 02:01:23 +02:00
};