added BurnRitualObj function
Code optimization needed. Some detected issues: - Farmhouse worked properly. - Only burnAll works on Molly map. - It does not work on Town and Inn map. - Only burnAll works on Slaughterhouse map.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "pch-il2cpp.h"
|
||||
|
||||
#include "helpers.h"
|
||||
#include <iostream>
|
||||
|
||||
#include "ClientHelper.h"
|
||||
#include "wrapper.h"
|
||||
@@ -59,3 +60,187 @@ std::string get_SceneName()
|
||||
|
||||
return std::string("unknown");
|
||||
}
|
||||
|
||||
void BurnRitualObj(bool burnAll)
|
||||
{
|
||||
// Devour: SurvivalObjectBurnController
|
||||
// Molly: SurvivalMollyAltarController
|
||||
// Inn: InnMapController
|
||||
// Town: SurvivalTownAltarController
|
||||
// Slaughterhouse: SlaughterhouseAltarController
|
||||
|
||||
/* MAP: TOWN, DEVOUR
|
||||
DO_APP_FUNC(0x00562320, void, SurvivalObjectBurnController_BurnGoat, (SurvivalObjectBurnController * __this, MethodInfo * method));
|
||||
DO_APP_FUNC(0x00562590, void, SurvivalObjectBurnController_SkipToGoat, (SurvivalObjectBurnController * __this, int32_t number, MethodInfo * method));
|
||||
*/
|
||||
|
||||
if (!IsHost()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Wrapper wrapper;
|
||||
const Il2CppImage* image = wrapper.GetImage("Assembly-CSharp.dll");
|
||||
|
||||
std::string sceneName = get_SceneName();
|
||||
|
||||
std::cout << "call..\n";
|
||||
|
||||
// !!!!Check if Azazel is awake.
|
||||
BurnManager(sceneName, wrapper, image, burnAll);
|
||||
}
|
||||
|
||||
void BurnManager(std::string& sceneName, Wrapper& wrapper, const Il2CppImage* image, bool burnAll)
|
||||
{
|
||||
int32_t num = 10;
|
||||
|
||||
if (sceneName == std::string("Devour")) {
|
||||
|
||||
Il2CppObject* object = wrapper.GetObjectFromClass(image, "", "SurvivalObjectBurnController");
|
||||
|
||||
if (object != nullptr) {
|
||||
auto SurvivalObjectBurnController_Object = app::Object_1_FindObjectOfType(reinterpret_cast<app::Type*>(object), nullptr);
|
||||
|
||||
if (SurvivalObjectBurnController_Object) {
|
||||
auto SurvivalObjectBurnController = reinterpret_cast<app::SurvivalObjectBurnController*>(SurvivalObjectBurnController_Object);
|
||||
|
||||
if (SurvivalObjectBurnController) {
|
||||
|
||||
if (burnAll) {
|
||||
if (app::SurvivalObjectBurnController_SkipToGoat) {
|
||||
app::SurvivalObjectBurnController_SkipToGoat(SurvivalObjectBurnController, num, nullptr);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (app::SurvivalObjectBurnController_BurnGoat) {
|
||||
app::SurvivalObjectBurnController_BurnGoat(SurvivalObjectBurnController, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sceneName == std::string("Molly")) {
|
||||
|
||||
/*
|
||||
MAP: MOLLY
|
||||
DO_APP_FUNC(0x0055C100, void, SurvivalMollyAltarController_SkipToGoat, (SurvivalMollyAltarController * __this, int32_t number, MethodInfo * method));
|
||||
DO_APP_FUNC(0x0055C8E0, void, SurvivalMollyAltarController_OnGoat, (SurvivalMollyAltarController * __this, MethodInfo * method));
|
||||
*/
|
||||
|
||||
Il2CppObject* object = wrapper.GetObjectFromClass(image, "", "SurvivalMollyAltarController");
|
||||
|
||||
if (object != nullptr) {
|
||||
auto MollyAltarController_Object = app::Object_1_FindObjectOfType(reinterpret_cast<app::Type*>(object), nullptr);
|
||||
|
||||
if (MollyAltarController_Object) {
|
||||
auto SurvivalMollyAltarController = reinterpret_cast<app::SurvivalMollyAltarController*>(MollyAltarController_Object);
|
||||
|
||||
if (SurvivalMollyAltarController) {
|
||||
|
||||
if (burnAll) {
|
||||
if (app::SurvivalMollyAltarController_SkipToGoat) {
|
||||
app::SurvivalMollyAltarController_SkipToGoat(SurvivalMollyAltarController, num, nullptr);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (app::SurvivalMollyAltarController_OnGoat) {
|
||||
app::SurvivalMollyAltarController_OnGoat(SurvivalMollyAltarController, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sceneName == std::string("Inn")) {
|
||||
|
||||
/* MAP: INN
|
||||
DO_APP_FUNC(0x00930CD0, void, MapController_SetProgressTo, (MapController * __this, int32_t progress, MethodInfo * method));
|
||||
DO_APP_FUNC(0x00930EA0, void, MapController_IncreaseProgress, (MapController * __this, MethodInfo * method));
|
||||
*/
|
||||
|
||||
Il2CppObject* object = wrapper.GetObjectFromClass(image, "", "SurvivalMollyAltarController");
|
||||
|
||||
if (object != nullptr) {
|
||||
auto MapController_Object = app::Object_1_FindObjectOfType(reinterpret_cast<app::Type*>(object), nullptr);
|
||||
|
||||
if (MapController_Object) {
|
||||
auto MapController = reinterpret_cast<app::MapController*>(MapController_Object);
|
||||
|
||||
if (MapController) {
|
||||
|
||||
if (burnAll) {
|
||||
if (app::MapController_SetProgressTo) {
|
||||
app::MapController_SetProgressTo(MapController, num, nullptr);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (app::MapController_IncreaseProgress) {
|
||||
app::MapController_IncreaseProgress(MapController, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sceneName == std::string("Town")) {
|
||||
/* MAP: TOWN, DEVOUR
|
||||
DO_APP_FUNC(0x00562320, void, SurvivalObjectBurnController_BurnGoat, (SurvivalObjectBurnController * __this, MethodInfo * method));
|
||||
DO_APP_FUNC(0x00562590, void, SurvivalObjectBurnController_SkipToGoat, (SurvivalObjectBurnController * __this, int32_t number, MethodInfo * method));
|
||||
*/
|
||||
|
||||
Il2CppObject* object = wrapper.GetObjectFromClass(image, "", "SurvivalMollyAltarController");
|
||||
|
||||
if (object != nullptr) {
|
||||
auto MapController_Object = app::Object_1_FindObjectOfType(reinterpret_cast<app::Type*>(object), nullptr);
|
||||
|
||||
if (MapController_Object) {
|
||||
auto MapController = reinterpret_cast<app::MapController*>(MapController_Object);
|
||||
|
||||
if (MapController) {
|
||||
|
||||
if (burnAll) {
|
||||
if (app::MapController_SetProgressTo) {
|
||||
app::MapController_SetProgressTo(MapController, num, nullptr);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (app::MapController_IncreaseProgress) {
|
||||
app::MapController_IncreaseProgress(MapController, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sceneName == std::string("Slaughterhouse")) {
|
||||
/* MAP: Slaughterhouse
|
||||
DO_APP_FUNC(0x0050DEB0, void, SlaughterhouseAltarController_SkipToGoat, (SlaughterhouseAltarController * __this, int32_t number, MethodInfo * method));
|
||||
*/
|
||||
|
||||
Il2CppObject* object = wrapper.GetObjectFromClass(image, "", "SlaughterhouseAltarController");
|
||||
|
||||
if (object != nullptr) {
|
||||
auto SlaughterhouseAltarController_Object = app::Object_1_FindObjectOfType(reinterpret_cast<app::Type*>(object), nullptr);
|
||||
|
||||
if (SlaughterhouseAltarController_Object) {
|
||||
auto SlaughterhouseAltarController = reinterpret_cast<app::SlaughterhouseAltarController*>(SlaughterhouseAltarController_Object);
|
||||
|
||||
if (SlaughterhouseAltarController) {
|
||||
|
||||
if (burnAll) {
|
||||
if (app::SlaughterhouseAltarController_SkipToGoat) {
|
||||
app::SlaughterhouseAltarController_SkipToGoat(SlaughterhouseAltarController, num, nullptr);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user