Skip to content

Commit

Permalink
Updated dumper to remove use State and AcitvationIds
Browse files Browse the repository at this point in the history
  • Loading branch information
SlejmUr committed Mar 3, 2023
1 parent 774ba03 commit cf65eba
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 14 deletions.
8 changes: 2 additions & 6 deletions Dumperv2/GameLister.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ public static void Work(List<Uplay.Ownership.OwnedGame>? games)
OW ow = new();
ow.ProductId = game.ProductId;
ow.ProductType = ((Uplay.Ownership.OwnedGame.Types.ProductType)game.ProductType).ToString();
ow.State = ((Uplay.Ownership.OwnedGame.Types.State)game.State).ToString();
ow.TargetPartner = game.TargetPartner.ToString();
ow.ProductAssociations = game.ProductAssociations.ToList();
ow.ActivationIds = game.ActivationIds.ToList();

if (owList.FindAll(x => x.ProductId == game.ProductId).Count <= 0)
{
Expand All @@ -33,22 +31,20 @@ public static void Work(List<Uplay.Ownership.OwnedGame>? games)

var listdiffconf = owList.Where(x => x.ProductId == game.ProductId
&& (x.ProductType != ((Uplay.Ownership.OwnedGame.Types.ProductType)game.ProductType).ToString()
|| x.State != ((Uplay.Ownership.OwnedGame.Types.State)game.State).ToString()
|| x.TargetPartner != game.TargetPartner.ToString()
|| x.ProductAssociations != game.ProductAssociations.ToList()
|| x.ActivationIds != game.ActivationIds.ToList()
)).ToList();

if (listdiffconf.Count > 0)
{
var ows = owList.Where(x => x.ProductId == game.ProductId).First();
ows.ProductType = ((Uplay.Ownership.OwnedGame.Types.ProductType)game.ProductType).ToString();
ows.State = ((Uplay.Ownership.OwnedGame.Types.State)game.State).ToString();
ows.TargetPartner = game.TargetPartner.ToString();
ows.ProductAssociations = game.ProductAssociations.ToList();
ows.ActivationIds = game.ActivationIds.ToList();
}
}


File.WriteAllText("gamelist.json", JsonConvert.SerializeObject(owList, Formatting.Indented));
}
}
Expand Down
2 changes: 0 additions & 2 deletions Dumperv2/Jsons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ public class OW
{
public uint ProductId { get; set; }
public string ProductType { get; set; }
public string State { get; set; }
public string TargetPartner { get; set; }
public List<uint> ProductAssociations { get; set; }
public List<uint> ActivationIds { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion Dumperv2/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Dumperv2
{
internal class Program
{
public static string Version = "0.1";
public static string Version = "0.2";
static void Main(string[] args)
{
if (!VersionCheck.Check())
Expand Down
2 changes: 1 addition & 1 deletion Dumperv2/Version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1
0.2
19 changes: 15 additions & 4 deletions PipeProxy/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,22 @@ static void Main(string[] args)

foreach (string name in PipeNames)
{
var longRunning = new KillMe(name);
NameKill.Add(name,longRunning);
Thread myThread = new Thread(longRunning.ExecuteLongRunningTask);
try
{
if (!name.Contains("process"))
continue;

var longRunning = new KillMe(name);
NameKill.Add(name, longRunning);
Thread myThread = new Thread(longRunning.ExecuteLongRunningTask);

myThread.Start();
}
catch
{

}

myThread.Start();
}

Console.ReadLine();
Expand Down
10 changes: 10 additions & 0 deletions TestApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ static void Main(string[] args)
OwnershipConnection ownershipConnection = new(socket);
ownershipConnection.PushEvent += Ownership_PushEvent;
ownershipConnection.GetOwnedGames();

StoreConnection storeConnection = new(socket);
storeConnection.PushEvent += StoreConnection_PushEvent;
storeConnection.Init();
/*
ChannelProfile.GetPendingChannels(login.Ticket,login.SessionId);
ChannelProfile.GetActiveChannels(login.Ticket, login.SessionId);
Expand Down Expand Up @@ -210,6 +214,12 @@ static void Main(string[] args)

}

private static void StoreConnection_PushEvent(object? sender, Uplay.Store.Push e)
{
Console.WriteLine(e.ToString());
File.AppendAllText("store_push_event.txt", e.ToString());
}

static byte[] Decompress(byte[] data)
{
using (var compressedStream = new MemoryStream(data))
Expand Down

0 comments on commit cf65eba

Please sign in to comment.