engage/generated/combat/
actiondamage.rs1#[cfg(feature = "combat-actiondamage-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 combat::{
10 actionbase::{ActionBase, IActionBase},
11 state::{IState, State},
12 },
13 system::object::{IObject, Object},
14 };
15
16 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/combat/actiondamage/ActionDamage.md"))]
17 #[::unity::class(namespace = "Combat", name = "ActionDamage")]
18 #[parent(crate::combat::actionbase::ActionBase)]
19 pub struct ActionDamage {
20 #[offset(40)]
21 #[rename(name = "m_Attacker")]
22 pub m_attacker: crate::combat::character::Character,
23 #[offset(48)]
24 #[rename(name = "m_Damager")]
25 pub m_damager: crate::combat::character::Character,
26 #[offset(56)]
27 #[rename(name = "m_HitEv")]
28 pub m_hit_ev: crate::unity_engine::animationevent::AnimationEvent,
29 }
30}
31
32#[cfg(feature = "combat-actiondamage-types")]
33pub use __types::*;
34
35#[cfg(feature = "combat-actiondamage")]
36impl ActionDamage {
37 #[doc = "`ResolveAll(crate::combat::phase::Phase, crate::unity_engine::animationevent::AnimationEvent)` overload"]
38 pub fn resolve_all(
39 phase: impl ::core::convert::Into<crate::combat::phase::Phase>,
40 ev: impl ::core::convert::Into<crate::unity_engine::animationevent::AnimationEvent>,
41 ) -> i32 {
42 unsafe {
43 ::unity::il2cpp_call!((::unity::module_base()+0x2bc4130usize)as*mut u8,i32;
44(crate::combat::phase::Phase)::core::convert::Into::into(phase),(crate::unity_engine::animationevent::AnimationEvent)::core::convert::Into::into(ev))
45 }
46 }
47}
48
49#[cfg(feature = "combat-actiondamage")]
50pub trait IActionDamageMethods: IActionDamage {
51 #[doc = "`get_Name()` overload"]
52 fn get_name(self) -> ::unity::Il2CppString {
53 unsafe {
54 let __receiver = <ActionDamage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
55 {
56 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
57 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
58 panic!(
59 "unity: virtual slot {}
60 out of range (vtable len {}
61) on the runtime class behind {}
62 (method `{}
63`)",
64 5usize,
65 __vt.len(),
66 <ActionDamage as ::unity::ClassIdentity>::NAME,
67 "get_Name",
68 )
69 });
70 let __inner: extern "C" fn(ActionDamage, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
71 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
72 __inner(__receiver, __mi)
73 }
74 }
75 }
76 #[doc = "`get_AbortByInterrupt()` overload"]
77 fn get_abort_by_interrupt(self) -> bool {
78 unsafe {
79 let __receiver = <ActionDamage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
80 {
81 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
82 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
83 panic!(
84 "unity: virtual slot {}
85 out of range (vtable len {}
86) on the runtime class behind {}
87 (method `{}
88`)",
89 11usize,
90 __vt.len(),
91 <ActionDamage as ::unity::ClassIdentity>::NAME,
92 "get_AbortByInterrupt",
93 )
94 });
95 let __inner: extern "C" fn(ActionDamage, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
96 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
97 __inner(__receiver, __mi)
98 }
99 }
100 }
101 #[doc = "`.ctor(crate::combat::character::Character, crate::combat::character::Character, crate::combat::phase::Phase, crate::unity_engine::animationevent::AnimationEvent)` overload"]
102 fn ctor(
103 self,
104 attacker: impl ::core::convert::Into<crate::combat::character::Character>,
105 damager: impl ::core::convert::Into<crate::combat::character::Character>,
106 phase: impl ::core::convert::Into<crate::combat::phase::Phase>,
107 ev: impl ::core::convert::Into<crate::unity_engine::animationevent::AnimationEvent>,
108 ) -> () {
109 unsafe {
110 let __receiver = <ActionDamage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
111 ::unity::il2cpp_call!((::unity::module_base()+0x2bc1940usize)as*mut u8,();
112(ActionDamage)__receiver,(crate::combat::character::Character)::core::convert::Into::into(attacker),(crate::combat::character::Character)::core::convert::Into::into(damager),(crate::combat::phase::Phase)::core::convert::Into::into(phase),(crate::unity_engine::animationevent::AnimationEvent)::core::convert::Into::into(ev))
113 }
114 }
115 #[doc = "`RunLyingWhenDie()` overload"]
116 fn run_lying_when_die(self) -> () {
117 unsafe {
118 let __receiver = <ActionDamage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
119 ::unity::il2cpp_call!((::unity::module_base()+0x2bc2ef0usize)as*mut u8,();
120(ActionDamage)__receiver)
121 }
122 }
123 #[doc = "`OnUpdate()` overload"]
124 fn on_update(self) -> () {
125 unsafe {
126 let __receiver = <ActionDamage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
127 {
128 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
129 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
130 panic!(
131 "unity: virtual slot {}
132 out of range (vtable len {}
133) on the runtime class behind {}
134 (method `{}
135`)",
136 7usize,
137 __vt.len(),
138 <ActionDamage as ::unity::ClassIdentity>::NAME,
139 "OnUpdate",
140 )
141 });
142 let __inner: extern "C" fn(ActionDamage, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
143 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
144 __inner(__receiver, __mi)
145 }
146 }
147 }
148}
149
150#[cfg(feature = "combat-actiondamage")]
151impl<__T: IActionDamage> IActionDamageMethods for __T {}
152
153#[cfg(feature = "combat-actiondamage")]
154impl ActionDamage {
155 pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
156 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
157 }
158
159 pub fn get_abort_by_interrupt_method_info() -> &'static ::unity::il2cpp::MethodInfo {
160 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
161 }
162
163 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
164 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
165 }
166
167 pub fn run_lying_when_die_method_info() -> &'static ::unity::il2cpp::MethodInfo {
168 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
169 }
170
171 pub fn resolve_all_method_info() -> &'static ::unity::il2cpp::MethodInfo {
172 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
173 }
174
175 pub fn on_update_method_info() -> &'static ::unity::il2cpp::MethodInfo {
176 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
177 }
178}
179
180#[cfg(feature = "combat-actiondamage")]
181impl ActionDamage {
182 #[doc = "Direct (non-virtual) call to `ActionDamage`'s own `get_Name`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
183 pub unsafe fn get_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
184 let __mi = Self::get_name_method_info();
185 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
186 __inner(this.into(), ::core::option::Option::None)
187 }
188
189 #[doc = "Direct (non-virtual) call to `ActionDamage`'s own `get_AbortByInterrupt`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
190 pub unsafe fn get_abort_by_interrupt(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
191 let __mi = Self::get_abort_by_interrupt_method_info();
192 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
193 __inner(this.into(), ::core::option::Option::None)
194 }
195
196 #[doc = "Direct (non-virtual) call to `ActionDamage`'s own `OnUpdate`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
197 pub unsafe fn on_update(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
198 let __mi = Self::on_update_method_info();
199 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
200 __inner(this.into(), ::core::option::Option::None)
201 }
202}
203
204#[cfg(feature = "combat-actiondamage")]
205impl ActionDamage {
206 #[doc = "`.ctor(crate::combat::character::Character, crate::combat::character::Character, crate::combat::phase::Phase, crate::unity_engine::animationevent::AnimationEvent)` — overload selector"]
207 pub fn new(
208 attacker: crate::combat::character::Character,
209 damager: crate::combat::character::Character,
210 phase: crate::combat::phase::Phase,
211 ev: crate::unity_engine::animationevent::AnimationEvent,
212 ) -> Self {
213 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
214 panic!(
215 "{}
216::{}
217 failed to instantiate",
218 ::core::stringify!(ActionDamage),
219 ::core::stringify!(new),
220 )
221 });
222 <Self as IActionDamageMethods>::ctor(this, attacker, damager, phase, ev);
223 this
224 }
225}
226
227#[cfg(feature = "combat-actiondamage")]
228#[doc(hidden)]
229pub mod prelude {
230 pub use super::{ActionDamage, IActionDamage, IActionDamageMethods};
231 #[cfg(feature = "combat-actionbase")]
232 pub use crate::combat::actionbase::IActionBaseMethods;
233 #[cfg(feature = "combat-state")]
234 pub use crate::combat::state::IStateMethods;
235 #[cfg(feature = "system-object")]
236 pub use crate::system::object::IObjectMethods;
237 pub use crate::{
238 combat::{actionbase::IActionBase, state::IState},
239 system::object::IObject,
240 };
241}