Exemple #1
0
 /// <summary>
 /// </summary>
 /// <param name="statList">
 /// </param>
 /// <param name="number">
 /// </param>
 /// <param name="defaultValue">
 /// </param>
 /// <param name="sendBaseValue">
 /// </param>
 /// <param name="dontWrite">
 /// </param>
 /// <param name="announceToPlayfield">
 /// </param>
 public Stat(
     Stats statList, 
     int number, 
     uint defaultValue, 
     bool sendBaseValue, 
     bool dontWrite, 
     bool announceToPlayfield)
 {
     this.Stats = statList;
     this.StatId = number;
     this.DefaultValue = defaultValue;
     this.BaseValue = defaultValue;
     this.sendBaseValue = sendBaseValue;
     this.DoNotDontWriteToSql = dontWrite;
     this.announceToPlayfield = announceToPlayfield;
     this.ReCalculate = true;
 }
        /// <summary>
        /// </summary>
        /// <param name="fileName">
        /// </param>
        public static void WriteStatsList(string fileName)
        {
            TextWriter tw = new StreamWriter(fileName);

            WriteHeader1(tw, "CellAO Stats List");
            WriteHorizonalLine(tw);

            Stats stats = new Stats(new Identity() { Instance = 1, Type = IdentityType.CanbeAffected });

            foreach (Stat stat in stats.All)
            {
                string statName = StatNamesDefaults.GetStatName(stat.StatId);
                uint statDefaultValue = stat.BaseValue;
                bool dontWriteToSql = stat.DoNotDontWriteToSql;
                bool announceToPlayfield = stat.AnnounceToPlayfield;
                string className = stat.GetType().FullName;
                tw.WriteLine("**" + statName + " [" + stat.StatId + "]**");
                tw.WriteLine();
                tw.WriteLine("**Class type:** " + className);
                tw.WriteLine();
                tw.WriteLine("**Default value:** " + statDefaultValue);
                tw.WriteLine();
                tw.WriteLine("**Tags:** ");
                if (!dontWriteToSql)
                {
                    WriteCode(tw, "Save in Database");
                }

                if (!dontWriteToSql && announceToPlayfield)
                {
                    tw.Write(", ");
                }

                if (announceToPlayfield)
                {
                    WriteCode(tw, "Announce to Playfield");
                }

                tw.WriteLine();
                WriteHorizonalLine(tw);
                tw.WriteLine();
            }

            WriteFooter(tw);
            tw.Close();
        }
Exemple #3
0
 /// <summary>
 /// </summary>
 /// <param name="stats">
 /// </param>
 public void SetStats(Stats stats)
 {
     // Set the owning list
     this.Stats = stats;
 }