Skip to content

Commit

Permalink
Apply requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchangelWTF committed May 23, 2024
1 parent 3a0d0fd commit edc10dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Fika.Core/Coop/GameMode/CoopGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,7 @@ private void SavePlayer(CoopPlayer player, ExitStatus exitStatus, string exitNam
player.CheckAndResetControllers(exitStatus, base.PastTime, base.Location_0.Id, exitName);

//Method taken directly from AKI, can be found in the aki-singleplayer assembly as OfflineSaveProfilePatch
var converterClass = typeof(AbstractGame).Assembly.GetTypes().First(t => t.GetField("Converters", BindingFlags.Static | BindingFlags.Public) != null);
Type converterClass = typeof(AbstractGame).Assembly.GetTypes().First(t => t.GetField("Converters", BindingFlags.Static | BindingFlags.Public) != null);

JsonConverter[] Converters = Traverse.Create(converterClass).Field<JsonConverter[]>("Converters").Value;

Expand All @@ -1748,7 +1748,7 @@ private void SavePlayer(CoopPlayer player, ExitStatus exitStatus, string exitNam
Profile = player.Profile,
Health = HealthListener.Instance.CurrentHealth,
Insurance = InsuredItemManager.Instance.GetTrackedItems(),
IsPlayerScav = RaidSettings.IsScav // If session joining mixed with both PMC's and scavs is added this might have to be changed
IsPlayerScav = player.Side is EPlayerSide.Savage
};

RequestHandler.PutJson("/raid/profile/save", SaveRequest.ToJson(Converters.AddItem(new NotesJsonConverter()).ToArray()));
Expand Down

0 comments on commit edc10dc

Please sign in to comment.