Remove unnecessary code
This commit is contained in:
parent
20fd8d98c4
commit
3b99fc190b
@ -117,8 +117,7 @@ public class LootDumpProcessorContext
|
|||||||
{
|
{
|
||||||
_tarkovItems = new TarkovItems(
|
_tarkovItems = new TarkovItems(
|
||||||
$"{GetConfig().ServerLocation}/project/assets/database/templates/items.json",
|
$"{GetConfig().ServerLocation}/project/assets/database/templates/items.json",
|
||||||
$"{GetConfig().ServerLocation}/project/assets/database/templates/handbook.json",
|
$"{GetConfig().ServerLocation}/project/assets/database/templates/handbook.json"
|
||||||
$"{GetConfig().ServerLocation}/project/assets/database/locations/tarkovstreets/statics.json"
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -145,15 +145,6 @@ public class MultithreadSteppedDumpProcessor : IDumpProcessor
|
|||||||
|
|
||||||
private static double GetStaticProbability(string mapName, KeyValuePair<Template, int> td, Dictionary<string, int> mapDumpCounter)
|
private static double GetStaticProbability(string mapName, KeyValuePair<Template, int> td, Dictionary<string, int> mapDumpCounter)
|
||||||
{
|
{
|
||||||
if (mapName == "Streets of Tarkov")
|
|
||||||
{
|
|
||||||
var result = LootDumpProcessorContext.GetTarkovItems().GetProbabilityByContainerId(td.Key.Id);
|
|
||||||
if (result != null)
|
|
||||||
{
|
|
||||||
return Math.Round((double)(result.probability), 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Math.Round((double)((decimal)td.Value / (decimal)mapDumpCounter[mapName]), 2);
|
return Math.Round((double)((decimal)td.Value / (decimal)mapDumpCounter[mapName]), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,13 +9,11 @@ public class TarkovItems
|
|||||||
|
|
||||||
private Dictionary<string, TemplateFileItem> _items;
|
private Dictionary<string, TemplateFileItem> _items;
|
||||||
private HandbookRoot _handbook;
|
private HandbookRoot _handbook;
|
||||||
private List<StaticContainerRoot> _streetsStatics;
|
|
||||||
|
|
||||||
public TarkovItems(string items, string handbook, string streetsStatics)
|
public TarkovItems(string items, string handbook)
|
||||||
{
|
{
|
||||||
_items = _jsonSerializer.Deserialize<Dictionary<string, TemplateFileItem>>(File.ReadAllText(items));
|
_items = _jsonSerializer.Deserialize<Dictionary<string, TemplateFileItem>>(File.ReadAllText(items));
|
||||||
_handbook = _jsonSerializer.Deserialize<HandbookRoot>(File.ReadAllText(handbook));
|
_handbook = _jsonSerializer.Deserialize<HandbookRoot>(File.ReadAllText(handbook));
|
||||||
_streetsStatics = _jsonSerializer.Deserialize<List<StaticContainerRoot>>(File.ReadAllText(streetsStatics));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool IsBaseClass(string tpl, string baseclass_id)
|
public virtual bool IsBaseClass(string tpl, string baseclass_id)
|
||||||
@ -44,9 +42,4 @@ public class TarkovItems
|
|||||||
var item_template = _items[tpl];
|
var item_template = _items[tpl];
|
||||||
return item_template.Props.Caliber;
|
return item_template.Props.Caliber;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual StaticContainerRoot GetProbabilityByContainerId(string id)
|
|
||||||
{
|
|
||||||
return _streetsStatics.FirstOrDefault(x => x.template.Id == id);
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user