Beispiel #1
0
        /// <summary>
        /// Updates a stored player's stats
        /// </summary>
        /// <param name="player"></param>
        /// <param name="storedplayer"></param>
        public static void populateStoredStats(sPlayer player, storedPlayer storedplayer)
        {
            if (player != null && storedplayer != null)
            {
                storedplayer.totalTime = player.TimePlayed;
                storedplayer.firstLogin = player.firstLogin;
                storedplayer.lastSeen = DateTime.Now.ToString("G");
                storedplayer.loginCount = player.loginCount;
                storedplayer.knownAccounts = player.knownAccounts;
                storedplayer.knownIPs = player.knownIPs;

                storedplayer.kills = player.kills;
                storedplayer.deaths = player.deaths;
                storedplayer.mobkills = player.mobkills;
                storedplayer.bosskills = player.bosskills;
            }
        }
Beispiel #2
0
 /// <summary>
 /// Updates a player
 /// </summary>
 /// <param name="player"></param>
 public static void UpdatePlayer(sPlayer player)
 {
     try
     {
         populateStoredStats(player, GetstoredPlayer(player.TSPlayer.UserAccountName)[0]);
     }
     catch (Exception x)
     {
         Log.ConsoleError(x.ToString());
     }
 }
Beispiel #3
0
        /// <summary>
        /// Fills out a player's stats
        /// </summary>
        /// <param name="player"></param>
        /// <param name="storedplayer"></param>
        public static void populatePlayerStats(sPlayer player, storedPlayer storedplayer)
        {
            if (storedplayer != null && player != null)
            {
                player.TimePlayed = storedplayer.totalTime;
                player.firstLogin = storedplayer.firstLogin;
                player.lastSeen = DateTime.UtcNow.ToString("G");
                player.loginCount = storedplayer.loginCount + 1;
                player.knownAccounts = storedplayer.knownAccounts;
                player.knownIPs = storedplayer.knownIPs;

                player.kills = storedplayer.kills;
                player.deaths = storedplayer.deaths;
                player.mobkills = storedplayer.mobkills;
                player.bosskills = storedplayer.bosskills;
            }
        }