mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 02:10:45 -05:00
Renamed patch to better explain its purpose
This commit is contained in:
parent
6c73f7ee36
commit
12e884c0d8
@ -11,7 +11,7 @@ namespace SPT.SinglePlayer.Patches.Progression
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fix XP gained value being 0 after a scav raid
|
/// Fix XP gained value being 0 after a scav raid
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ScavExperienceGainPatch : ModulePatch
|
public class FixPostScavRaidXpShowingZeroPatch : ModulePatch
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looking for SessionResultExitStatus Show() (private)
|
/// Looking for SessionResultExitStatus Show() (private)
|
||||||
@ -22,7 +22,8 @@ namespace SPT.SinglePlayer.Patches.Progression
|
|||||||
return AccessTools.Method(
|
return AccessTools.Method(
|
||||||
typeof(SessionResultExitStatus),
|
typeof(SessionResultExitStatus),
|
||||||
nameof(SessionResultExitStatus.Show),
|
nameof(SessionResultExitStatus.Show),
|
||||||
new []{ typeof(Profile), typeof(PlayerVisualRepresentation), typeof(ESideType), typeof(ExitStatus), typeof(TimeSpan), typeof(ISession), typeof(bool) });
|
[typeof(Profile), typeof(PlayerVisualRepresentation), typeof(ESideType), typeof(ExitStatus), typeof(TimeSpan), typeof(ISession), typeof(bool)
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unused, but left here in case patch breaks and finding the intended method is difficult
|
// Unused, but left here in case patch breaks and finding the intended method is difficult
|
||||||
@ -38,16 +39,16 @@ namespace SPT.SinglePlayer.Patches.Progression
|
|||||||
}
|
}
|
||||||
|
|
||||||
[PatchPrefix]
|
[PatchPrefix]
|
||||||
public static bool PatchPrefix(ref Profile activeProfile,ref EPlayerSide side)
|
public static bool PatchPrefix(ref Profile activeProfile, ref EPlayerSide side)
|
||||||
{
|
{
|
||||||
if (activeProfile.Side == EPlayerSide.Savage)
|
if (activeProfile.Side == EPlayerSide.Savage)
|
||||||
{
|
{
|
||||||
side = EPlayerSide.Savage; // Also set side to correct value (defaults to usec/bear when playing as scav)
|
side = EPlayerSide.Savage; // Also set side to correct value (defaults to USEC/BEAR when playing as scav)
|
||||||
int xpGainedInSession = activeProfile.Stats.Eft.SessionCounters.GetAllInt(new object[] { CounterTag.Exp });
|
int xpGainedInSession = activeProfile.Stats.Eft.SessionCounters.GetAllInt(new object[] { CounterTag.Exp });
|
||||||
activeProfile.Stats.Eft.TotalSessionExperience = (int)(xpGainedInSession * activeProfile.Stats.Eft.SessionExperienceMult * activeProfile.Stats.Eft.ExperienceBonusMult);
|
activeProfile.Stats.Eft.TotalSessionExperience = (int)(xpGainedInSession * activeProfile.Stats.Eft.SessionExperienceMult * activeProfile.Stats.Eft.ExperienceBonusMult);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true; // Always do original method
|
return true; // Do original method
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -29,7 +29,7 @@ namespace SPT.SinglePlayer
|
|||||||
//new FixQuestAchieveControllersPatch().Enable(); // Likely not needed, if cheevos don't appear, revisit patch
|
//new FixQuestAchieveControllersPatch().Enable(); // Likely not needed, if cheevos don't appear, revisit patch
|
||||||
|
|
||||||
// Still need
|
// Still need
|
||||||
new ScavExperienceGainPatch().Enable();
|
new FixPostScavRaidXpShowingZeroPatch().Enable();
|
||||||
new DisablePMCExtractsForScavsPatch().Enable();
|
new DisablePMCExtractsForScavsPatch().Enable();
|
||||||
new ScavExfilPatch().Enable();
|
new ScavExfilPatch().Enable();
|
||||||
new ScavProfileLoadPatch().Enable();
|
new ScavProfileLoadPatch().Enable();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user