Hashutil.generate to new MongoID()
This commit is contained in:
@@ -5,10 +5,8 @@ using SPTarkov.Server.Core.Models.Eft.PresetBuild;
|
||||
using SPTarkov.Server.Core.Models.Eft.Profile;
|
||||
using SPTarkov.Server.Core.Models.Enums;
|
||||
using SPTarkov.Server.Core.Models.Utils;
|
||||
using SPTarkov.Server.Core.Routers;
|
||||
using SPTarkov.Server.Core.Servers;
|
||||
using SPTarkov.Server.Core.Services;
|
||||
using SPTarkov.Server.Core.Utils;
|
||||
using SPTarkov.Server.Core.Utils.Cloners;
|
||||
|
||||
namespace SPTarkov.Server.Core.Controllers;
|
||||
@@ -16,8 +14,6 @@ namespace SPTarkov.Server.Core.Controllers;
|
||||
[Injectable]
|
||||
public class BuildController(
|
||||
ISptLogger<BuildController> _logger,
|
||||
HashUtil _hashUtil,
|
||||
EventOutputHolder _eventOutputHolder,
|
||||
DatabaseService _databaseService,
|
||||
ProfileHelper _profileHelper,
|
||||
ServerLocalisationService _serverLocalisationService,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Frozen;
|
||||
using SPTarkov.DI.Annotations;
|
||||
using SPTarkov.Server.Core.Extensions;
|
||||
using SPTarkov.Server.Core.Models.Common;
|
||||
using SPTarkov.Server.Core.Models.Eft.Common;
|
||||
using SPTarkov.Server.Core.Models.Eft.Common.Tables;
|
||||
using SPTarkov.Server.Core.Models.Eft.Profile;
|
||||
@@ -24,7 +25,6 @@ public class ProfileHelper(
|
||||
Watermark _watermark,
|
||||
TimeUtil _timeUtil,
|
||||
ServerLocalisationService _serverLocalisationService,
|
||||
HashUtil _hashUtil,
|
||||
ConfigServer _configServer
|
||||
)
|
||||
{
|
||||
@@ -587,7 +587,7 @@ public class ProfileHelper(
|
||||
profile!.Bonuses.Add(
|
||||
new Bonus
|
||||
{
|
||||
Id = _hashUtil.Generate(),
|
||||
Id = new MongoId(),
|
||||
Value = rowsToAdd,
|
||||
Type = BonusType.StashRows,
|
||||
IsPassive = true,
|
||||
|
||||
@@ -1094,7 +1094,7 @@ public record Bonus
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public string? Id { get; set; }
|
||||
public MongoId? Id { get; set; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
|
||||
@@ -19,9 +19,7 @@ namespace SPTarkov.Server.Core.Services;
|
||||
[Injectable(InjectionType.Singleton)]
|
||||
public class ProfileFixerService(
|
||||
ISptLogger<ProfileFixerService> _logger,
|
||||
HashUtil _hashUtil,
|
||||
JsonUtil _jsonUtil,
|
||||
ItemHelper _itemHelper,
|
||||
RewardHelper _rewardHelper,
|
||||
TraderHelper _traderHelper,
|
||||
HideoutHelper _hideoutHelper,
|
||||
|
||||
Reference in New Issue
Block a user