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;
16struct Trade;
17struct TradeTable;
18// clang-format on
19
20class LegacyTradeableComponent {
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<1, 1, bool> mAddRecipeOnUpdate;
25 ::ll::TypedStorage<1, 1, bool> mResetLockedOnFirstTrade;
26 ::ll::TypedStorage<1, 1, bool> mWillingToBreed;
27 ::ll::TypedStorage<4, 4, int> mRiches;
28 ::ll::TypedStorage<4, 4, int> mTradeTier;
29 ::ll::TypedStorage<4, 4, int> mUpdateMerchantTimer;
30 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mLastPlayerTradeID;
31 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::MerchantRecipeList>> mOffers;
32 ::ll::TypedStorage<8, 32, ::std::string> mDisplayName;
33 ::ll::TypedStorage<8, 24, ::std::vector<int>> mTradeRecipeFirstTime;
34 // NOLINTEND
35
36public:
37 // prevent constructor by default
38 LegacyTradeableComponent& operator=(LegacyTradeableComponent const&);
39 LegacyTradeableComponent(LegacyTradeableComponent const&);
40 LegacyTradeableComponent();
41
42public:
43 // member functions
44 // NOLINTBEGIN
45 MCAPI ::TradeTable* _getTradeTable(::Actor& owner);
46
47 MCAPI void _rearrangeTradeList(::Actor& owner, ::std::vector<::Trade>& tradeList, uint64 sampleCount);
48
49 MCAPI bool _refreshTrades(::Actor& owner);
50
51 MCAPI void _updateMaxTradeTier(::Actor& owner, int tradeTier);
52
53 MCAPI void addAdditionalSaveData(::CompoundTag& tag) const;
54
55 MCAPI ::UpdateTradePacket createDataPacket(::Actor& owner, ::ContainerID containerID);
56
57 MCAPI void notifyTrade(::Actor& owner, int recipeIndex, int numTrades);
58
59 MCAPI ::LegacyTradeableComponent& operator=(::LegacyTradeableComponent&&);
60
61 MCAPI void readAdditionalSaveData(::Actor& owner, ::CompoundTag const& tag, ::DataLoadHelper&);
62
63 MCAPI void restockAllRecipes(::Actor& owner);
64
65#ifdef LL_PLAT_C
66 MCAPI void setDataFromPacket(::UpdateTradePacket const& packet);
67#endif
68
69 MCAPI void updateTradeTier(::Actor& owner);
70
71 MCAPI ~LegacyTradeableComponent();
72 // NOLINTEND
73
74public:
75 // destructor thunk
76 // NOLINTBEGIN
77 MCAPI void $dtor();
78 // NOLINTEND
79};
Definition Actor.h:106
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition MerchantRecipeList.h:13
Definition UpdateTradePacket.h:19
Definition TradeTable.h:13
Definition Trade.h:10