commit code from airplane

This commit is contained in:
Mikhail Thompson
2024-06-30 12:24:36 -04:00
parent 2e3ed14c93
commit e81893c8f2
20 changed files with 317 additions and 145 deletions

View File

@@ -41,6 +41,12 @@ namespace nksrv.Utils
public bool IsReceieved = false;
}
public class UserPointData
{
public int UserLevel = 1;
public int ExperiencePoint = 0;
}
public class User
{
@@ -50,29 +56,33 @@ namespace nksrv.Utils
public string PlayerName = "";
public ulong ID;
public long RegisterTime;
public int LastStageCleared;
public string Nickname = "SomePLayer";
public int LastNormalStageCleared;
public int LastHardStageCleared;
public string Nickname = "SomePlayer";
public int ProfileIconId = 39900;
public bool ProfileIconIsPrism = false;
// Game data
public List<string> CompletedScenarios = [];
public Dictionary<int, FieldInfo> FieldInfo = [];
public Dictionary<string, string> MapJson = [];
public Dictionary<CurrencyType, long> Currency = new() {
{ CurrencyType.ContentStamina, 2 },
{ CurrencyType.CharPremiumTicket, 23422 }
{ CurrencyType.CharPremiumTicket, 999999 }
};
public List<Character> Characters = [];
public NetWholeUserTeamData TeamData = new();
public NetWholeUserTeamData RepresentationTeamData = new();
public List<int> ClearedTutorials = [];
public NetWallpaperData[] WallpaperList = [];
public Dictionary<int, NetUserTeamData> UserTeams = new Dictionary<int, NetUserTeamData>();
public Dictionary<int, bool> MainQuestData = new()
{
{1, false }
};
public int InfraCoreExp = 0;
public int InfraCoreLvl = 1;
public UserPointData userPointData = new();
public void SetQuest(int tid, bool recieved)
{
@@ -86,11 +96,6 @@ namespace nksrv.Utils
MainQuestData.Add(tid, recieved);
}
}
public void RmQuest(int tid)
{
MainQuestData.Remove(tid);
}
}
public class CoreInfo
{

View File

@@ -57,7 +57,6 @@ namespace nksrv.Utils
var x = SecretAeadXChaCha20Poly1305.Decrypt(bytes, nonce, key.Keys.ReadSharedSecret, [.. additionalData]);
var ms = new MemoryStream(x);
// File.WriteAllBytes("fullPkt-decr", ms.ToArray());
var unkVal1 = ms.ReadByte();
var unkVal2 = ms.ReadByte();
@@ -65,7 +64,6 @@ namespace nksrv.Utils
var startPos = (int)ms.Position;
//Console.WriteLine("seg #: " + seqNum + ",actual:" + bytes.Length + "cntlen:" + ctx.Request.ContentLength64);
var contents = x.Skip(startPos).ToArray();
if (contents.Length != 0 && contents[0] == 31)