#pragma once #include "Container.h" #include "../Util/ArrayWithLength.h" class Merchant; class Player; class MerchantRecipe; class MerchantContainer : public Container { private: std::shared_ptr merchant; ItemInstanceArray items; std::shared_ptr player; MerchantRecipe* activeRecipe; int selectionHint; public: MerchantContainer(std::shared_ptr player, std::shared_ptr villager); ~MerchantContainer(); unsigned int getContainerSize(); std::shared_ptr getItem(unsigned int slot); std::shared_ptr removeItem(unsigned int slot, int count); private: bool isPaymentSlot(int slot); public: std::shared_ptr removeItemNoUpdate(int slot); void setItem(unsigned int slot, std::shared_ptr item); std::wstring getName(); std::wstring getCustomName(); bool hasCustomName(); int getMaxStackSize(); bool stillValid(std::shared_ptr player); void startOpen(); void stopOpen(); bool canPlaceItem(int slot, std::shared_ptr item); void setChanged(); void updateSellItem(); MerchantRecipe* getActiveRecipe(); void setSelectionHint(int selectionHint); };