Exemplo n.º 1
0
        public static void ResetEverythingNewGame()
        {
            // In-thread stuff
            V.ValidateLoad();

            // Out of thread Async stuff
            BeginInvoke(new Action(() =>
            {
                Logger.Log("New Game - resetting everything");

                Trinity.IsReadyToTownRun   = false;
                Trinity.ForceVendorRunASAP = false;
                TownRun.TownRunCheckTimer.Reset();
                TownRun.SendEmailNotification();
                TownRun.PreTownRunPosition = Vector3.Zero;
                TownRun.PreTownRunWorldId  = -1;
                TownRun.WasVendoring       = false;

                CacheData.AbilityLastUsed.Clear();
                SpellHistory.HistoryQueue.Clear();

                DeathsThisRun                = 0;
                LastDeathTime                = DateTime.UtcNow;
                _hashsetItemStatsLookedAt    = new HashSet <string>();
                _hashsetItemPicksLookedAt    = new HashSet <string>();
                _hashsetItemFollowersIgnored = new HashSet <string>();

                Blacklist60Seconds                     = new HashSet <int>();
                Blacklist90Seconds                     = new HashSet <int>();
                Blacklist15Seconds                     = new HashSet <int>();
                BacktrackList                          = new SortedList <int, Vector3>();
                TotalBacktracks                        = 0;
                HasMappedPlayerAbilities               = false;
                PlayerMover.TotalAntiStuckAttempts     = 1;
                PlayerMover.vSafeMovementLocation      = Vector3.Zero;
                PlayerMover.LastPosition               = Vector3.Zero;
                PlayerMover.TimesReachedStuckPoint     = 0;
                PlayerMover.TimeLastRecordedPosition   = DateTime.MinValue;
                PlayerMover.LastGeneratedStuckPosition = DateTime.MinValue;
                PlayerMover.TimesReachedMaxUnstucks    = 0;
                PlayerMover.CancelUnstuckerForSeconds  = 0;
                PlayerMover.LastCancelledUnstucker     = DateTime.MinValue;
                NavHelper.UsedStuckSpots               = new List <GridPoint>();

                CacheData.FullClear();

                // Reset all the caches
                ProfileHistory = new List <string>();
                CurrentProfile = "";
                FirstProfile   = "";

                Logger.Log("New Game, resetting Gold Inactivity Timer");
                GoldInactivity.Instance.ResetCheckGold();

                CombatBase.IsQuestingMode = false;

                GenericCache.ClearCache();
                GenericBlacklist.ClearBlacklist();
            }));
        }
Exemplo n.º 2
0
 // When the bot stops, output a final item-stats report so it is as up-to-date as can be
 private static void TrinityBotStop(IBot bot)
 {
     GoldInactivity.Instance.ResetCheckGold();
     XpInactivity.Instance.ResetCheckXp();
     // Issue final reports
     ItemDropStats.OutputReport();
     PlayerMover.TotalAntiStuckAttempts     = 1;
     PlayerMover.vSafeMovementLocation      = Vector3.Zero;
     PlayerMover.LastPosition               = Vector3.Zero;
     PlayerMover.TimesReachedStuckPoint     = 0;
     PlayerMover.TimeLastRecordedPosition   = DateTime.MinValue;
     PlayerMover.LastGeneratedStuckPosition = DateTime.MinValue;
     DeathsThisRun = 0;
     CacheData.FullClear();
 }
Exemplo n.º 3
0
 // When the bot stops, output a final item-stats report so it is as up-to-date as can be
 private void TrinityBotStop(IBot bot)
 {
     // Issue final reports
     OutputReport();
     BacktrackList   = new SortedList <int, Vector3>();
     TotalBacktracks = 0;
     PlayerMover.TotalAntiStuckAttempts     = 1;
     PlayerMover.vSafeMovementLocation      = Vector3.Zero;
     PlayerMover.LastPosition               = Vector3.Zero;
     PlayerMover.TimesReachedStuckPoint     = 0;
     PlayerMover.TimeLastRecordedPosition   = DateTime.MinValue;
     PlayerMover.LastGeneratedStuckPosition = DateTime.MinValue;
     DeathsThisRun = 0;
     CacheData.FullClear();
 }
Exemplo n.º 4
0
 void GameEvents_OnWorldChanged(object sender, EventArgs e)
 {
     CacheData.FullClear();
 }
Exemplo n.º 5
0
 private static void ClearCachesOnGameChange(object sender, EventArgs e)
 {
     CacheData.FullClear();
 }
Exemplo n.º 6
0
 static void GameEvents_OnWorldChanged(object sender, EventArgs e)
 {
     CacheData.FullClear();
     TrinityItemManager.ResetBackPackCheck();
 }