CAltarArtifacts.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * CAltarArtifacts.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "../CArtifactsOfHeroAltar.h"
  12. #include "CTradeBase.h"
  13. class CAltarArtifacts : public CExperienceAltar
  14. {
  15. public:
  16. CAltarArtifacts(const IMarket * market, const CGHeroInstance * hero);
  17. TExpType calcExpAltarForHero() override;
  18. void makeDeal() override;
  19. void sacrificeAll() override;
  20. void sacrificeBackpack();
  21. void setSelectedArtifact(const CArtifactInstance * art);
  22. std::shared_ptr<CArtifactsOfHeroAltar> getAOHset() const;
  23. ObjectInstanceID getObjId() const;
  24. void updateSlots() override;
  25. void putBackArtifacts();
  26. private:
  27. ObjectInstanceID altarId;
  28. const CArtifactSet * altarArtifacts;
  29. std::shared_ptr<CArtPlace> selectedArt;
  30. std::shared_ptr<CLabel> selectedSubtitle;
  31. std::shared_ptr<CButton> sacrificeBackpackButton;
  32. std::shared_ptr<CArtifactsOfHeroAltar> heroArts;
  33. std::map<const CArtifactInstance*, std::shared_ptr<CTradeableItem>> tradeSlotsMap;
  34. const std::vector<Point> posSlotsAltar =
  35. {
  36. Point(317, 53), Point(371, 53), Point(425, 53),
  37. Point(479, 53), Point(533, 53), Point(317, 123),
  38. Point(371, 123), Point(425, 123), Point(479, 123),
  39. Point(533, 123), Point(317, 193), Point(371, 193),
  40. Point(425, 193), Point(479, 193), Point(533, 193),
  41. Point(317, 263), Point(371, 263), Point(425, 263),
  42. Point(479, 263), Point(533, 263), Point(398, 333),
  43. Point(452, 333)
  44. };
  45. void onSlotClickPressed(const std::shared_ptr<CTradeableItem> & altarSlot, std::shared_ptr<CTradeableItem> & hCurSlot) override;
  46. TExpType calcExpCost(const CArtifactInstance * art);
  47. };