LeviLamina
Loading...
Searching...
No Matches
Trade2ScreenController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/ViewRequest.h"
8#include "mc/client/gui/screens/controllers/ContainerScreenController.h"
9#include "mc/client/gui/screens/controllers/FadeInIconBehavior.h"
10#include "mc/deps/json/Value.h"
11#include "mc/world/item/ItemInstance.h"
12#include "mc/world/item/trading/MerchantRecipe.h"
13
14// auto generated forward declare list
15// clang-format off
17class ItemStackBase;
19struct ActorUniqueID;
20// clang-format on
21
23public:
24 // Trade2ScreenController inner types declare
25 // clang-format off
27 // clang-format on
28
29 // Trade2ScreenController inner types define
30 enum class LeftTabIndex : int {
31 Inventory = 0,
32 Trade = 1,
33 Count = 2,
34 };
35
37 public:
38 // member variables
39 // NOLINTBEGIN
40 ::ll::TypedStorage<8, 16, ::Json::Value const> mCollections;
41 ::ll::TypedStorage<1, 2, ::std::optional<bool>> mHasTradeItem1Collection;
42 ::ll::TypedStorage<1, 2, ::std::optional<bool>> mHasTradeItem2Collection;
43 ::ll::TypedStorage<1, 2, ::std::optional<bool>> mHasSellItemCollection;
44 ::ll::TypedStorage<1, 2, ::std::optional<bool>> mHasValidTradeItemCollections;
45 ::ll::TypedStorage<1, 2, ::std::optional<bool>> mHasValidTradeToggleCollections;
46 ::ll::TypedStorage<4, 8, ::std::optional<int>> mTierIndex;
47 ::ll::TypedStorage<4, 8, ::std::optional<int>> mTradeIndex;
48 ::ll::TypedStorage<8, 16, ::std::optional<::MerchantRecipe*>> mTrade;
49 // NOLINTEND
50
51 public:
52 // member functions
53 // NOLINTBEGIN
54 MCAPI int getTierIndex() const;
55
56 MCAPI int getTradeIndex() const;
57
58 MCAPI bool hasSellItemCollection() const;
59
60 MCAPI bool hasTradeItem1Collection() const;
61
62 MCAPI bool hasTradeItem2Collection() const;
63
64 MCAPI bool hasValidTradeToggleCollections() const;
65
66 MCAPI ~TradeItemCollections();
67 // NOLINTEND
68
69 public:
70 // destructor thunk
71 // NOLINTBEGIN
72 MCFOLD void $dtor();
73 // NOLINTEND
74 };
75
76public:
77 // member variables
78 // NOLINTBEGIN
79 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Trade2ContainerManagerController>> mTradeContainerManagerController;
80 ::ll::TypedStorage<8, 24, ::std::vector<int>> mNumberOfTradesByTier;
81 ::ll::TypedStorage<4, 4, int> mSelectedLeftTab;
82 ::ll::TypedStorage<4, 4, int> mLastExp;
83 ::ll::TypedStorage<4, 4, int> mNewExp;
84 ::ll::TypedStorage<4, 4, int> mExpAnimationTimer;
85 ::ll::TypedStorage<1, 1, bool> mShowVisualOffer;
86 ::ll::TypedStorage<8, 432, ::MerchantRecipe> mVisualOffer;
87 ::ll::TypedStorage<8, 128, ::ItemInstance> mVisualBuyAItem;
88 ::ll::TypedStorage<8, 128, ::ItemInstance> mVisualBuyBItem;
89 ::ll::TypedStorage<8, 128, ::ItemInstance> mVisualSellItem;
90 // NOLINTEND
91
92public:
93 // prevent constructor by default
94 Trade2ScreenController();
95
96public:
97 // virtual functions
98 // NOLINTBEGIN
99 virtual ~Trade2ScreenController() /*override*/ = default;
100
101 virtual ::ui::DirtyFlag tick() /*override*/;
102
103 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
104
105 virtual void onLeave() /*override*/;
106
107 virtual ::ui::ViewRequest _onContainerSlotPressed(::std::string const& collectionName, int index) /*override*/;
108
109 virtual bool _getGestureControlEnabled() const /*override*/;
110
111 virtual void _registerCoalesceOrder() /*override*/;
112
113 virtual void _registerAutoPlaceOrder() /*override*/;
114
115 virtual bool _isStillValid() const /*override*/;
116
117 virtual ::ItemStackBase const&
118 _getVisualItemStackImpl(::std::string const& collectionName, int collectionIndex) const /*override*/;
119
120 virtual void _sendFlyingItem(
121 ::ItemStackBase const& item,
122 ::std::string const& fromName,
123 int fromIndex,
124 ::std::string const& toName,
125 int toIndex,
126 ::FadeInIconBehavior fadeInIconBehavior
127 ) /*override*/;
128
129 virtual ::std::string _getButtonADescription() /*override*/;
130 // NOLINTEND
131
132public:
133 // member functions
134 // NOLINTBEGIN
135 MCAPI Trade2ScreenController(::std::shared_ptr<::ClientInstanceScreenModel> pModel, ::ActorUniqueID uniqueID);
136
137 MCAPI void _changeLeftTab(int dir);
138
139 MCAPI ::ItemInstance const& _getItemForTrade(::Trade2ScreenController::TradeItemCollections const& tic) const;
140
141 MCAPI ::std::string _getTradeErrorDetails(::ItemStackBase const& item, bool itemA) const;
142
143 MCAPI bool _hasAdjustedBuyCount(::Trade2ScreenController::TradeItemCollections const& tic) const;
144
145 MCAPI void _makeEnchantmentDetails() const;
146
147 MCAPI void _makeTradeDetails(bool itemA) const;
148
149 MCAPI void _registerBindings();
150
151 MCAPI void _registerEventHandlers();
152
153 MCAPI void _registerStateMachine();
154 // NOLINTEND
155
156public:
157 // static variables
158 // NOLINTBEGIN
159 MCAPI static ::std::string_view const& SELL_ITEM_COLLECTION();
160
161 MCAPI static ::std::string_view const& TIER_COLLECTION();
162
163 MCAPI static ::std::string_view const& TRADE_COLLECTION();
164
165 MCAPI static ::std::string_view const& TRADE_ITEM_1_COLLECTION();
166
167 MCAPI static ::std::string_view const& TRADE_ITEM_2_COLLECTION();
168 // NOLINTEND
169
170public:
171 // constructor thunks
172 // NOLINTBEGIN
173 MCAPI void* $ctor(::std::shared_ptr<::ClientInstanceScreenModel> pModel, ::ActorUniqueID uniqueID);
174 // NOLINTEND
175
176public:
177 // virtual function thunks
178 // NOLINTBEGIN
179 MCAPI ::ui::DirtyFlag $tick();
180
181 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
182
183 MCAPI void $onLeave();
184
185 MCAPI ::ui::ViewRequest $_onContainerSlotPressed(::std::string const& collectionName, int index);
186
187 MCFOLD bool $_getGestureControlEnabled() const;
188
189 MCAPI void $_registerCoalesceOrder();
190
191 MCAPI void $_registerAutoPlaceOrder();
192
193 MCFOLD bool $_isStillValid() const;
194
195 MCAPI ::ItemStackBase const&
196 $_getVisualItemStackImpl(::std::string const& collectionName, int collectionIndex) const;
197
198 MCAPI void $_sendFlyingItem(
199 ::ItemStackBase const& item,
200 ::std::string const& fromName,
201 int fromIndex,
202 ::std::string const& toName,
203 int toIndex,
204 ::FadeInIconBehavior fadeInIconBehavior
205 );
206
207 MCAPI ::std::string $_getButtonADescription();
208 // NOLINTEND
209
210public:
211 // vftables
212 // NOLINTBEGIN
214
215 MCNAPI static void** $vftableForScreenController();
216 // NOLINTEND
217};
Definition ClientInstanceScreenModel.h:5
Definition ContainerScreenController.h:5
Definition ItemStackBase.h:44
Definition Trade2ContainerManagerController.h:28
Definition Trade2ScreenController.h:15
Definition Trade2ScreenController.h:5
static MCAPI void ** $vftableForScreenController()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
Definition ActorUniqueID.h:5