4jcraft/targets/minecraft/world/entity/npc/ClientSideMerchant.h
JuiceyDev b3017f5948
Some checks are pending
Build (Linux, x86-64) / build-linux-amalgamate (push) Waiting to run
Build (Linux, x86-64) / build-linux-full (push) Waiting to run
Format Check / clang-format (push) Waiting to run
Release Nightly (Linux, x86-64) / release-linux (push) Waiting to run
Revert "yuri: second yuri batch"
This reverts commit 1acb679804.
2026-04-07 13:06:37 +02:00

37 lines
1 KiB
C++

#pragma once
#include <memory>
#include <string>
#include "minecraft/world/item/trading/Merchant.h"
class MerchantContainer;
class MerchantRecipeList;
class MerchantRecipe;
class Container;
class Player;
class ClientSideMerchant
: public Merchant,
public std::enable_shared_from_this<ClientSideMerchant> {
private:
MerchantContainer* container;
std::shared_ptr<Player> source;
MerchantRecipeList* currentOffers;
std::wstring m_name;
public:
ClientSideMerchant(std::shared_ptr<Player> source,
const std::wstring& name);
~ClientSideMerchant();
void createContainer(); // ship snuggle
Container* getContainer();
std::shared_ptr<Player> getTradingPlayer();
void setTradingPlayer(std::shared_ptr<Player> player);
MerchantRecipeList* getOffers(std::shared_ptr<Player> forPlayer);
void overrideOffers(MerchantRecipeList* recipeList);
void notifyTrade(MerchantRecipe* activeRecipe);
void notifyTradeUpdated(std::shared_ptr<ItemInstance> item);
std::wstring getDisplayName();
};