VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
CVoteController.cpp
Go to the documentation of this file.
1// Generated by `voltmod framework schemagen`. Do not edit.
2
3#include "Schema/Layout.hpp"
4#include "Schema/Notify.hpp"
5
9
10namespace VoltMod::Schema
11{
12
13// ---- CVoteController ---------------------------------------------
14static const int32_t& kCVoteController_ActiveIssueIndex = GeneratedFields[109].Offset; // int32
15static const int32_t& kCVoteController_OnlyTeamToVote = GeneratedFields[110].Offset; // int32
16static const int32_t& kCVoteController_VoteOptionCount = GeneratedFields[111].Offset; // int32[5]
17static const int32_t& kCVoteController_PotentialVotes = GeneratedFields[112].Offset; // int32
18static const int32_t& kCVoteController_IsYesNoVote = GeneratedFields[113].Offset; // bool
19static const int32_t& kCVoteController_AcceptingVotesTimer = GeneratedFields[114].Offset; // CountdownTimer
20static const int32_t& kCVoteController_ExecuteCommandTimer = GeneratedFields[115].Offset; // CountdownTimer
21static const int32_t& kCVoteController_ResetVoteTimer = GeneratedFields[116].Offset; // CountdownTimer
22static const int32_t& kCVoteController_VotesCast = GeneratedFields[117].Offset; // int32[64]
23static const int32_t& kCVoteController_PlayerHoldingVote = GeneratedFields[118].Offset; // CPlayerSlot
24static const int32_t& kCVoteController_PlayerOverrideForVote = GeneratedFields[119].Offset; // CPlayerSlot
25static const int32_t& kCVoteController_HighestCountIndex = GeneratedFields[120].Offset; // int32
26static const int32_t& kCVoteController_PotentialIssues = GeneratedFields[121].Offset; // CUtlVector< CBaseIssue* >
27static const int32_t& kCVoteController_VoteOptions = GeneratedFields[122].Offset; // CUtlVector< char* >
28
30{
31 if (!_base)
32 {
33 return {};
34 }
35
37}
38
49
51{
52 if (!_base)
53 {
54 return {};
55 }
56
58}
59
70
71int32_t CVoteController::VoteOptionCount(size_t index) const
72{
73 if (!_base || index >= 5)
74 {
75 return {};
76 }
77
79}
80
81void CVoteController::SetVoteOptionCount(size_t index, int32_t value) const
82{
83 if (!_base || index >= 5)
84 {
85 return;
86 }
87
90 _ownerOffset + kCVoteController_VoteOptionCount + static_cast<int32_t>(index * sizeof(int32_t)));
91}
92
94{
95 if (!_base)
96 {
97 return {};
98 }
99
101}
102
103void CVoteController::SetPotentialVotes(int32_t value) const
104{
105 if (!_base)
106 {
107 return;
108 }
109
112}
113
115{
116 if (!_base)
117 {
118 return {};
119 }
120
122}
123
125{
126 if (!_base)
127 {
128 return;
129 }
130
133}
134
145
156
167
168int32_t CVoteController::VotesCast(size_t index) const
169{
170 if (!_base || index >= 64)
171 {
172 return {};
173 }
174
176}
177
178void CVoteController::SetVotesCast(size_t index, int32_t value) const
179{
180 if (!_base || index >= 64)
181 {
182 return;
183 }
184
186}
187
189{
190 if (!_base)
191 {
192 return {};
193 }
194
196}
197
199{
200 if (!_base)
201 {
202 return;
203 }
204
206}
207
209{
210 if (!_base)
211 {
212 return {};
213 }
214
216}
217
219{
220 if (!_base)
221 {
222 return;
223 }
224
226}
227
229{
230 if (!_base)
231 {
232 return {};
233 }
234
236}
237
239{
240 if (!_base)
241 {
242 return;
243 }
244
246}
247
252
257
258} // namespace VoltMod::Schema
Typed read/write of engine fields at a base pointer + byte offset.
void SetPlayerHoldingVote(int32_t value) const
int32_t VotesCast(size_t index) const
void SetActiveIssueIndex(int32_t value) const
void SetVotesCast(size_t index, int32_t value) const
void SetIsYesNoVote(bool value) const
void SetHighestCountIndex(int32_t value) const
CountdownTimer AcceptingVotesTimer() const
void SetOnlyTeamToVote(int32_t value) const
CountdownTimer ResetVoteTimer() const
int32_t VoteOptionCount(size_t index) const
void SetVoteOptionCount(size_t index, int32_t value) const
void SetPlayerOverrideForVote(int32_t value) const
void SetPotentialVotes(int32_t value) const
CountdownTimer ExecuteCommandTimer() const
int32_t _ownerOffset
Definition View.hpp:38
::CEntityInstance * _owner
Definition View.hpp:37
static const int32_t & kCVoteController_ExecuteCommandTimer
static const int32_t & kCVoteController_OnlyTeamToVote
static const int32_t & kCVoteController_PlayerHoldingVote
static const int32_t & kCVoteController_VoteOptionCount
void NotifyEntity(CEntityInstance *entity, int32_t offset)
Definition Notify.cpp:10
static const int32_t & kCVoteController_PotentialVotes
static const int32_t & kCVoteController_HighestCountIndex
FieldLayout GeneratedFields[]
Definition Layout.cpp:8
static const int32_t & kCVoteController_VoteOptions
static const int32_t & kCVoteController_ResetVoteTimer
static const int32_t & kCVoteController_IsYesNoVote
static const int32_t & kCVoteController_AcceptingVotesTimer
static const int32_t & kCVoteController_PlayerOverrideForVote
static const int32_t & kCVoteController_VotesCast
static const int32_t & kCVoteController_ActiveIssueIndex
static const int32_t & kCVoteController_PotentialIssues
T * MemberPtr(void *base, std::ptrdiff_t offset) noexcept