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