Skip to main content

engage/generated/app/
unitring.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-unitring-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        app::linknode_1::{ILinkNode_1, LinkNode_1},
10        system::object::{IObject, Object},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/unitring/UnitRing.md"))]
14    #[::unity::class(namespace = "App", name = "UnitRing")]
15    #[parent(crate::app::linknode_1::LinkNode_1<crate::app::unitring::UnitRing>)]
16    pub struct UnitRing {
17        #[static_field]
18        #[rename(name = "MaxStockCount")]
19        pub max_stock_count: i32,
20        #[offset(32)]
21        #[rename(name = "m_Data")]
22        pub m_data: crate::app::ringdata::RingData,
23        #[offset(40)]
24        #[rename(name = "m_Owner")]
25        pub m_owner: crate::app::unit::Unit,
26        #[offset(48)]
27        #[rename(name = "m_StockCount")]
28        pub m_stock_count: u8,
29    }
30}
31
32#[cfg(feature = "app-unitring-types")]
33pub use __types::*;
34
35#[cfg(feature = "app-unitring")]
36impl UnitRing {
37    #[doc = "`IsSingleStockOnly(crate::app::ringdata::RingData, crate::app::unit::Unit)` overload"]
38    pub fn is_single_stock_only_2(
39        data: impl ::core::convert::Into<crate::app::ringdata::RingData>,
40        owner: impl ::core::convert::Into<crate::app::unit::Unit>,
41    ) -> bool {
42        unsafe {
43            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c840usize)as*mut u8,bool;
44(crate::app::ringdata::RingData)::core::convert::Into::into(data),(crate::app::unit::Unit)::core::convert::Into::into(owner))
45        }
46    }
47}
48
49#[cfg(feature = "app-unitring")]
50pub trait IUnitRingMethods: IUnitRing {
51    #[doc = "`Build(::unity::Il2CppString, crate::app::unit::Unit, i32)` overload"]
52    fn build(
53        self,
54        rnid: impl ::core::convert::Into<::unity::Il2CppString>,
55        owner: impl ::core::convert::Into<crate::app::unit::Unit>,
56        stock_count: impl ::core::convert::Into<i32>,
57    ) -> () {
58        unsafe {
59            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
60            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c6e0usize)as*mut u8,();
61(UnitRing)__receiver,(::unity::Il2CppString)::core::convert::Into::into(rnid),(crate::app::unit::Unit)::core::convert::Into::into(owner),(i32)::core::convert::Into::into(stock_count))
62        }
63    }
64    #[doc = "`GetName()` overload"]
65    fn get_name(self) -> ::unity::Il2CppString {
66        unsafe {
67            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
68            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c860usize)as*mut u8, ::unity::Il2CppString;
69(UnitRing)__receiver)
70        }
71    }
72    #[doc = "`GetFullName()` overload"]
73    fn get_full_name(self) -> ::unity::Il2CppString {
74        unsafe {
75            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
76            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c870usize)as*mut u8, ::unity::Il2CppString;
77(UnitRing)__receiver)
78        }
79    }
80    #[doc = "`GetDebugName()` overload"]
81    fn get_debug_name(self) -> ::unity::Il2CppString {
82        unsafe {
83            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
84            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c880usize)as*mut u8, ::unity::Il2CppString;
85(UnitRing)__receiver)
86        }
87    }
88    #[doc = "`ChangeOwner(crate::app::unit::Unit)` overload"]
89    fn change_owner(self, owner: impl ::core::convert::Into<crate::app::unit::Unit>) -> () {
90        unsafe {
91            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
92            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c890usize)as*mut u8,();
93(UnitRing)__receiver,(crate::app::unit::Unit)::core::convert::Into::into(owner))
94        }
95    }
96    #[doc = "`SetStockCount(i32)` overload"]
97    fn set_stock_count(self, stock_count: impl ::core::convert::Into<i32>) -> () {
98        unsafe {
99            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
100            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c8b0usize)as*mut u8,();
101(UnitRing)__receiver,(i32)::core::convert::Into::into(stock_count))
102        }
103    }
104    #[doc = "`AddStockCount(i32)` overload"]
105    fn add_stock_count(self, stock_count: impl ::core::convert::Into<i32>) -> () {
106        unsafe {
107            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
108            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c920usize)as*mut u8,();
109(UnitRing)__receiver,(i32)::core::convert::Into::into(stock_count))
110        }
111    }
112    #[doc = "`get_SortKey()` overload"]
113    fn get_sort_key(self) -> i32 {
114        unsafe {
115            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
116            {
117                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
118                let __vi = *__vt.get(6usize).unwrap_or_else(|| {
119                    panic!(
120                        "unity: virtual slot {}
121 out of range (vtable len {}
122) on the runtime class behind {}
123 (method `{}
124`)",
125                        6usize,
126                        __vt.len(),
127                        <UnitRing as ::unity::ClassIdentity>::NAME,
128                        "get_SortKey",
129                    )
130                });
131                let __inner: extern "C" fn(UnitRing, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
132                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
133                __inner(__receiver, __mi)
134            }
135        }
136    }
137    #[doc = "`IsSingleStockOnly()` overload"]
138    fn is_single_stock_only(self) -> bool {
139        unsafe {
140            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
141            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c900usize)as*mut u8,bool;
142(UnitRing)__receiver)
143        }
144    }
145    #[doc = "`get_Data()` overload"]
146    fn get_data(self) -> crate::app::ringdata::RingData {
147        unsafe {
148            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
149            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c990usize)as*mut u8,crate::app::ringdata::RingData;
150(UnitRing)__receiver)
151        }
152    }
153    #[doc = "`get_Owner()` overload"]
154    fn get_owner(self) -> crate::app::unit::Unit {
155        unsafe {
156            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
157            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c9a0usize)as*mut u8,crate::app::unit::Unit;
158(UnitRing)__receiver)
159        }
160    }
161    #[doc = "`get_StockCount()` overload"]
162    fn get_stock_count(self) -> i32 {
163        unsafe {
164            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
165            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c9b0usize)as*mut u8,i32;
166(UnitRing)__receiver)
167        }
168    }
169    #[doc = "`get_Rnid()` overload"]
170    fn get_rnid(self) -> ::unity::Il2CppString {
171        unsafe {
172            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
173            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c9c0usize)as*mut u8, ::unity::Il2CppString;
174(UnitRing)__receiver)
175        }
176    }
177    #[doc = "`OnSerialize(crate::app::stream_2::Stream_2)` overload"]
178    fn on_serialize(self, stream: impl ::core::convert::Into<crate::app::stream_2::Stream_2>) -> () {
179        unsafe {
180            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
181            {
182                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
183                let __vi = *__vt.get(7usize).unwrap_or_else(|| {
184                    panic!(
185                        "unity: virtual slot {}
186 out of range (vtable len {}
187) on the runtime class behind {}
188 (method `{}
189`)",
190                        7usize,
191                        __vt.len(),
192                        <UnitRing as ::unity::ClassIdentity>::NAME,
193                        "OnSerialize",
194                    )
195                });
196                let __inner: extern "C" fn(UnitRing, crate::app::stream_2::Stream_2, ::unity::OptionalMethod) -> () =
197                    ::core::mem::transmute(__vi.method_ptr);
198                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
199                __inner(__receiver, ::core::convert::Into::into(stream), __mi)
200            }
201        }
202    }
203    #[doc = "`OnDeserialize(crate::app::stream_2::Stream_2, i32)` overload"]
204    fn on_deserialize(self, stream: impl ::core::convert::Into<crate::app::stream_2::Stream_2>, version: impl ::core::convert::Into<i32>) -> () {
205        unsafe {
206            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
207            {
208                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
209                let __vi = *__vt.get(8usize).unwrap_or_else(|| {
210                    panic!(
211                        "unity: virtual slot {}
212 out of range (vtable len {}
213) on the runtime class behind {}
214 (method `{}
215`)",
216                        8usize,
217                        __vt.len(),
218                        <UnitRing as ::unity::ClassIdentity>::NAME,
219                        "OnDeserialize",
220                    )
221                });
222                let __inner: extern "C" fn(UnitRing, crate::app::stream_2::Stream_2, i32, ::unity::OptionalMethod) -> () =
223                    ::core::mem::transmute(__vi.method_ptr);
224                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
225                __inner(
226                    __receiver,
227                    ::core::convert::Into::into(stream),
228                    ::core::convert::Into::into(version),
229                    __mi,
230                )
231            }
232        }
233    }
234    #[doc = "`IsValid()` overload"]
235    fn is_valid(self) -> bool {
236        unsafe {
237            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
238            {
239                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
240                let __vi = *__vt.get(5usize).unwrap_or_else(|| {
241                    panic!(
242                        "unity: virtual slot {}
243 out of range (vtable len {}
244) on the runtime class behind {}
245 (method `{}
246`)",
247                        5usize,
248                        __vt.len(),
249                        <UnitRing as ::unity::ClassIdentity>::NAME,
250                        "IsValid",
251                    )
252                });
253                let __inner: extern "C" fn(UnitRing, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
254                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
255                __inner(__receiver, __mi)
256            }
257        }
258    }
259    #[doc = "`Clear()` overload"]
260    fn clear(self) -> () {
261        unsafe {
262            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
263            ::unity::il2cpp_call!((::unity::module_base()+0x1c5c800usize)as*mut u8,();
264(UnitRing)__receiver)
265        }
266    }
267    #[doc = "`.ctor()` overload"]
268    fn ctor(self) -> () {
269        unsafe {
270            let __receiver = <UnitRing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
271            ::unity::il2cpp_call!((::unity::module_base()+0x1c5cb90usize)as*mut u8,();
272(UnitRing)__receiver)
273        }
274    }
275}
276
277#[cfg(feature = "app-unitring")]
278impl<__T: IUnitRing> IUnitRingMethods for __T {}
279
280#[cfg(feature = "app-unitring")]
281impl UnitRing {
282    pub fn build_method_info() -> &'static ::unity::il2cpp::MethodInfo {
283        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
284    }
285
286    pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
287        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
288    }
289
290    pub fn get_full_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
291        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
292    }
293
294    pub fn get_debug_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
295        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
296    }
297
298    pub fn change_owner_method_info() -> &'static ::unity::il2cpp::MethodInfo {
299        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
300    }
301
302    pub fn set_stock_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
303        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
304    }
305
306    pub fn add_stock_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
307        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
308    }
309
310    pub fn get_sort_key_method_info() -> &'static ::unity::il2cpp::MethodInfo {
311        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
312    }
313
314    pub fn is_single_stock_only_method_info() -> &'static ::unity::il2cpp::MethodInfo {
315        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
316    }
317
318    pub fn is_single_stock_only_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
319        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
320    }
321
322    pub fn get_data_method_info() -> &'static ::unity::il2cpp::MethodInfo {
323        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
324    }
325
326    pub fn get_owner_method_info() -> &'static ::unity::il2cpp::MethodInfo {
327        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
328    }
329
330    pub fn get_stock_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
331        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
332    }
333
334    pub fn get_rnid_method_info() -> &'static ::unity::il2cpp::MethodInfo {
335        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
336    }
337
338    pub fn on_serialize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
339        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
340    }
341
342    pub fn on_deserialize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
343        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
344    }
345
346    pub fn is_valid_method_info() -> &'static ::unity::il2cpp::MethodInfo {
347        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
348    }
349
350    pub fn clear_method_info() -> &'static ::unity::il2cpp::MethodInfo {
351        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
352    }
353
354    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
355        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
356    }
357}
358
359#[cfg(feature = "app-unitring")]
360impl UnitRing {
361    #[doc = "Direct (non-virtual) call to `UnitRing`'s own `get_SortKey`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
362    pub unsafe fn get_sort_key(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
363        let __mi = Self::get_sort_key_method_info();
364        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
365        __inner(this.into(), ::core::option::Option::None)
366    }
367
368    #[doc = "Direct (non-virtual) call to `UnitRing`'s own `OnSerialize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
369    pub unsafe fn on_serialize(this: impl ::core::convert::Into<::unity::IlInstance>, stream: crate::app::stream_2::Stream_2) -> () {
370        let __mi = Self::on_serialize_method_info();
371        let __inner: extern "C" fn(::unity::IlInstance, crate::app::stream_2::Stream_2, ::unity::OptionalMethod) -> () =
372            ::core::mem::transmute(__mi.method_ptr);
373        __inner(this.into(), stream, ::core::option::Option::None)
374    }
375
376    #[doc = "Direct (non-virtual) call to `UnitRing`'s own `OnDeserialize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
377    pub unsafe fn on_deserialize(this: impl ::core::convert::Into<::unity::IlInstance>, stream: crate::app::stream_2::Stream_2, version: i32) -> () {
378        let __mi = Self::on_deserialize_method_info();
379        let __inner: extern "C" fn(::unity::IlInstance, crate::app::stream_2::Stream_2, i32, ::unity::OptionalMethod) -> () =
380            ::core::mem::transmute(__mi.method_ptr);
381        __inner(this.into(), stream, version, ::core::option::Option::None)
382    }
383
384    #[doc = "Direct (non-virtual) call to `UnitRing`'s own `IsValid`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
385    pub unsafe fn is_valid(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
386        let __mi = Self::is_valid_method_info();
387        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
388        __inner(this.into(), ::core::option::Option::None)
389    }
390}
391
392#[cfg(feature = "app-unitring")]
393impl UnitRing {
394    #[doc = "`.ctor()` — no args"]
395    pub fn new() -> Self {
396        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
397            panic!(
398                "{}
399::{}
400 failed to instantiate",
401                ::core::stringify!(UnitRing),
402                ::core::stringify!(new),
403            )
404        });
405        <Self as IUnitRingMethods>::ctor(this);
406        this
407    }
408}
409
410#[cfg(feature = "app-unitring")]
411#[doc(hidden)]
412pub mod prelude {
413    pub use super::{IUnitRing, IUnitRingMethods, UnitRing};
414    #[cfg(feature = "app-linknode_1")]
415    pub use crate::app::linknode_1::ILinkNode_1Methods;
416    #[cfg(feature = "system-object")]
417    pub use crate::system::object::IObjectMethods;
418    pub use crate::{app::linknode_1::ILinkNode_1, system::object::IObject};
419}