engage/generated/app/
helpitemweaponlevel.rs1#[cfg(feature = "app-helpitemweaponlevel-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 app::helpitembase::{HelpItemBase, IHelpItemBase},
10 system::object::{IObject, Object},
11 unity_engine::{
12 behaviour::{Behaviour, IBehaviour},
13 component::{Component, IComponent},
14 monobehaviour::{IMonoBehaviour, MonoBehaviour},
15 object_2::{IObject_2, Object_2},
16 },
17 };
18
19 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/helpitemweaponlevel/HelpItemWeaponLevel.md"))]
20 #[::unity::class(namespace = "App", name = "HelpItemWeaponLevel")]
21 #[parent(crate::app::helpitembase::HelpItemBase)]
22 pub struct HelpItemWeaponLevel {
23 #[offset(80)]
24 #[rename(name = "m_Index")]
25 pub m_index: i32,
26 #[offset(88)]
27 #[rename(name = "m_TempUnit")]
28 pub m_temp_unit: crate::app::unit::Unit,
29 }
30}
31
32#[cfg(feature = "app-helpitemweaponlevel-types")]
33pub use __types::*;
34
35#[cfg(feature = "app-helpitemweaponlevel")]
36pub trait IHelpItemWeaponLevelMethods: IHelpItemWeaponLevel {
37 #[doc = "`get_HelpItemType()` overload"]
38 fn get_help_item_type(self) -> crate::app::helpmanager::HelpManager_HelpItemType {
39 unsafe {
40 let __receiver = <HelpItemWeaponLevel as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
41 {
42 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
43 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
44 panic!(
45 "unity: virtual slot {}
46 out of range (vtable len {}
47) on the runtime class behind {}
48 (method `{}
49`)",
50 4usize,
51 __vt.len(),
52 <HelpItemWeaponLevel as ::unity::ClassIdentity>::NAME,
53 "get_HelpItemType",
54 )
55 });
56 let __inner: extern "C" fn(HelpItemWeaponLevel, ::unity::OptionalMethod) -> crate::app::helpmanager::HelpManager_HelpItemType =
57 ::core::mem::transmute(__vi.method_ptr);
58 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
59 __inner(__receiver, __mi)
60 }
61 }
62 }
63 #[doc = "`Awake()` overload"]
64 fn awake(self) -> () {
65 unsafe {
66 let __receiver = <HelpItemWeaponLevel as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
67 ::unity::il2cpp_call!((::unity::module_base()+0x297ee40usize)as*mut u8,();
68(HelpItemWeaponLevel)__receiver)
69 }
70 }
71 #[doc = "`GetWeaponKind(crate::app::unit::Unit, i32)` overload"]
72 fn get_weapon_kind(
73 self,
74 unit: impl ::core::convert::Into<crate::app::unit::Unit>,
75 index: impl ::core::convert::Into<i32>,
76 ) -> crate::app::itemdata::ItemData_Kinds {
77 unsafe {
78 let __receiver = <HelpItemWeaponLevel as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
79 ::unity::il2cpp_call!((::unity::module_base()+0x297eeb0usize)as*mut u8,crate::app::itemdata::ItemData_Kinds;
80(HelpItemWeaponLevel)__receiver,(crate::app::unit::Unit)::core::convert::Into::into(unit),(i32)::core::convert::Into::into(index))
81 }
82 }
83 #[doc = "`IsValid()` overload"]
84 fn is_valid(self) -> bool {
85 unsafe {
86 let __receiver = <HelpItemWeaponLevel as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
87 {
88 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
89 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
90 panic!(
91 "unity: virtual slot {}
92 out of range (vtable len {}
93) on the runtime class behind {}
94 (method `{}
95`)",
96 7usize,
97 __vt.len(),
98 <HelpItemWeaponLevel as ::unity::ClassIdentity>::NAME,
99 "IsValid",
100 )
101 });
102 let __inner: extern "C" fn(HelpItemWeaponLevel, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
103 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
104 __inner(__receiver, __mi)
105 }
106 }
107 }
108 #[doc = "`SetContents(crate::app::helpparamsetter::HelpParamSetter)` overload"]
109 fn set_contents(self, setter: impl ::core::convert::Into<crate::app::helpparamsetter::HelpParamSetter>) -> () {
110 unsafe {
111 let __receiver = <HelpItemWeaponLevel as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
112 {
113 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
114 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
115 panic!(
116 "unity: virtual slot {}
117 out of range (vtable len {}
118) on the runtime class behind {}
119 (method `{}
120`)",
121 6usize,
122 __vt.len(),
123 <HelpItemWeaponLevel as ::unity::ClassIdentity>::NAME,
124 "SetContents",
125 )
126 });
127 let __inner: extern "C" fn(HelpItemWeaponLevel, crate::app::helpparamsetter::HelpParamSetter, ::unity::OptionalMethod) -> () =
128 ::core::mem::transmute(__vi.method_ptr);
129 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
130 __inner(__receiver, ::core::convert::Into::into(setter), __mi)
131 }
132 }
133 }
134 #[doc = "`.ctor()` overload"]
135 fn ctor(self) -> () {
136 unsafe {
137 let __receiver = <HelpItemWeaponLevel as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
138 ::unity::il2cpp_call!((::unity::module_base()+0x297f470usize)as*mut u8,();
139(HelpItemWeaponLevel)__receiver)
140 }
141 }
142}
143
144#[cfg(feature = "app-helpitemweaponlevel")]
145impl<__T: IHelpItemWeaponLevel> IHelpItemWeaponLevelMethods for __T {}
146
147#[cfg(feature = "app-helpitemweaponlevel")]
148impl HelpItemWeaponLevel {
149 pub fn get_help_item_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
150 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
151 }
152
153 pub fn awake_method_info() -> &'static ::unity::il2cpp::MethodInfo {
154 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
155 }
156
157 pub fn get_weapon_kind_method_info() -> &'static ::unity::il2cpp::MethodInfo {
158 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
159 }
160
161 pub fn is_valid_method_info() -> &'static ::unity::il2cpp::MethodInfo {
162 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
163 }
164
165 pub fn set_contents_method_info() -> &'static ::unity::il2cpp::MethodInfo {
166 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
167 }
168
169 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
170 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
171 }
172}
173
174#[cfg(feature = "app-helpitemweaponlevel")]
175impl HelpItemWeaponLevel {
176 #[doc = "Direct (non-virtual) call to `HelpItemWeaponLevel`'s own `get_HelpItemType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
177 pub unsafe fn get_help_item_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::app::helpmanager::HelpManager_HelpItemType {
178 let __mi = Self::get_help_item_type_method_info();
179 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::app::helpmanager::HelpManager_HelpItemType =
180 ::core::mem::transmute(__mi.method_ptr);
181 __inner(this.into(), ::core::option::Option::None)
182 }
183
184 #[doc = "Direct (non-virtual) call to `HelpItemWeaponLevel`'s own `IsValid`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
185 pub unsafe fn is_valid(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
186 let __mi = Self::is_valid_method_info();
187 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
188 __inner(this.into(), ::core::option::Option::None)
189 }
190
191 #[doc = "Direct (non-virtual) call to `HelpItemWeaponLevel`'s own `SetContents`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
192 pub unsafe fn set_contents(this: impl ::core::convert::Into<::unity::IlInstance>, setter: crate::app::helpparamsetter::HelpParamSetter) -> () {
193 let __mi = Self::set_contents_method_info();
194 let __inner: extern "C" fn(::unity::IlInstance, crate::app::helpparamsetter::HelpParamSetter, ::unity::OptionalMethod) -> () =
195 ::core::mem::transmute(__mi.method_ptr);
196 __inner(this.into(), setter, ::core::option::Option::None)
197 }
198}
199
200#[cfg(feature = "app-helpitemweaponlevel")]
201impl HelpItemWeaponLevel {
202 #[doc = "`.ctor()` — no args"]
203 pub fn new() -> Self {
204 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
205 panic!(
206 "{}
207::{}
208 failed to instantiate",
209 ::core::stringify!(HelpItemWeaponLevel),
210 ::core::stringify!(new),
211 )
212 });
213 <Self as IHelpItemWeaponLevelMethods>::ctor(this);
214 this
215 }
216}
217
218#[cfg(feature = "app-helpitemweaponlevel")]
219#[doc(hidden)]
220pub mod prelude {
221 pub use super::{HelpItemWeaponLevel, IHelpItemWeaponLevel, IHelpItemWeaponLevelMethods};
222 #[cfg(feature = "app-helpitembase")]
223 pub use crate::app::helpitembase::IHelpItemBaseMethods;
224 #[cfg(feature = "system-object")]
225 pub use crate::system::object::IObjectMethods;
226 #[cfg(feature = "unity_engine-behaviour")]
227 pub use crate::unity_engine::behaviour::IBehaviourMethods;
228 #[cfg(feature = "unity_engine-component")]
229 pub use crate::unity_engine::component::IComponentMethods;
230 #[cfg(feature = "unity_engine-monobehaviour")]
231 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
232 #[cfg(feature = "unity_engine-object_2")]
233 pub use crate::unity_engine::object_2::IObject_2Methods;
234 pub use crate::{
235 app::helpitembase::IHelpItemBase,
236 system::object::IObject,
237 unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
238 };
239}