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

Fixed client error when accessing inventory during raid start as PMC

This commit is contained in:
Dev 2024-11-08 16:24:27 +00:00
parent 694ce6ee0f
commit 35f82f50fa

View File

@ -26,15 +26,17 @@ namespace SPT.Custom.Patches
public static void PatchPreFix(ref IEnumerable<QuestDataClass> quests)
{
var gameWorld = Singleton<GameWorld>.Instance;
if (gameWorld != null)
if (gameWorld?.MainPlayer?.Location != "hideout"
&& gameWorld?.MainPlayer?.Fraction == ETagStatus.Scav)
{
if (gameWorld.MainPlayer?.Location != "hideout" && gameWorld.MainPlayer?.Fraction == ETagStatus.Scav)
{
var pmcQuests = PatchConstants.BackEndSession.Profile.QuestsData;
var scavQuests = PatchConstants.BackEndSession.ProfileOfPet.QuestsData;
quests = pmcQuests.Concat(scavQuests);
}
}
var pmcQuests = PatchConstants.BackEndSession.Profile?.QuestsData;
var scavQuests = PatchConstants.BackEndSession.ProfileOfPet?.QuestsData;
if (pmcQuests != null && scavQuests != null)
{
quests = pmcQuests.Concat(scavQuests);
}
}
}
}
}