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