LeviLamina
Loading...
Searching...
No Matches
EconomyTradeableComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/ContainerID.h"
7
8// auto generated forward declare list
9// clang-format off
10class Actor;
12class BaseGameVersion;
13class CompoundTag;
14class DataLoadHelper;
16class Player;
18struct ActorUniqueID;
19struct IntRange;
20struct TradeTable;
21// clang-format on
22
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mLastTradingPlayer;
28 ::ll::TypedStorage<4, 4, int> mUpdateMerchantTimer;
29 ::ll::TypedStorage<1, 1, bool> mAddRecipeOnUpdate;
30 ::ll::TypedStorage<4, 4, int> mRiches;
31 ::ll::TypedStorage<8, 8, ::Actor&> mOwner;
32 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::MerchantRecipeList>> mOffers;
33 ::ll::TypedStorage<8, 32, ::std::string> mDisplayName;
34 ::ll::TypedStorage<8, 32, ::std::string> mGeneratedTablePath;
35 ::ll::TypedStorage<1, 1, bool> mConvertedFromVillagerV1;
36 ::ll::TypedStorage<4, 4, int> mDiscountDegradationTimeStamp;
37 // NOLINTEND
38
39public:
40 // member functions
41 // NOLINTBEGIN
42 MCAPI void _calculateDemandPrices(
43 int lowTierDiscount,
44 int highTierDiscount,
45 int nearbyCuredDiscount,
46 int heroEffectAmplifier,
47 bool hasHeroOfTheVillage,
48 ::BaseGameVersion baseGameVersion
49 );
50
51 MCAPI bool _generateTrades();
52
53 MCAPI ::TradeTable* _getTradeTable();
54
55 MCAPI uint _getTradeTierFromCurrentExp() const;
56
57 MCAPI void _setMaxTradeTier(int tradeTier);
58
59 MCAPI void _setTradeTier(int tradeTier);
60
61 MCAPI void addAdditionalSaveData(::CompoundTag& tag) const;
62
63 MCAPI ::UpdateTradePacket createDataPacket(::ContainerID containerID);
64
65 MCAPI void fixVillagerTierToMatchTradeList(::MerchantRecipeList* oldOffers);
66
67 MCAPI ::IntRange getCurrentCuredDiscount() const;
68
69 MCAPI int getCurrentNearbyCuredDiscount() const;
70
71 MCAPI bool getInteraction(::Player& player, ::ActorInteraction& interaction);
72
73 MCAPI ::MerchantRecipeList* getOffers();
74
75 MCAPI uint getTradeTier() const;
76
77 MCAPI void loadOffersFromTag(::CompoundTag const* tag);
78
79 MCAPI void matchExpAndTier();
80
81 MCAPI void newServerAiStep();
82
83 MCAPI void notifyTrade(int recipeIndex, int numTrades);
84
85 MCAPI void readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
86
87 MCAPI void setCurrentTradeExp(int currentTradeExp);
88
89 MCAPI void setNearbyCuredDiscount(int discount);
90
91 MCAPI void tryIncrementCuredDiscount();
92
93 MCAPI void tryIncrementNearbyCuredDiscount();
94
95 MCAPI void tryToTransferOldOffers(::MerchantRecipeList* oldOffers);
96 // NOLINTEND
97};
Definition ActorInteraction.h:5
Definition Actor.h:104
Definition BaseGameVersion.h:13
Definition CompoundTag.h:13
Definition DataLoadHelper.h:20
Definition EconomyTradeableComponent.h:23
Definition MerchantRecipeList.h:13
Definition Player.h:119
Definition UpdateTradePacket.h:20
Definition ActorUniqueID.h:5
Definition IntRange.h:11
Definition TradeTable.h:5