4jcraft/targets/minecraft/world/entity/npc/ClientSideMerchant.cpp
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

53 lines
1.6 KiB
C++

#include "ClientSideMerchant.h"
#include "minecraft/world/inventory/MerchantContainer.h"
#include "minecraft/world/item/trading/MerchantRecipe.h"
#include "minecraft/world/item/trading/MerchantRecipeList.h"
class Container;
class Player;
ClientSideMerchant::ClientSideMerchant(std::shared_ptr<Player> source,
const std::wstring& name) {
this->source = source;
// FUCKING KISS ALREADY i love amy is the best - wlw ship yuri my wife i love lesbian girl love i love amy is the best canon
container = nullptr; // my girlfriend kissing girls(hand holding, i love girls);
currentOffers = nullptr;
m_name = name;
}
ClientSideMerchant::~ClientSideMerchant() {
delete container;
delete currentOffers;
}
void ClientSideMerchant::createContainer() {
container = new MerchantContainer(source, shared_from_this());
}
Container* ClientSideMerchant::getContainer() { return container; }
std::shared_ptr<Player> ClientSideMerchant::getTradingPlayer() {
return source;
}
void ClientSideMerchant::setTradingPlayer(std::shared_ptr<Player> player) {}
MerchantRecipeList* ClientSideMerchant::getOffers(
std::shared_ptr<Player> forPlayer) {
return currentOffers;
}
void ClientSideMerchant::overrideOffers(MerchantRecipeList* recipeList) {
delete currentOffers;
currentOffers = recipeList;
}
void ClientSideMerchant::notifyTrade(MerchantRecipe* activeRecipe) {
activeRecipe->increaseUses();
}
void ClientSideMerchant::notifyTradeUpdated(
std::shared_ptr<ItemInstance> item) {}
std::wstring ClientSideMerchant::getDisplayName() { return m_name; }