new BenBotApi support

This commit is contained in:
iAmAsval 2020-03-23 15:16:23 +01:00
parent c57d71399e
commit 0fbc77ce24
3 changed files with 13 additions and 6 deletions

View File

@ -41,13 +41,14 @@ namespace FModel.Methods.AESManager
&& !AESEntries.AESEntriesList.Any(w => string.Equals(w.ThePAKName, Path.GetFileNameWithoutExtension(x.ThePAKPath))) //IS NOT ALREADY ADDED
))
{
if (KeysDict.ContainsKey(Path.GetFileName(Pak.ThePAKPath)))
string trigger = Pak.ThePAKPath.Substring(Pak.ThePAKPath.IndexOf("FortniteGame")).Replace("\\", "/");
if (KeysDict.ContainsKey(trigger))
{
KeysManager.Serialize(Path.GetFileNameWithoutExtension(Pak.ThePAKPath), KeysDict[Path.GetFileName(Pak.ThePAKPath)].ToUpperInvariant().Substring(2));
KeysManager.Serialize(Path.GetFileNameWithoutExtension(Pak.ThePAKPath), KeysDict[trigger].ToUpperInvariant().Substring(2));
if (_oldAESEntriesList != null)
{
if (!_oldAESEntriesList.Any(x => string.Equals(x.ThePAKKey, KeysDict[Path.GetFileName(Pak.ThePAKPath)].ToUpperInvariant().Substring(2))))
if (!_oldAESEntriesList.Any(x => string.Equals(x.ThePAKKey, KeysDict[trigger].ToUpperInvariant().Substring(2))))
{
new UpdateMyConsole(Path.GetFileName(Pak.ThePAKPath), CColors.Blue).Append();
new UpdateMyConsole(" can now be opened.", CColors.White, true).Append();

View File

@ -95,7 +95,13 @@ namespace FModel.Methods.Assets.IconCreator
}
if (max_stack_size != null)
{
_maxStackSize = "Max Stack Size: " + max_stack_size["struct_type"]["properties"][0]["tag_data"].Value<string>();
JToken token = max_stack_size["struct_type"]["properties"][0];
if (token["name"].Value<string>().Equals("Value"))
_maxStackSize = "Max Stack Size: " + token["tag_data"].Value<string>();
/*else if (token["name"].Value<string>().Equals("Curve"))
{
}*/
}
if (ammo_data != null && ammo_data.Value<string>().Contains("Ammo"))
{

View File

@ -10,7 +10,7 @@ namespace FModel.Methods.Utilities
static class EndpointsUtility
{
private const string DROPBOX_JSON = "https://cdn.asval.tk/d/FModel/FModel.json";
private const string BENBOT_AES = "http://benbotfn.tk:8080/api/aes";
private const string BENBOT_AES = "https://benbotfn.tk/api/v1/aes";
public static string GetEndpoint(string url)
{
@ -97,7 +97,7 @@ namespace FModel.Methods.Utilities
DebugHelper.WriteLine("BenBotAPI: Main AES key not found in endpoint response");
}
JToken dynamicPaks = JObject.Parse(EndpointContent).SelectToken("additionalKeys");
JToken dynamicPaks = JObject.Parse(EndpointContent).SelectToken("dynamicKeys");
return JToken.Parse(dynamicPaks.ToString()).ToString().TrimStart('[').TrimEnd(']');
}
else