Skip to main content

engage/generated/app/
battleutil.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-battleutil-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        valuetype::{IValueType, ValueType},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/battleutil/BattleUtil.md"))]
14    #[::unity::class(namespace = "App", name = "BattleUtil")]
15    #[parent(crate::system::object::Object)]
16    pub struct BattleUtil {}
17
18    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/battleutil/BattleUtil_CalcScope.md"))]
19    #[repr(C)]
20    #[derive(::core::clone::Clone, ::core::marker::Copy)]
21    pub struct BattleUtil_CalcScope {
22        pub info: crate::app::battleinfo::BattleInfo,
23        pub calc: crate::app::battlecalculator::BattleCalculator,
24    }
25    impl ::unity::ClassIdentity for BattleUtil_CalcScope {
26        const NAME: &'static str = "BattleUtil.CalcScope";
27        const NAMESPACE: &'static str = "App";
28
29        fn class() -> ::unity::Class {
30            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
31            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
32        }
33    }
34    impl ::unity::IlType for BattleUtil_CalcScope {
35        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
36            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
37        }
38    }
39    impl BattleUtil_CalcScope {
40        #[inline]
41        pub fn s_stack() -> crate::system::collections::generic::stack_1::Stack_1<crate::app::battlecalculator::BattleCalculator> {
42            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
43            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "s_Stack");
44            ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
45        }
46
47        #[inline]
48        pub fn set_s_stack(value: crate::system::collections::generic::stack_1::Stack_1<crate::app::battlecalculator::BattleCalculator>) {
49            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
50            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "s_Stack");
51            ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
52        }
53    }
54}
55
56#[cfg(feature = "app-battleutil-types")]
57pub use __types::*;
58
59#[cfg(feature = "app-battleutil")]
60impl BattleUtil {
61    #[doc = "`GetDamageLevel(i32, bool, bool)` overload"]
62    pub fn get_damage_level(
63        damage: impl ::core::convert::Into<i32>,
64        critical: impl ::core::convert::Into<bool>,
65        efficacy: impl ::core::convert::Into<bool>,
66    ) -> crate::app::damagelevel::DamageLevel {
67        unsafe {
68            ::unity::il2cpp_call!((::unity::module_base()+0x1e93b50usize)as*mut u8,crate::app::damagelevel::DamageLevel;
69(i32)::core::convert::Into::into(damage),(bool)::core::convert::Into::into(critical),(bool)::core::convert::Into::into(efficacy))
70        }
71    }
72
73    #[doc = "`GetDamageLevel(crate::app::battlescene::BattleScene, crate::app::battleside::BattleSide_Type)` overload"]
74    pub fn get_damage_level_2(
75        scene: impl ::core::convert::Into<crate::app::battlescene::BattleScene>,
76        side: impl ::core::convert::Into<crate::app::battleside::BattleSide_Type>,
77    ) -> crate::app::damagelevel::DamageLevel {
78        unsafe {
79            ::unity::il2cpp_call!((::unity::module_base()+0x1e93ba0usize)as*mut u8,crate::app::damagelevel::DamageLevel;
80(crate::app::battlescene::BattleScene)::core::convert::Into::into(scene),(crate::app::battleside::BattleSide_Type)::core::convert::Into::into(side))
81        }
82    }
83
84    #[doc = "`CanGainExp(crate::app::battleinfoside::BattleInfoSide)` overload"]
85    pub fn can_gain_exp(current: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>) -> bool {
86        unsafe {
87            ::unity::il2cpp_call!((::unity::module_base()+0x1e93db0usize)as*mut u8,bool;
88(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(current))
89        }
90    }
91
92    #[doc = "`CanGainExp(crate::app::battleinfoside::BattleInfoSide, crate::app::battleinfoside::BattleInfoSide)` overload"]
93    pub fn can_gain_exp_2(
94        current: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
95        reverse: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
96    ) -> bool {
97        unsafe {
98            ::unity::il2cpp_call!((::unity::module_base()+0x1e93ea0usize)as*mut u8,bool;
99(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(current),(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(reverse))
100        }
101    }
102
103    #[doc = "`CanRodExp(crate::app::battleinfoside::BattleInfoSide)` overload"]
104    pub fn can_rod_exp(current: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>) -> bool {
105        unsafe {
106            ::unity::il2cpp_call!((::unity::module_base()+0x1e93ee0usize)as*mut u8,bool;
107(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(current))
108        }
109    }
110
111    #[doc = "`GetBattleExp(crate::app::battleinfoside::BattleInfoSide, crate::app::battleinfoside::BattleInfoSide, ::unity::Il2CppString)` overload"]
112    pub fn get_battle_exp(
113        current: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
114        reverse: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
115        command: impl ::core::convert::Into<::unity::Il2CppString>,
116    ) -> i32 {
117        unsafe {
118            ::unity::il2cpp_call!((::unity::module_base()+0x1e93fd0usize)as*mut u8,i32;
119(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(current),(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(reverse),(::unity::Il2CppString)::core::convert::Into::into(command))
120        }
121    }
122
123    #[doc = "`GetRodExp(crate::app::battleinfoside::BattleInfoSide)` overload"]
124    pub fn get_rod_exp(current: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>) -> i32 {
125        unsafe {
126            ::unity::il2cpp_call!((::unity::module_base()+0x1e940c0usize)as*mut u8,i32;
127(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(current))
128        }
129    }
130
131    #[doc = "`GetDanceExp(crate::app::battleinfoside::BattleInfoSide)` overload"]
132    pub fn get_dance_exp(current: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>) -> i32 {
133        unsafe {
134            ::unity::il2cpp_call!((::unity::module_base()+0x1e941b0usize)as*mut u8,i32;
135(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(current))
136        }
137    }
138
139    #[doc = "`GetSummonExp(crate::app::battleinfoside::BattleInfoSide)` overload"]
140    pub fn get_summon_exp(current: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>) -> i32 {
141        unsafe {
142            ::unity::il2cpp_call!((::unity::module_base()+0x1e942a0usize)as*mut u8,i32;
143(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(current))
144        }
145    }
146
147    #[doc = "`GetGuardExp(crate::app::battleinfoside::BattleInfoSide)` overload"]
148    pub fn get_guard_exp(current: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>) -> i32 {
149        unsafe {
150            ::unity::il2cpp_call!((::unity::module_base()+0x1e94390usize)as*mut u8,i32;
151(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(current))
152        }
153    }
154
155    #[doc = "`GetBattleExp(crate::app::battleinfoside::BattleInfoSide, crate::app::battleinfoside::BattleInfoSide)` overload"]
156    pub fn get_battle_exp_2(
157        current: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
158        reverse: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
159    ) -> i32 {
160        unsafe {
161            ::unity::il2cpp_call!((::unity::module_base()+0x1e94480usize)as*mut u8,i32;
162(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(current),(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(reverse))
163        }
164    }
165
166    #[doc = "`GetEnchantExp(crate::app::unit::Unit, crate::app::unit::Unit)` overload"]
167    pub fn get_enchant_exp(
168        unit: impl ::core::convert::Into<crate::app::unit::Unit>,
169        target: impl ::core::convert::Into<crate::app::unit::Unit>,
170    ) -> i32 {
171        unsafe {
172            ::unity::il2cpp_call!((::unity::module_base()+0x1e94560usize)as*mut u8,i32;
173(crate::app::unit::Unit)::core::convert::Into::into(unit),(crate::app::unit::Unit)::core::convert::Into::into(target))
174        }
175    }
176
177    #[doc = "`IsAmbush(crate::app::battleinfoside::BattleInfoSide, crate::app::battleinfoside::BattleInfoSide)` overload"]
178    pub fn is_ambush(
179        current: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
180        reverse: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
181    ) -> bool {
182        unsafe {
183            ::unity::il2cpp_call!((::unity::module_base()+0x1e94660usize)as*mut u8,bool;
184(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(current),(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(reverse))
185        }
186    }
187
188    #[doc = "`IsIncessantAttack(crate::app::battleinfoside::BattleInfoSide, crate::app::battleinfoside::BattleInfoSide)` overload"]
189    pub fn is_incessant_attack(
190        current: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
191        reverse: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
192    ) -> bool {
193        unsafe {
194            ::unity::il2cpp_call!((::unity::module_base()+0x1e94810usize)as*mut u8,bool;
195(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(current),(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(reverse))
196        }
197    }
198
199    #[doc = "`IsSwapOrder(crate::app::battleinfoside::BattleInfoSide, crate::app::battleinfoside::BattleInfoSide)` overload"]
200    pub fn is_swap_order(
201        current: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
202        reverse: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
203    ) -> bool {
204        unsafe {
205            ::unity::il2cpp_call!((::unity::module_base()+0x1e94670usize)as*mut u8,bool;
206(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(current),(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(reverse))
207        }
208    }
209
210    #[doc = "`HasPlayerUnit(crate::app::battleinfo::BattleInfo)` overload"]
211    pub fn has_player_unit(info: impl ::core::convert::Into<crate::app::battleinfo::BattleInfo>) -> bool {
212        unsafe {
213            ::unity::il2cpp_call!((::unity::module_base()+0x1e94820usize)as*mut u8,bool;
214(crate::app::battleinfo::BattleInfo)::core::convert::Into::into(info))
215        }
216    }
217
218    #[doc = "`IsDetailBattle(crate::app::battleinfo::BattleInfo)` overload"]
219    pub fn is_detail_battle(info: impl ::core::convert::Into<crate::app::battleinfo::BattleInfo>) -> bool {
220        unsafe {
221            ::unity::il2cpp_call!((::unity::module_base()+0x1e94980usize)as*mut u8,bool;
222(crate::app::battleinfo::BattleInfo)::core::convert::Into::into(info))
223        }
224    }
225
226    #[doc = "`IsGrowTalk(crate::app::battleinfoside::BattleInfoSide, crate::app::battleinfoside::BattleInfoSide)` overload"]
227    pub fn is_grow_talk(
228        current: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
229        reverse: impl ::core::convert::Into<crate::app::battleinfoside::BattleInfoSide>,
230    ) -> bool {
231        unsafe {
232            ::unity::il2cpp_call!((::unity::module_base()+0x1e773c0usize)as*mut u8,bool;
233(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(current),(crate::app::battleinfoside::BattleInfoSide)::core::convert::Into::into(reverse))
234        }
235    }
236
237    #[doc = "`CanGainSituation()` overload"]
238    pub fn can_gain_situation() -> bool {
239        unsafe {
240            ::unity::il2cpp_call!((::unity::module_base()+0x1e94e20usize)as*mut u8,bool;
241            )
242        }
243    }
244
245    #[doc = "`PlayLastBattleDieSound()` overload"]
246    pub fn play_last_battle_die_sound() -> () {
247        unsafe {
248            ::unity::il2cpp_call!((::unity::module_base()+0x1e94fe0usize)as*mut u8,();
249            )
250        }
251    }
252}
253
254#[cfg(feature = "app-battleutil")]
255pub trait IBattleUtilMethods: IBattleUtil {
256    #[doc = "`.ctor()` overload"]
257    fn ctor(self) -> () {
258        unsafe {
259            let __receiver = <BattleUtil as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
260            ::unity::il2cpp_call!((::unity::module_base()+0x1e95070usize)as*mut u8,();
261(BattleUtil)__receiver)
262        }
263    }
264}
265
266#[cfg(feature = "app-battleutil")]
267impl<__T: IBattleUtil> IBattleUtilMethods for __T {}
268
269#[cfg(feature = "app-battleutil")]
270impl BattleUtil {
271    pub fn get_damage_level_method_info() -> &'static ::unity::il2cpp::MethodInfo {
272        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
273    }
274
275    pub fn get_damage_level_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
276        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
277    }
278
279    pub fn can_gain_exp_method_info() -> &'static ::unity::il2cpp::MethodInfo {
280        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
281    }
282
283    pub fn can_gain_exp_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
284        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
285    }
286
287    pub fn can_rod_exp_method_info() -> &'static ::unity::il2cpp::MethodInfo {
288        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
289    }
290
291    pub fn get_battle_exp_method_info() -> &'static ::unity::il2cpp::MethodInfo {
292        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
293    }
294
295    pub fn get_rod_exp_method_info() -> &'static ::unity::il2cpp::MethodInfo {
296        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
297    }
298
299    pub fn get_dance_exp_method_info() -> &'static ::unity::il2cpp::MethodInfo {
300        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
301    }
302
303    pub fn get_summon_exp_method_info() -> &'static ::unity::il2cpp::MethodInfo {
304        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
305    }
306
307    pub fn get_guard_exp_method_info() -> &'static ::unity::il2cpp::MethodInfo {
308        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
309    }
310
311    pub fn get_battle_exp_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
312        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
313    }
314
315    pub fn get_enchant_exp_method_info() -> &'static ::unity::il2cpp::MethodInfo {
316        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
317    }
318
319    pub fn is_ambush_method_info() -> &'static ::unity::il2cpp::MethodInfo {
320        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
321    }
322
323    pub fn is_incessant_attack_method_info() -> &'static ::unity::il2cpp::MethodInfo {
324        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
325    }
326
327    pub fn is_swap_order_method_info() -> &'static ::unity::il2cpp::MethodInfo {
328        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
329    }
330
331    pub fn has_player_unit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
332        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
333    }
334
335    pub fn is_detail_battle_method_info() -> &'static ::unity::il2cpp::MethodInfo {
336        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
337    }
338
339    pub fn is_grow_talk_method_info() -> &'static ::unity::il2cpp::MethodInfo {
340        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
341    }
342
343    pub fn can_gain_situation_method_info() -> &'static ::unity::il2cpp::MethodInfo {
344        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
345    }
346
347    pub fn play_last_battle_die_sound_method_info() -> &'static ::unity::il2cpp::MethodInfo {
348        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
349    }
350
351    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
352        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
353    }
354}
355
356#[cfg(feature = "app-battleutil")]
357impl BattleUtil {
358    #[doc = "`.ctor()` — no args"]
359    pub fn new() -> Self {
360        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
361            panic!(
362                "{}
363::{}
364 failed to instantiate",
365                ::core::stringify!(BattleUtil),
366                ::core::stringify!(new),
367            )
368        });
369        <Self as IBattleUtilMethods>::ctor(this);
370        this
371    }
372}
373
374#[cfg(feature = "app-battleutil")]
375impl BattleUtil_CalcScope {
376    #[doc = "`.cctor()` overload"]
377    pub fn cctor() -> () {
378        unsafe {
379            ::unity::il2cpp_call!((::unity::module_base()+0x19bc000usize)as*mut u8,();
380            )
381        }
382    }
383}
384
385#[cfg(feature = "app-battleutil")]
386impl BattleUtil_CalcScope {
387    #[doc = "`.ctor(crate::app::unit::Unit, crate::app::battleinfo::BattleInfo_Flags)` overload"]
388    pub fn ctor(
389        &mut self,
390        unit: impl ::core::convert::Into<crate::app::unit::Unit>,
391        flags: impl ::core::convert::Into<crate::app::battleinfo::BattleInfo_Flags>,
392    ) -> () {
393        unsafe {
394            ::unity::il2cpp_call!((::unity::module_base()+0x19bbcf0usize)as*mut u8,();
395(*mut BattleUtil_CalcScope)self as*mut BattleUtil_CalcScope,(crate::app::unit::Unit)::core::convert::Into::into(unit),(crate::app::battleinfo::BattleInfo_Flags)::core::convert::Into::into(flags))
396        }
397    }
398
399    #[doc = "`Dispose()` overload"]
400    pub fn dispose(&mut self) -> () {
401        unsafe {
402            ::unity::il2cpp_call!((::unity::module_base()+0x19bbec0usize)as*mut u8,();
403(*mut BattleUtil_CalcScope)self as*mut BattleUtil_CalcScope)
404        }
405    }
406
407    #[doc = "`GetSide(crate::app::battleside::BattleSide_Type)` overload"]
408    pub fn get_side(
409        &mut self,
410        side: impl ::core::convert::Into<crate::app::battleside::BattleSide_Type>,
411    ) -> crate::app::battleinfoside::BattleInfoSide {
412        unsafe {
413            ::unity::il2cpp_call!((::unity::module_base()+0x19bbfa0usize)as*mut u8,crate::app::battleinfoside::BattleInfoSide;
414(*mut BattleUtil_CalcScope)self as*mut BattleUtil_CalcScope,(crate::app::battleside::BattleSide_Type)::core::convert::Into::into(side))
415        }
416    }
417}
418
419#[cfg(feature = "app-battleutil")]
420impl BattleUtil_CalcScope {
421    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
422        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
423    }
424
425    pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
426        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
427    }
428
429    pub fn get_side_method_info() -> &'static ::unity::il2cpp::MethodInfo {
430        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
431    }
432
433    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
434        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
435    }
436}
437
438#[cfg(feature = "app-battleutil")]
439#[doc(hidden)]
440pub mod prelude {
441    pub use super::{BattleUtil, BattleUtil_CalcScope, IBattleUtil, IBattleUtilMethods};
442    #[cfg(feature = "system-object")]
443    pub use crate::system::object::IObjectMethods;
444    #[cfg(feature = "system-valuetype")]
445    pub use crate::system::valuetype::IValueTypeMethods;
446    pub use crate::system::{object::IObject, valuetype::IValueType};
447}