12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- import {NativeStruct} from "./NativeStruct";
- import {il2cppApi} from "../il2cppApi";
- import {utils} from "./utils";
- import {Il2CppClass} from "./Il2CppClass";
- export class Il2CppFieldInfo extends NativeStruct {
- getFlags() {
- return il2cppApi.il2cpp_field_get_flags(this);
- }
-
- getType() {
- return il2cppApi.il2cpp_field_get_type(this);
- }
-
- getStaticValue() {
- let value = Memory.alloc(Process.pointerSize);
- il2cppApi.il2cpp_field_static_get_value(this, value);
- return utils.readTypeEnumValue(value, this.getType().getTypeEnum(), this.getFiledClass())
- }
-
- getFiledClass() {
- let type = this.getType();
- return il2cppApi.il2cpp_class_from_type(type);
- }
- getParent(){
- let il2CppClass = il2cppApi.il2cpp_field_get_parent(this);
- return new Il2CppClass(il2CppClass);
- }
-
- getFiledName() {
- return il2cppApi.il2cpp_field_get_name(this).readCString();
- }
-
- getOffset() {
- return il2cppApi.il2cpp_field_get_offset(this);
- }
- }
|