0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00

Small cleanup of MidRaidQuestChangePatch

This commit is contained in:
Dev 2024-01-04 17:25:56 +00:00
parent 24e820feb5
commit 5fcc904a89

View File

@ -21,21 +21,23 @@ namespace Aki.SinglePlayer.Patches.Progression
private static void PatchPostfix() private static void PatchPostfix()
{ {
var gameWorld = Singleton<GameWorld>.Instance; var gameWorld = Singleton<GameWorld>.Instance;
if (gameWorld != null) if (gameWorld != null)
{ {
var player = gameWorld.MainPlayer; Logger.LogDebug($"[MidRaidQuestChangePatch] gameWorld instance was null");
var questController = Traverse.Create(player).Field<GClass3201>("_questController").Value; return;
if (questController != null) }
var player = gameWorld.MainPlayer;
var questController = Traverse.Create(player).Field<GClass3201>("_questController").Value;
if (questController != null)
{
foreach (var quest in questController.Quests.ToList())
{ {
foreach (var quest in questController.Quests.ToList()) quest.CheckForStatusChange(true, true);
{
quest.CheckForStatusChange(true, true);
}
} }
} }
} }
} }
} }