Exemplo n.º 1
0
 public void GameStopped(ref GameStats lastGame)
 {
     if (lastGame.Profiles.Count > 0)
     {
         UpdateTotals(ref lastGame);
     }
     Logger.WriteProfileTrackerOutput();
 }
Exemplo n.º 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);
         }
     }
 }
Exemplo n.º 3
0
Arquivo: Game.cs Projeto: BUFORD/Funky
        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;
        }