fixed nullptr exception in BurnRitualObj
This commit is contained in:
@@ -67,11 +67,14 @@ namespace DevourClient.Hacks
|
|||||||
|
|
||||||
public static void BurnRitualObj(string map, bool burnAll)
|
public static void BurnRitualObj(string map, bool burnAll)
|
||||||
{
|
{
|
||||||
//map controllers SHOULDN'T be null but we never know, if smth break, add a nullptr check
|
|
||||||
switch (map)
|
switch (map)
|
||||||
{
|
{
|
||||||
case "Inn":
|
case "Inn":
|
||||||
Il2Cpp.InnMapController _innMapController = UnityEngine.Object.FindObjectOfType<Il2Cpp.InnMapController>();
|
Il2Cpp.InnMapController _innMapController = UnityEngine.Object.FindObjectOfType<Il2Cpp.InnMapController>();
|
||||||
|
if (!_innMapController) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (burnAll){
|
if (burnAll){
|
||||||
_innMapController.SetProgressTo(10);
|
_innMapController.SetProgressTo(10);
|
||||||
}
|
}
|
||||||
@@ -82,6 +85,9 @@ namespace DevourClient.Hacks
|
|||||||
|
|
||||||
case "Slaughterhouse":
|
case "Slaughterhouse":
|
||||||
Il2Cpp.SlaughterhouseAltarController _slaughterhouseAltarController = UnityEngine.Object.FindObjectOfType<Il2Cpp.SlaughterhouseAltarController>();
|
Il2Cpp.SlaughterhouseAltarController _slaughterhouseAltarController = UnityEngine.Object.FindObjectOfType<Il2Cpp.SlaughterhouseAltarController>();
|
||||||
|
if (!_slaughterhouseAltarController) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (burnAll)
|
if (burnAll)
|
||||||
{
|
{
|
||||||
@@ -95,6 +101,10 @@ namespace DevourClient.Hacks
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
Il2Cpp.SurvivalObjectBurnController _altar = UnityEngine.Object.FindObjectOfType<Il2Cpp.SurvivalObjectBurnController>();
|
Il2Cpp.SurvivalObjectBurnController _altar = UnityEngine.Object.FindObjectOfType<Il2Cpp.SurvivalObjectBurnController>();
|
||||||
|
if (!_altar) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (burnAll)
|
if (burnAll)
|
||||||
{
|
{
|
||||||
_altar.SkipToGoat(10);
|
_altar.SkipToGoat(10);
|
||||||
|
|||||||
Reference in New Issue
Block a user