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