LeviLamina
Loading...
Searching...
No Matches
LegacyTradeableComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/legacy/ActorUniqueID.h"
7#include "mc/world/ContainerID.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class CompoundTag;
13class DataLoadHelper;
14class Interaction;
16class Player;
18struct TradeTable;
19// clang-format on
20
21class LegacyTradeableComponent {
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<1, 1, bool> mAddRecipeOnUpdate;
26 ::ll::TypedStorage<1, 1, bool> mResetLockedOnFirstTrade;
27 ::ll::TypedStorage<1, 1, bool> mWillingToBreed;
28 ::ll::TypedStorage<4, 4, int> mRiches;
29 ::ll::TypedStorage<4, 4, int> mTradeTier;
30 ::ll::TypedStorage<4, 4, int> mUpdateMerchantTimer;
31 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mLastPlayerTradeID;
32 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::MerchantRecipeList>> mOffers;
33 ::ll::TypedStorage<8, 32, ::std::string> mDisplayName;
34 ::ll::TypedStorage<8, 24, ::std::vector<int>> mTradeRecipeFirstTime;
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 LegacyTradeableComponent& operator=(LegacyTradeableComponent const&);
40 LegacyTradeableComponent(LegacyTradeableComponent const&);
41 LegacyTradeableComponent();
42
43public:
44 // member functions
45 // NOLINTBEGIN
46 MCAPI ::TradeTable* _getTradeTable(::Actor& owner);
47
48 MCAPI bool _refreshTrades(::Actor& owner);
49
50 MCAPI void addAdditionalSaveData(::CompoundTag& tag) const;
51
52 MCAPI ::UpdateTradePacket createDataPacket(::Actor& owner, ::ContainerID containerID);
53
54 MCAPI ::Interaction getInteraction(::Actor& owner, ::Player& player);
55
56 MCAPI ::std::string const& loadDisplayName(::Actor& owner);
57
58 MCAPI void notifyTrade(::Actor& owner, int recipeIndex, int numTrades);
59
60 MCAPI ::LegacyTradeableComponent& operator=(::LegacyTradeableComponent&&);
61
62 MCAPI void readAdditionalSaveData(::Actor& owner, ::CompoundTag const& tag, ::DataLoadHelper&);
63
64 MCAPI void reloadComponent(::Actor& actor);
65
66 MCAPI void restockAllRecipes(::Actor& owner);
67
68#ifdef LL_PLAT_C
69 MCAPI void setDataFromPacket(::UpdateTradePacket const& packet);
70#endif
71
72 MCAPI void setOffers(::MerchantRecipeList& offers);
73
74 MCAPI bool shouldConvertTrades(::Actor& owner) const;
75
76 MCAPI bool shouldPersistTrades(::Actor& owner) const;
77
78 MCAPI void updateTradeTier(::Actor& owner);
79
80 MCAPI ~LegacyTradeableComponent();
81 // NOLINTEND
82
83public:
84 // static functions
85 // NOLINTBEGIN
86 MCAPI static bool isUseNewTradeScreen(::Actor const& owner);
87 // NOLINTEND
88
89public:
90 // destructor thunk
91 // NOLINTBEGIN
92 MCAPI void $dtor();
93 // NOLINTEND
94};
Definition Actor.h:113
Definition CompoundTag.h:18
Definition DataLoadHelper.h:20
Definition Interaction.h:9
Definition MerchantRecipeList.h:13
Definition Player.h:129
Definition UpdateTradePacket.h:19
Definition TradeTable.h:13