Set Savage to null and always show
Set `Aggressor` to always show Set `Lethal Damage` to always show Added `hideoutCustomizationStashId` Fixed bad typing for `FindAndAddRandomItemToLoot`
This commit is contained in:
@@ -78,7 +78,7 @@ public class BotGenerator(
|
||||
Id = bot.Id,
|
||||
Aid = bot.Aid,
|
||||
SessionId = bot.SessionId,
|
||||
Savage = bot.Savage,
|
||||
Savage = null,
|
||||
KarmaValue = bot.KarmaValue,
|
||||
Info = bot.Info,
|
||||
Customization = bot.Customization,
|
||||
@@ -286,7 +286,7 @@ public class BotGenerator(
|
||||
}
|
||||
|
||||
// Generate new bot ID
|
||||
AddIdsToBot(bot);
|
||||
AddIdsToBot(bot, botGenerationDetails);
|
||||
|
||||
// Generate new inventory ID
|
||||
GenerateInventoryId(bot);
|
||||
@@ -584,7 +584,7 @@ public class BotGenerator(
|
||||
}
|
||||
}
|
||||
},
|
||||
UpdateTime = _timeUtil.GetTimeStamp(),
|
||||
UpdateTime = 0, // 0 for pscav too
|
||||
Immortal = false
|
||||
};
|
||||
|
||||
@@ -688,13 +688,14 @@ public class BotGenerator(
|
||||
/// Generate an id+aid for a bot and apply
|
||||
/// </summary>
|
||||
/// <param name="bot">bot to update</param>
|
||||
/// <param name="botGenerationDetails"></param>
|
||||
/// <returns></returns>
|
||||
public void AddIdsToBot(BotBase bot)
|
||||
public void AddIdsToBot(BotBase bot, BotGenerationDetails botGenerationDetails)
|
||||
{
|
||||
var botId = _hashUtil.Generate();
|
||||
|
||||
bot.Id = botId;
|
||||
bot.Aid = _hashUtil.GenerateAccountId();
|
||||
bot.Aid = botGenerationDetails.IsPmc.GetValueOrDefault(false) ? _hashUtil.GenerateAccountId() : 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -102,6 +102,7 @@ public class BotInventoryGenerator(
|
||||
var questRaidItemsId = _hashUtil.Generate();
|
||||
var questStashItemsId = _hashUtil.Generate();
|
||||
var sortingTableId = _hashUtil.Generate();
|
||||
var hideoutCustomizationStashId = _hashUtil.Generate();
|
||||
|
||||
return new BotBaseInventory
|
||||
{
|
||||
@@ -111,7 +112,8 @@ public class BotInventoryGenerator(
|
||||
new() { Id = stashId, Template = ItemTpl.STASH_STANDARD_STASH_10X30 },
|
||||
new() { Id = questRaidItemsId, Template = ItemTpl.STASH_QUESTRAID },
|
||||
new() { Id = questStashItemsId, Template = ItemTpl.STASH_QUESTOFFLINE },
|
||||
new() { Id = sortingTableId, Template = ItemTpl.SORTINGTABLE_SORTING_TABLE }
|
||||
new() { Id = sortingTableId, Template = ItemTpl.SORTINGTABLE_SORTING_TABLE },
|
||||
new() { Id = hideoutCustomizationStashId, Template = ItemTpl.HIDEOUTAREACONTAINER_CUSTOMIZATION }
|
||||
],
|
||||
Equipment = equipmentId,
|
||||
Stash = stashId,
|
||||
@@ -121,7 +123,7 @@ public class BotInventoryGenerator(
|
||||
HideoutAreaStashes = { },
|
||||
FastPanel = { },
|
||||
FavoriteItems = [],
|
||||
HideoutCustomizationStashId = "",
|
||||
HideoutCustomizationStashId = hideoutCustomizationStashId,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ public class LootGenerator(
|
||||
/// <param name="options">item filters</param>
|
||||
/// <param name="result">array to add found item to</param>
|
||||
/// <returns>true if item was valid and added to pool</returns>
|
||||
protected bool FindAndAddRandomItemToLoot(TemplateItem[] items, Dictionary<string, ItemLimit> itemTypeCounts,
|
||||
protected bool FindAndAddRandomItemToLoot(List<TemplateItem> items, Dictionary<string, ItemLimit> itemTypeCounts,
|
||||
LootRequest options,
|
||||
List<Item> result)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@ public record BotBase
|
||||
[JsonPropertyName("sessionId")]
|
||||
public string? SessionId { get; set; }
|
||||
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[JsonPropertyName("savage")]
|
||||
public string? Savage { get; set; }
|
||||
|
||||
@@ -363,6 +364,9 @@ public record EftStats
|
||||
public OverallCounters? OverallCounters { get; set; }
|
||||
public float? SessionExperienceMult { get; set; }
|
||||
public float? ExperienceBonusMult { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public Aggressor? Aggressor { get; set; }
|
||||
public List<DroppedItem>? DroppedItems { get; set; }
|
||||
public List<FoundInRaidItem>? FoundInRaidItems { get; set; }
|
||||
@@ -448,6 +452,8 @@ public record Aggressor
|
||||
public record DamageHistory
|
||||
{
|
||||
public string? LethalDamagePart { get; set; }
|
||||
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public LethalDamage? LethalDamage { get; set; }
|
||||
|
||||
[JsonConverter(typeof(ArrayToObjectFactoryConverter))]
|
||||
|
||||
Reference in New Issue
Block a user