From e9d771328219042f684673e67ffe6367bde71811 Mon Sep 17 00:00:00 2001 From: nexus4880 <38168516+nexus4880@users.noreply.github.com> Date: Wed, 23 Oct 2024 20:22:29 -0700 Subject: [PATCH] WIP --- Fuyu.Backend.BSG/DTO/Profiles/Profile.cs | 2 +- Fuyu.Backend.BSG/DTO/Profiles/ProfileInfo.cs | 2 +- Fuyu.Backend.EFT/Services/BotService.cs | 6 ++++++ Fuyu.Backend.EFT/Services/ItemService.cs | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Fuyu.Backend.BSG/DTO/Profiles/Profile.cs b/Fuyu.Backend.BSG/DTO/Profiles/Profile.cs index e4bf342..28f8ebe 100644 --- a/Fuyu.Backend.BSG/DTO/Profiles/Profile.cs +++ b/Fuyu.Backend.BSG/DTO/Profiles/Profile.cs @@ -67,7 +67,7 @@ public class Profile [DataMember] public RagfairInfo RagfairInfo; - [DataMember] + [DataMember(EmitDefaultValue = false)] public Dictionary TradersInfo; [DataMember] diff --git a/Fuyu.Backend.BSG/DTO/Profiles/ProfileInfo.cs b/Fuyu.Backend.BSG/DTO/Profiles/ProfileInfo.cs index 3c06dce..56cc9e1 100644 --- a/Fuyu.Backend.BSG/DTO/Profiles/ProfileInfo.cs +++ b/Fuyu.Backend.BSG/DTO/Profiles/ProfileInfo.cs @@ -101,7 +101,7 @@ public class ProfileInfo [DataMember] public bool HasPveGame; - [DataMember] + [DataMember(EmitDefaultValue = false)] public Ban[] Bans; } } \ No newline at end of file diff --git a/Fuyu.Backend.EFT/Services/BotService.cs b/Fuyu.Backend.EFT/Services/BotService.cs index 83f8b36..87020c2 100644 --- a/Fuyu.Backend.EFT/Services/BotService.cs +++ b/Fuyu.Backend.EFT/Services/BotService.cs @@ -99,6 +99,12 @@ public static Profile[] GetBots(BotCondition[] conditions) private static Profile GenerateBot(EBotRole role) { + // TODO: remove this rimuru top 1 pls fix immediately + if (role == EBotRole.pmcBEAR || role == EBotRole.pmcUSEC) + { + role = EBotRole.assault; + } + var profile = Json.Parse(_profiles[role]); // regenerate all ids diff --git a/Fuyu.Backend.EFT/Services/ItemService.cs b/Fuyu.Backend.EFT/Services/ItemService.cs index d67c360..3b28ce1 100644 --- a/Fuyu.Backend.EFT/Services/ItemService.cs +++ b/Fuyu.Backend.EFT/Services/ItemService.cs @@ -54,7 +54,7 @@ public static void RegenerateInventoryIds(InventoryInfo inventory) if (inventory.stash != null) { mapping.Add(inventory.stash.Value, new MongoId(true)); - inventory.equipment = mapping[inventory.stash.Value]; + inventory.stash = mapping[inventory.stash.Value]; } // regenerate inventory quest raid items