engage/generated/app/
weaponmask.rs1#[cfg(feature = "app-weaponmask-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 app::{
10 bitfield32::{BitField32, IBitField32},
11 bitfieldcommon::{BitFieldCommon, IBitFieldCommon},
12 bitfieldtemplate32_1::{BitFieldTemplate32_1, IBitFieldTemplate32_1},
13 },
14 system::{
15 object::{IObject, Object},
16 r#enum::{Enum, IEnum},
17 valuetype::{IValueType, ValueType},
18 },
19 };
20
21 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/weaponmask/WeaponMask_Flag.md"))]
22 #[repr(C)]
23 #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
24 pub struct WeaponMask_Flag {
25 pub value: i32,
26 }
27 impl ::unity::ClassIdentity for WeaponMask_Flag {
28 const NAME: &'static str = "WeaponMask.Flag";
29 const NAMESPACE: &'static str = "App";
30
31 fn class() -> ::unity::Class {
32 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
33 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
34 }
35 }
36 impl ::unity::IlType for WeaponMask_Flag {
37 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
38 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
39 }
40 }
41 impl WeaponMask_Flag {
42 pub fn none() -> Self {
43 Self { value: 1 }
44 }
45
46 pub fn sword() -> Self {
47 Self { value: 2 }
48 }
49
50 pub fn lance() -> Self {
51 Self { value: 4 }
52 }
53
54 pub fn axe() -> Self {
55 Self { value: 8 }
56 }
57
58 pub fn bow() -> Self {
59 Self { value: 16 }
60 }
61
62 pub fn dagger() -> Self {
63 Self { value: 32 }
64 }
65
66 pub fn magic() -> Self {
67 Self { value: 64 }
68 }
69
70 pub fn rod() -> Self {
71 Self { value: 128 }
72 }
73
74 pub fn fist() -> Self {
75 Self { value: 256 }
76 }
77
78 pub fn special() -> Self {
79 Self { value: 512 }
80 }
81 }
82
83 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/weaponmask/WeaponMask.md"))]
84 #[::unity::class(namespace = "App", name = "WeaponMask")]
85 #[parent(crate::app::bitfieldtemplate32_1::BitFieldTemplate32_1<crate::app::weaponmask::WeaponMask_Flag>)]
86 pub struct WeaponMask {}
87}
88
89#[cfg(feature = "app-weaponmask-types")]
90pub use __types::*;
91
92#[cfg(feature = "app-weaponmask")]
93pub trait IWeaponMaskMethods: IWeaponMask {
94 #[doc = "`.ctor()` overload"]
95 fn ctor(self) -> () {
96 unsafe {
97 let __receiver = <WeaponMask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
98 ::unity::il2cpp_call!((::unity::module_base()+0x21ca020usize)as*mut u8,();
99(WeaponMask)__receiver)
100 }
101 }
102 #[doc = "`.ctor(i32)` overload"]
103 fn ctor_2(self, f: impl ::core::convert::Into<i32>) -> () {
104 unsafe {
105 let __receiver = <WeaponMask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
106 ::unity::il2cpp_call!((::unity::module_base()+0x21ca080usize)as*mut u8,();
107(WeaponMask)__receiver,(i32)::core::convert::Into::into(f))
108 }
109 }
110 #[doc = "`.ctor(crate::app::weaponmask::WeaponMask_Flag)` overload"]
111 fn ctor_3(self, f: impl ::core::convert::Into<crate::app::weaponmask::WeaponMask_Flag>) -> () {
112 unsafe {
113 let __receiver = <WeaponMask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
114 ::unity::il2cpp_call!((::unity::module_base()+0x21ca0e0usize)as*mut u8,();
115(WeaponMask)__receiver,(crate::app::weaponmask::WeaponMask_Flag)::core::convert::Into::into(f))
116 }
117 }
118 #[doc = "`ToInt(crate::app::weaponmask::WeaponMask_Flag)` overload"]
119 fn to_int(self, value: impl ::core::convert::Into<crate::app::weaponmask::WeaponMask_Flag>) -> i32 {
120 unsafe {
121 let __receiver = <WeaponMask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
122 {
123 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
124 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
125 panic!(
126 "unity: virtual slot {}
127 out of range (vtable len {}
128) on the runtime class behind {}
129 (method `{}
130`)",
131 5usize,
132 __vt.len(),
133 <WeaponMask as ::unity::ClassIdentity>::NAME,
134 "ToInt",
135 )
136 });
137 let __inner: extern "C" fn(WeaponMask, crate::app::weaponmask::WeaponMask_Flag, ::unity::OptionalMethod) -> i32 =
138 ::core::mem::transmute(__vi.method_ptr);
139 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
140 __inner(__receiver, ::core::convert::Into::into(value), __mi)
141 }
142 }
143 }
144 #[doc = "`Test(crate::app::itemdata::ItemData)` overload"]
145 fn test(self, item: impl ::core::convert::Into<crate::app::itemdata::ItemData>) -> bool {
146 unsafe {
147 let __receiver = <WeaponMask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
148 ::unity::il2cpp_call!((::unity::module_base()+0x21ca150usize)as*mut u8,bool;
149(WeaponMask)__receiver,(crate::app::itemdata::ItemData)::core::convert::Into::into(item))
150 }
151 }
152 #[doc = "`Test(crate::app::itemdata::ItemData_Kinds)` overload"]
153 fn test_2(self, kind: impl ::core::convert::Into<crate::app::itemdata::ItemData_Kinds>) -> bool {
154 unsafe {
155 let __receiver = <WeaponMask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
156 ::unity::il2cpp_call!((::unity::module_base()+0x21ca170usize)as*mut u8,bool;
157(WeaponMask)__receiver,(crate::app::itemdata::ItemData_Kinds)::core::convert::Into::into(kind))
158 }
159 }
160 #[doc = "`Set(crate::app::itemdata::ItemData_Kinds)` overload"]
161 fn set(self, kind: impl ::core::convert::Into<crate::app::itemdata::ItemData_Kinds>) -> () {
162 unsafe {
163 let __receiver = <WeaponMask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
164 ::unity::il2cpp_call!((::unity::module_base()+0x21ca180usize)as*mut u8,();
165(WeaponMask)__receiver,(crate::app::itemdata::ItemData_Kinds)::core::convert::Into::into(kind))
166 }
167 }
168 #[doc = "`Clear(crate::app::itemdata::ItemData_Kinds)` overload"]
169 fn clear(self, kind: impl ::core::convert::Into<crate::app::itemdata::ItemData_Kinds>) -> () {
170 unsafe {
171 let __receiver = <WeaponMask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
172 ::unity::il2cpp_call!((::unity::module_base()+0x21ca1a0usize)as*mut u8,();
173(WeaponMask)__receiver,(crate::app::itemdata::ItemData_Kinds)::core::convert::Into::into(kind))
174 }
175 }
176 #[doc = "`CanEquipFromKind(crate::app::itemdata::ItemData_Kinds)` overload"]
177 fn can_equip_from_kind(self, kind: impl ::core::convert::Into<crate::app::itemdata::ItemData_Kinds>) -> bool {
178 unsafe {
179 let __receiver = <WeaponMask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
180 ::unity::il2cpp_call!((::unity::module_base()+0x21ca1c0usize)as*mut u8,bool;
181(WeaponMask)__receiver,(crate::app::itemdata::ItemData_Kinds)::core::convert::Into::into(kind))
182 }
183 }
184 #[doc = "`get_Exist()` overload"]
185 fn get_exist(self) -> bool {
186 unsafe {
187 let __receiver = <WeaponMask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
188 ::unity::il2cpp_call!((::unity::module_base()+0x21ca1d0usize)as*mut u8,bool;
189(WeaponMask)__receiver)
190 }
191 }
192 #[doc = "`GetRandomForArena()` overload"]
193 fn get_random_for_arena(self) -> crate::app::itemdata::ItemData_Kinds {
194 unsafe {
195 let __receiver = <WeaponMask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
196 ::unity::il2cpp_call!((::unity::module_base()+0x21ca1e0usize)as*mut u8,crate::app::itemdata::ItemData_Kinds;
197(WeaponMask)__receiver)
198 }
199 }
200}
201
202#[cfg(feature = "app-weaponmask")]
203impl<__T: IWeaponMask> IWeaponMaskMethods for __T {}
204
205#[cfg(feature = "app-weaponmask")]
206impl WeaponMask {
207 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
208 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
209 }
210
211 pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
212 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
213 }
214
215 pub fn ctor_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
216 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
217 }
218
219 pub fn to_int_method_info() -> &'static ::unity::il2cpp::MethodInfo {
220 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
221 }
222
223 pub fn test_method_info() -> &'static ::unity::il2cpp::MethodInfo {
224 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
225 }
226
227 pub fn test_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
228 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
229 }
230
231 pub fn set_method_info() -> &'static ::unity::il2cpp::MethodInfo {
232 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
233 }
234
235 pub fn clear_method_info() -> &'static ::unity::il2cpp::MethodInfo {
236 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
237 }
238
239 pub fn can_equip_from_kind_method_info() -> &'static ::unity::il2cpp::MethodInfo {
240 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
241 }
242
243 pub fn get_exist_method_info() -> &'static ::unity::il2cpp::MethodInfo {
244 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
245 }
246
247 pub fn get_random_for_arena_method_info() -> &'static ::unity::il2cpp::MethodInfo {
248 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
249 }
250}
251
252#[cfg(feature = "app-weaponmask")]
253impl WeaponMask {
254 #[doc = "Direct (non-virtual) call to `WeaponMask`'s own `ToInt`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
255 pub unsafe fn to_int(this: impl ::core::convert::Into<::unity::IlInstance>, value: crate::app::weaponmask::WeaponMask_Flag) -> i32 {
256 let __mi = Self::to_int_method_info();
257 let __inner: extern "C" fn(::unity::IlInstance, crate::app::weaponmask::WeaponMask_Flag, ::unity::OptionalMethod) -> i32 =
258 ::core::mem::transmute(__mi.method_ptr);
259 __inner(this.into(), value, ::core::option::Option::None)
260 }
261}
262
263#[cfg(feature = "app-weaponmask")]
264impl WeaponMask {
265 #[doc = "`.ctor()` — no args"]
266 pub fn new() -> Self {
267 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
268 panic!(
269 "{}
270::{}
271 failed to instantiate",
272 ::core::stringify!(WeaponMask),
273 ::core::stringify!(new),
274 )
275 });
276 <Self as IWeaponMaskMethods>::ctor(this);
277 this
278 }
279
280 #[doc = "`.ctor(i32)` — overload selector"]
281 pub fn new_2(f: i32) -> Self {
282 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
283 panic!(
284 "{}
285::{}
286 failed to instantiate",
287 ::core::stringify!(WeaponMask),
288 ::core::stringify!(new_2),
289 )
290 });
291 <Self as IWeaponMaskMethods>::ctor_2(this, f);
292 this
293 }
294
295 #[doc = "`.ctor(crate::app::weaponmask::WeaponMask_Flag)` — overload selector"]
296 pub fn new_3(f: crate::app::weaponmask::WeaponMask_Flag) -> Self {
297 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
298 panic!(
299 "{}
300::{}
301 failed to instantiate",
302 ::core::stringify!(WeaponMask),
303 ::core::stringify!(new_3),
304 )
305 });
306 <Self as IWeaponMaskMethods>::ctor_3(this, f);
307 this
308 }
309}
310
311#[cfg(feature = "app-weaponmask")]
312#[doc(hidden)]
313pub mod prelude {
314 pub use super::{IWeaponMask, IWeaponMaskMethods, WeaponMask, WeaponMask_Flag};
315 #[cfg(feature = "app-bitfield32")]
316 pub use crate::app::bitfield32::IBitField32Methods;
317 #[cfg(feature = "app-bitfieldcommon")]
318 pub use crate::app::bitfieldcommon::IBitFieldCommonMethods;
319 #[cfg(feature = "app-bitfieldtemplate32_1")]
320 pub use crate::app::bitfieldtemplate32_1::IBitFieldTemplate32_1Methods;
321 #[cfg(feature = "system-object")]
322 pub use crate::system::object::IObjectMethods;
323 #[cfg(feature = "system-enum")]
324 pub use crate::system::r#enum::IEnumMethods;
325 #[cfg(feature = "system-valuetype")]
326 pub use crate::system::valuetype::IValueTypeMethods;
327 pub use crate::{
328 app::{bitfield32::IBitField32, bitfieldcommon::IBitFieldCommon, bitfieldtemplate32_1::IBitFieldTemplate32_1},
329 system::{object::IObject, r#enum::IEnum, valuetype::IValueType},
330 };
331}