From db91b06650bee9e8e946a28a6926f247a9e891ce Mon Sep 17 00:00:00 2001 From: manianac Date: Sat, 29 May 2021 20:15:54 -0400 Subject: [PATCH] Shrunk types.h Fixed idiotic MeetingHud code (my fault) --- appdata/il2cpp-types.h | 34 +++++++++++++++++----------------- hooks/MeetingHud.cpp | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/appdata/il2cpp-types.h b/appdata/il2cpp-types.h index b2e38d5d..0630df0c 100644 --- a/appdata/il2cpp-types.h +++ b/appdata/il2cpp-types.h @@ -247484,7 +247484,7 @@ struct DebugLogHandler__Class { struct DebugLogHandler__VTable vtable; }; -struct ILogger_copy { +struct ILogger { struct ILogger__Class *klass; MonitorData *monitor; }; @@ -286447,7 +286447,7 @@ struct PurchaseEventArgs__Class { struct __declspec(align(4)) PurchasingManager__Fields { struct IStore *m_Store; struct IInternalStoreListener *m_Listener; - struct ILogger_copy *m_Logger; + struct ILogger *m_Logger; struct TransactionLog *m_TransactionLog; struct String *m_StoreName; struct Action *m_AdditionalProductsCallback; @@ -286469,7 +286469,7 @@ struct IInternalStoreListener { }; struct __declspec(align(4)) TransactionLog__Fields { - struct ILogger_copy *logger; + struct ILogger *logger; struct String *persistentDataPath; }; @@ -287305,7 +287305,7 @@ struct StandardPurchasingModule__Fields { bool m_UseCloudCatalog; struct String *_m_persistentDataPath_k__BackingField; struct IUtil *_util_k__BackingField; - struct ILogger_copy *_logger_k__BackingField; + struct ILogger *_logger_k__BackingField; struct IAsyncWebUtil *_webUtil_k__BackingField; struct StandardPurchasingModule_StoreInstance *_storeInstance_k__BackingField; struct CloudCatalogImpl *m_CloudCatalog; @@ -287473,7 +287473,7 @@ struct IEnumerable_1_UnityEngine_Purchasing_AppStore_ { struct __declspec(align(4)) CloudCatalogImpl__Fields { struct IAsyncWebUtil *m_AsyncUtil; struct String *m_CacheFileName; - struct ILogger_copy *m_Logger; + struct ILogger *m_Logger; struct String *m_CatalogURL; struct String *m_StoreName; }; @@ -287493,7 +287493,7 @@ struct __declspec(align(4)) WinRTStore__Fields { struct IWindowsIAP *win8; struct IStoreCallback *callback; struct IUtil *util; - struct ILogger_copy *logger; + struct ILogger *logger; bool m_CanReceivePurchases; }; @@ -386856,7 +386856,7 @@ struct __declspec(align(4)) JSONStore__Fields { bool shouldLogPromoInitialization; struct StandardPurchasingModule *m_Module; struct HashSet_1_UnityEngine_Purchasing_ProductDefinition_ *m_BuilderProducts; - struct ILogger_copy *m_Logger; + struct ILogger *m_Logger; struct EventQueue *m_EventQueue; struct Dictionary_2_System_String_System_Object_ *promoPayload; bool catalogDisabled; @@ -386896,7 +386896,7 @@ struct UDPImpl { struct __declspec(align(4)) StoreCatalogImpl__Fields { struct IAsyncWebUtil *m_AsyncUtil; - struct ILogger_copy *m_Logger; + struct ILogger *m_Logger; struct String *m_CatalogURL; struct String *m_StoreName; struct FileReference *m_cachedStoreCatalogReference; @@ -386910,7 +386910,7 @@ struct StoreCatalogImpl { struct __declspec(align(4)) FileReference__Fields { struct String *m_FilePath; - struct ILogger_copy *m_Logger; + struct ILogger *m_Logger; }; struct FileReference { @@ -388995,7 +388995,7 @@ struct Promo__StaticFields { #else int32_t s_RuntimePlatform; #endif - struct ILogger_copy *s_Logger; + struct ILogger *s_Logger; struct String *s_Version; struct IUtil *s_Util; struct IAsyncWebUtil *s_WebUtil; @@ -419549,7 +419549,7 @@ struct MessageWriter_c__Class { struct MessageWriter_c__VTable vtable; }; -struct NullLogger_copy { +struct NullLogger { struct NullLogger__Class *klass; MonitorData *monitor; }; @@ -419564,7 +419564,7 @@ struct NullLogger__VTable { }; struct NullLogger__StaticFields { - struct NullLogger_copy *Instance; + struct NullLogger *Instance; }; struct NullLogger__Class { @@ -584355,7 +584355,7 @@ struct __declspec(align(4)) GameOptionsData__Fields { bool ConfirmImpostor; bool VisualTasks; bool AnonymousVotes; - #if defined(FALSE) + #if defined(_CPLUSPLUS_) TaskBarMode__Enum TaskBarMode; #else int32_t TaskBarMode; @@ -631547,7 +631547,7 @@ struct SecurityLogger__Fields { struct ContactFilter2D filter; }; -struct SecurityLogger_copy { +struct SecurityLogger { struct SecurityLogger__Class *klass; MonitorData *monitor; struct SecurityLogger__Fields fields; @@ -631605,7 +631605,7 @@ struct SecurityLogger_c_DisplayClass9_0__Class { struct __declspec(align(4)) SecurityLogger_BlinkSensor_d_10__Fields { int32_t __1__state; struct Object *__2__current; - struct SecurityLogger_copy *__4__this; + struct SecurityLogger *__4__this; }; struct SecurityLogger_BlinkSensor_d_10 { @@ -648927,7 +648927,7 @@ struct InnerNetClient_c_DisplayClass122_0__Class { struct InnerNetClient_c_DisplayClass122_0__VTable vtable; }; -struct UnityLogger_copy { +struct UnityLogger { struct UnityLogger__Class *klass; MonitorData *monitor; }; @@ -994241,7 +994241,7 @@ struct Debug_2__VTable { }; struct Debug_2__StaticFields { - struct ILogger_copy *s_Logger; + struct ILogger *s_Logger; }; struct Debug_2__Class { diff --git a/hooks/MeetingHud.cpp b/hooks/MeetingHud.cpp index 846d05de..d9048af1 100644 --- a/hooks/MeetingHud.cpp +++ b/hooks/MeetingHud.cpp @@ -20,7 +20,7 @@ void dMeetingHud_Update(MeetingHud* __this, MethodInfo* method) { PlayerVoteArea__Array* playerStates = __this->fields.playerStates; for (size_t i = 0; i < playerStates->max_length; i++) { PlayerVoteArea* playerVoteArea = playerStates->vector[i]; - auto playerData = GetPlayerDataById(playerVoteArea->fields.votedFor); + auto playerData = GetPlayerDataById(playerVoteArea->fields._TargetPlayerId_k__BackingField); auto localData = GetPlayerData(*Game::pLocalPlayer); auto playerNameTMP = playerVoteArea->fields.NameText; @@ -44,7 +44,7 @@ void dMeetingHud_Update(MeetingHud* __this, MethodInfo* method) { // We are goign to check to see if they voted, then we are going to check to see who they voted for, finally we are going to check to see if we already recorded a vote for them // votedFor will either contain the id of the person they voted for, -1 if they skipped, or -2 if they didn't vote. We don't want to record people who didn't vote if (playerVoteArea->fields.didVote && playerVoteArea->fields.votedFor != -2 && !State.voteMonitor[playerData->fields.PlayerId]) { - State.events[playerVoteArea->fields.votedFor][EVENT_VOTE].push_back(new CastVoteEvent(*GetEventPlayer(playerData), GetEventPlayer(GetPlayerDataById(playerVoteArea->fields.votedFor)))); + State.events[playerVoteArea->fields._TargetPlayerId_k__BackingField][EVENT_VOTE].push_back(new CastVoteEvent(*GetEventPlayer(playerData), GetEventPlayer(GetPlayerDataById(playerVoteArea->fields.votedFor)))); State.consoleEvents.push_back(new CastVoteEvent(*GetEventPlayer(playerData), GetEventPlayer(GetPlayerDataById(playerVoteArea->fields.votedFor)))); State.voteMonitor[playerData->fields.PlayerId] = true; }