Skip to content
Permalink
Browse files

Timestamp fix

  • Loading branch information...
metonator committed Feb 3, 2019
1 parent 8cf788c commit 545ee95e929b684f1eaa6ce842b151ef7eb42097
@@ -66,9 +66,16 @@ class LauncherUpdateCheck
try {
if(updater.Code == 0) {
if (updater.Payload.UpdateExists == false) {
text.Text = "Launcher Status - Updated";
status.Image = Properties.Resources.ac_success;
text.ForeColor = Color.FromArgb(0x9fc120);
//if(updater.Payload.LatestVersion.CompareTo(updater.Payload.ClientVersion) > 0) {
text.Text = "Launcher Status - Updated";
status.Image = Properties.Resources.ac_success;
text.ForeColor = Color.FromArgb(0x9fc120);
//} else {
// text.Text = "Launcher Status - Prerelease";
// status.Image = Properties.Resources.ac_warning;
// text.ForeColor = Color.Yellow;
//}

description.Text = "Version : v" + Application.ProductVersion + "build-" + SHA.HashFile(AppDomain.CurrentDomain.FriendlyName).Substring(0, 7);
} else {
text.Text = "Launcher Status - Available";
@@ -130,7 +137,7 @@ class LauncherUpdateCheck
text.ForeColor = Color.FromArgb(254, 0, 0);
description.Text = "Version : v" + Application.ProductVersion + "build-" + SHA.HashFile(AppDomain.CurrentDomain.FriendlyName).Substring(0, 7);
}
} catch {
} catch(Exception ex) {
if(text.InvokeRequired == true) //checks skip, because we only need to know if we can access ui from actual thread
{
text.Invoke(new Action(delegate ()
@@ -89,7 +89,6 @@ class DiscordGamePresence {
SmallImageText = "Treasure Hunt - Day: " + TEDay,
SmallImageKey = "gamemode_treasure"
};
//_presence.Timestamps = Timestamps. RPCstartTimestamp; TODO: repair
MainScreen.discordRpcClient.SetPresence(_presence);

Console.WriteLine(serverreply);
@@ -154,7 +153,12 @@ class DiscordGamePresence {
SmallImageText = "In-Freeroam",
SmallImageKey = "gamemode_freeroam"
};
//_presence.startTimestamp = RPCstartTimestamp; TODO: repair

_presence.Timestamps = new Timestamps() {
Start = null,
End = null
};

MainScreen.discordRpcClient.SetPresence(_presence);

eventTerminatedManually = true;
@@ -174,7 +178,6 @@ class DiscordGamePresence {
SmallImageText = EventList.getEventName(Convert.ToInt32(EventID)),
SmallImageKey = EventList.getEventType(Convert.ToInt32(EventID))
};
//_presence.startTimestamp = RPCstartTimestamp; TODO: repair
MainScreen.discordRpcClient.SetPresence(_presence);

eventTerminatedManually = false;
@@ -196,7 +199,12 @@ class DiscordGamePresence {
_presence.Assets.LargeImageText = PersonaName + " - Level: " + PersonaLevel;
_presence.Assets.LargeImageKey = PersonaAvatarId;
_presence.Assets.SmallImageKey = "gamemode_freeroam";
//_presence.startTimestamp = RPCstartTimestamp; TODO: repair

_presence.Timestamps = new Timestamps() {
Start = null,
End = null
};

MainScreen.discordRpcClient.SetPresence(_presence);
}

@@ -213,7 +221,7 @@ class DiscordGamePresence {
SmallImageText = EventList.getEventName(EventID),
SmallImageKey = EventList.getEventType(EventID)
};
//_presence.startTimestamp = RPCstartTimestamp; TODO: repair

MainScreen.discordRpcClient.SetPresence(_presence);

eventTerminatedManually = false;
@@ -228,7 +236,6 @@ class DiscordGamePresence {
SmallImageText = EventList.getEventName(EventID),
SmallImageKey = EventList.getEventType(EventID)
};
//_presence.startTimestamp = RPCstartTimestamp; TODO: repair
MainScreen.discordRpcClient.SetPresence(_presence);

eventTerminatedManually = false;
@@ -243,7 +250,12 @@ class DiscordGamePresence {
SmallImageText = EventList.getEventName(EventID),
SmallImageKey = EventList.getEventType(EventID)
};
//_presence.startTimestamp = Self.getTimestamp(true); TODO: repair

_presence.Timestamps = new Timestamps() {
Start = DateTime.UtcNow,
End = null
};

MainScreen.discordRpcClient.SetPresence(_presence);
}

@@ -10,8 +10,7 @@

namespace GameLauncherReborn {
class Self {
//public static string mainserver = "http://launcher.worldunited.gg";
public static string mainserver = "http://37.233.101.12";
public static string mainserver = "http://launcher.worldunited.gg";

public static string[] serverlisturl = new string[] {
mainserver + "/serverlist.json",
@@ -158,12 +158,8 @@ private void moveWindow_MouseMove(object sender, MouseEventArgs e)

discordRpcClient = new DiscordRpcClient(Self.DiscordRPCID);

//handlers.readyCallback = Discord_Ready; //Discord, please, fix that... (already reported on DiscordRPC Issues Page)

//discordRpcClient.OnReady += (sender, e) =>
//{

//};
discordRpcClient.OnReady += (sender, e) => {
};

discordRpcClient.OnError += (sender, e) =>
{
@@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("MTNTR")]
[assembly: AssemblyProduct("GameLauncher")]
[assembly: AssemblyCopyright("OpenSource")]
[assembly: AssemblyCopyright("WorldUnited")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

@@ -32,5 +32,5 @@
// Możesz określić wszystkie wartości lub użyć domyślnych numerów kompilacji i poprawki
// przy użyciu symbolu „*”, tak jak pokazano poniżej:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.2.2")]
[assembly: AssemblyFileVersion("2.0.2.2")]
[assembly: AssemblyVersion("2.0.2.3")]
[assembly: AssemblyFileVersion("2.0.2.3")]

0 comments on commit 545ee95

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.