Exemple #1
0
 public void GameStopped(ref GameStats lastGame)
 {
     if (lastGame.Profiles.Count > 0)
     {
         UpdateTotals(ref lastGame);
     }
     Logger.WriteProfileTrackerOutput();
 }
Exemple #2
0
 private void UpdateTotals(ref GameStats lastGame)
 {
     lastGame.Profiles.Last().UpdateRangeVariables();
     foreach (var item in lastGame.Profiles)
     {
         if (!Profiles.Contains(item))
         {
             Profiles.Add(item);
         }
         else
         {
             Profiles[Profiles.IndexOf(item)].MergeStats(item);
         }
     }
 }
Exemple #3
0
        internal bool RefreshGameId()
        {
            GameId curgameID = _currentGameId;
            using (ZetaDia.Memory.AcquireFrame())
            {
                curgameID = ZetaDia.Service.CurrentGameId;
            }

            if (!curgameID.Equals(_currentGameId))
            {

                Logger.Write(LogLevel.OutOfCombat, "New Game Started");

                //Merge last GameStats with the Total
                TrackingStats.GameChanged(ref CurrentGameStats);

                //Create new GameStats
                CurrentGameStats = new GameStats();

                //Update Account Details
                Bot.Character.Account.UpdateCurrentAccountDetails();

                //Clear TrinityLoadOnce Used Profiles!
                TrinityLoadOnce.UsedProfiles.Clear();

                //Clear Interactable Cache
                Profile.InteractableObjectCache.Clear();

                //Clear Health Average
                ObjectCache.Objects.ClearHealthAverageStats();

                //Renew bot
                Funky.ResetBot();

                //Gold Inactivity
                GoldTimeoutChecker.LastCoinageUpdate = DateTime.Now;

                _currentGameId = curgameID;
                return true;
            }

            return false;
        }