#pragma once #include "Slot.h" class MerchantContainer; class Player; class Merchant; class MerchantResultSlot : public Slot { private: std::shared_ptr slots; Player *player; int removeCount; std::shared_ptr merchant; public: MerchantResultSlot(Player *player, std::shared_ptr merchant, std::shared_ptr slots, int id, int x, int y); bool mayPlace(std::shared_ptr item); std::shared_ptr remove(int c); protected: void onQuickCraft(std::shared_ptr picked, int count); void checkTakeAchievements(std::shared_ptr carried); public: void onTake(std::shared_ptr player, std::shared_ptr carried); virtual bool mayCombine(std::shared_ptr item); // 4J Added private: bool removePaymentItemsIfMatching(MerchantRecipe *activeRecipe, std::shared_ptr a, std::shared_ptr b); };