engage/generated/combat/
actionsync.rs1#[cfg(feature = "combat-actionsync-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/actionsync/ActionSync.md"))]
17 #[::unity::class(namespace = "Combat", name = "ActionSync")]
18 #[parent(crate::combat::actionbase::ActionBase)]
19 pub struct ActionSync {
20 #[offset(40)]
21 #[rename(name = "m_SyncToken")]
22 pub m_sync_token: crate::combat::synctoken::SyncToken,
23 }
24}
25
26#[cfg(feature = "combat-actionsync-types")]
27pub use __types::*;
28
29#[cfg(feature = "combat-actionsync")]
30pub trait IActionSyncMethods: IActionSync {
31 #[doc = "`get_Name()` overload"]
32 fn get_name(self) -> ::unity::Il2CppString {
33 unsafe {
34 let __receiver = <ActionSync as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
35 {
36 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
37 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
38 panic!(
39 "unity: virtual slot {}
40 out of range (vtable len {}
41) on the runtime class behind {}
42 (method `{}
43`)",
44 5usize,
45 __vt.len(),
46 <ActionSync as ::unity::ClassIdentity>::NAME,
47 "get_Name",
48 )
49 });
50 let __inner: extern "C" fn(ActionSync, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
51 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
52 __inner(__receiver, __mi)
53 }
54 }
55 }
56 #[doc = "`.ctor(crate::combat::character::Character, crate::combat::synctoken::SyncToken)` overload"]
57 fn ctor(
58 self,
59 chr: impl ::core::convert::Into<crate::combat::character::Character>,
60 sync_token: impl ::core::convert::Into<crate::combat::synctoken::SyncToken>,
61 ) -> () {
62 unsafe {
63 let __receiver = <ActionSync as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
64 ::unity::il2cpp_call!((::unity::module_base()+0x2bc9000usize)as*mut u8,();
65(ActionSync)__receiver,(crate::combat::character::Character)::core::convert::Into::into(chr),(crate::combat::synctoken::SyncToken)::core::convert::Into::into(sync_token))
66 }
67 }
68 #[doc = "`OnEnter()` overload"]
69 fn on_enter(self) -> () {
70 unsafe {
71 let __receiver = <ActionSync as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
72 {
73 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
74 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
75 panic!(
76 "unity: virtual slot {}
77 out of range (vtable len {}
78) on the runtime class behind {}
79 (method `{}
80`)",
81 6usize,
82 __vt.len(),
83 <ActionSync as ::unity::ClassIdentity>::NAME,
84 "OnEnter",
85 )
86 });
87 let __inner: extern "C" fn(ActionSync, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
88 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
89 __inner(__receiver, __mi)
90 }
91 }
92 }
93 #[doc = "`OnUpdate()` overload"]
94 fn on_update(self) -> () {
95 unsafe {
96 let __receiver = <ActionSync as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
97 {
98 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
99 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
100 panic!(
101 "unity: virtual slot {}
102 out of range (vtable len {}
103) on the runtime class behind {}
104 (method `{}
105`)",
106 7usize,
107 __vt.len(),
108 <ActionSync as ::unity::ClassIdentity>::NAME,
109 "OnUpdate",
110 )
111 });
112 let __inner: extern "C" fn(ActionSync, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
113 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
114 __inner(__receiver, __mi)
115 }
116 }
117 }
118}
119
120#[cfg(feature = "combat-actionsync")]
121impl<__T: IActionSync> IActionSyncMethods for __T {}
122
123#[cfg(feature = "combat-actionsync")]
124impl ActionSync {
125 pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
126 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
127 }
128
129 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
130 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
131 }
132
133 pub fn on_enter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
134 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
135 }
136
137 pub fn on_update_method_info() -> &'static ::unity::il2cpp::MethodInfo {
138 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
139 }
140}
141
142#[cfg(feature = "combat-actionsync")]
143impl ActionSync {
144 #[doc = "Direct (non-virtual) call to `ActionSync`'s own `get_Name`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
145 pub unsafe fn get_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
146 let __mi = Self::get_name_method_info();
147 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
148 __inner(this.into(), ::core::option::Option::None)
149 }
150
151 #[doc = "Direct (non-virtual) call to `ActionSync`'s own `OnEnter`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
152 pub unsafe fn on_enter(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
153 let __mi = Self::on_enter_method_info();
154 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
155 __inner(this.into(), ::core::option::Option::None)
156 }
157
158 #[doc = "Direct (non-virtual) call to `ActionSync`'s own `OnUpdate`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
159 pub unsafe fn on_update(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
160 let __mi = Self::on_update_method_info();
161 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
162 __inner(this.into(), ::core::option::Option::None)
163 }
164}
165
166#[cfg(feature = "combat-actionsync")]
167impl ActionSync {
168 #[doc = "`.ctor(crate::combat::character::Character, crate::combat::synctoken::SyncToken)` — overload selector"]
169 pub fn new(chr: crate::combat::character::Character, sync_token: crate::combat::synctoken::SyncToken) -> Self {
170 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
171 panic!(
172 "{}
173::{}
174 failed to instantiate",
175 ::core::stringify!(ActionSync),
176 ::core::stringify!(new),
177 )
178 });
179 <Self as IActionSyncMethods>::ctor(this, chr, sync_token);
180 this
181 }
182}
183
184#[cfg(feature = "combat-actionsync")]
185#[doc(hidden)]
186pub mod prelude {
187 pub use super::{ActionSync, IActionSync, IActionSyncMethods};
188 #[cfg(feature = "combat-actionbase")]
189 pub use crate::combat::actionbase::IActionBaseMethods;
190 #[cfg(feature = "combat-state")]
191 pub use crate::combat::state::IStateMethods;
192 #[cfg(feature = "system-object")]
193 pub use crate::system::object::IObjectMethods;
194 pub use crate::{
195 combat::{actionbase::IActionBase, state::IState},
196 system::object::IObject,
197 };
198}