コード例 #1
0
 private void CloseSession(IStatSession session)
 {
     // Close off session based on type
     if (session.SessionType == MiningSession.DefaultSessionType)
     {
         currentMiningSession = null;
     }
     if (session.SessionType == TradingSession.DefaultSessionType)
     {
         currentTradingSession = null;
     }
     if (session.SessionType == CombatSession.DefaultSessionType)
     {
         currentCombatSession = null;
     }
     if (session.SessionType == TravelSession.DefaultSessionType)
     {
         currentTravelSession = null;
     }
     if (session.SessionType == ExplorationSession.DefaultSessionType)
     {
         currentExplorationSession = null;
     }
     if (session.SessionType == ScavengingSession.DefaultSessionType)
     {
         currentScavengingSession = null;
     }
 }
コード例 #2
0
 /// <summary>
 /// Start a mining session if one doesn't exist, or continue existing
 /// </summary>
 /// <returns></returns>
 internal MiningSession GetMiningSession(DateTime timestamp, string reason)
 {
     if (!IsActivelyMining)
     {
         currentMiningSession = new MiningSession();
         currentMiningSession.SetSessionDefaults(this);
         currentMiningSession.StartSession(timestamp, reason);
     }
     return(currentMiningSession);
 }