Ejemplo n.º 1
0
 /// <summary>
 /// The combat has started, so we begin registering the console messages
 /// </summary>
 public void StartCombat()
 {
     // We are now logging the combat information
     InCombat = true;
     CombatLogStringBuilder = new StringBuilder();
     skirmishInformation    = new SkirmishInformation();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// The combat has started, so we begin registering the console messages
 /// </summary>
 public void StartCombat()
 {
     try
     {
         if (Main.enabled && !InCombat)
         {
             // We are now logging the combat information
             InCombat = true;
             CombatLogStringBuilder = new StringBuilder();
             skirmishInformation    = new SkirmishInformation();
         }
     }
     catch (Exception ex)
     {
         Main.LogError(ex);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Write the logs
        /// </summary>
        /// <param name="stringsToWrite">The string that is to be written</param>
        /// <param name="configuration">The configuration for the combat log exporter</param>
        public void WriteLogs(StringBuilder stringsToWrite, CombatConfiguration configuration, SkirmishInformation skirmish)
        {
            // Write the combat log to a file
            string dateTimeName = $"{configuration.CombatLogWriteLocation}{skirmish.MapName} - {skirmish.StartOfCombatTime}.log";

            try
            {
                File.WriteAllText(dateTimeName, stringsToWrite.ToString());
            }
            catch (Exception e)
            {
                Game.Console.AddMessage($"Exception in Combat Log Exporter: {e}");
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Write the logs
        /// </summary>
        /// <param name="stringsToWrite">The string that is to be written</param>
        /// <param name="configuration">The configuration for the combat log exporter</param>
        public void WriteLogs(StringBuilder stringsToWrite, CombatConfiguration configuration, SkirmishInformation skirmish)
        {
            // Write the combat log to a file
            string dateTimeName = $"{configuration.CombatLogWriteLocation}{skirmish.MapName} - {skirmish.StartOfCombatTime}.log";

            try
            {
                File.WriteAllText(dateTimeName, stringsToWrite.ToString());
            }
            catch (Exception e)
            {
                Main.LogError(e);
            }
        }