Пример #1
0
        private void SetDungeonIds()
        {
            string[] texts = TreasureCalc.TryReadFile(dataDirName + dungeonListName);
            if (texts == null)
            {
                return;
            }
            List <int>[] vs = new List <int> [texts.Length];

            for (int i = 0; i < texts.Length; i++)
            {
                if (texts[i] == "")
                {
                    continue;
                }
                string[] strs = texts[i].Split(',');
                vs[i] = new List <int>();
                for (int j = 0; j < strs.Length; j++)
                {
                    vs[i].Add(TreasureCalc.IntParse(strs[j]));
                }
            }

            dungeonIds = vs;
        }
Пример #2
0
        private int[][] GetSearchValue(int value)
        {
            if (value == 0)
            {
                return(null);
            }
            int          count = listBox1.Items.Count;
            List <int[]> vs    = new List <int[]>();

            for (int i = 0; i < count; i++)
            {
                string str = listBox1.Items[i].ToString();
                if (str == "")
                {
                    continue;
                }
                string[] strs = str.Split(',');
                int[]    v    = new int[strs.Length];
                v[0] = GetItemId(strs[0]);
                if (strs.Length >= 2)
                {
                    v[1] = TreasureCalc.IntParse(strs[1]);
                }
                for (int j = 2; j < strs.Length; j++)
                {
                    v[j] = GetEnchantId(strs[j]);
                }
                vs.Add(v);
            }

            return(vs.ToArray());;
        }
Пример #3
0
        private void SetMapIds()
        {
            string[] texts = TreasureCalc.TryReadFile(dataDirName + mapIdListName);
            if (texts == null)
            {
                return;
            }
            int[][] vs = new int[texts.Length][];

            for (int i = 0; i < texts.Length; i++)
            {
                if (texts[i] == "")
                {
                    continue;
                }
                string[] strs = texts[i].Split(',');
                vs[i] = new int[strs.Length];
                for (int j = 0; j < strs.Length; j++)
                {
                    vs[i][j] = TreasureCalc.IntParse(strs[j]);
                }
            }

            mapIds = vs;
        }
Пример #4
0
        private void SetRadioButtonChecked(RadioButton[] radio, string str)
        {
            int id = TreasureCalc.IntParse(str);

            if (id < radio.Length)
            {
                radio[id].Checked = true;
            }
        }
Пример #5
0
        private void SetcomboBoxSelected(ComboBox combo, string str)
        {
            int index = TreasureCalc.IntParse(str);
            int count = combo.Items.Count - 1;

            if (index > count)
            {
                index = count;
            }
            combo.SelectedIndex = index;
        }
Пример #6
0
 public EnchantData(string[] strs)
 {
     if (strs.Length < 6)
     {
         strs = new string[6];
     }
     Id = TreasureCalc.IntParse(strs[0]);
     Name = strs[1];
     RarityType = strs[2];
     Rarity = TreasureCalc.IntParse(strs[3]);
     IsDrop = strs[4] == "0";
     Prob = TreasureCalc.IntParse(strs[5]);
 }
Пример #7
0
        public TreasureBoxData(string[] strs, string memo)
        {
            Id      = TreasureCalc.IntParse(strs[0]);
            Rarity  = GetTreBoxRarity(strs[1]);
            PosHash = TreasureCalc.IntParse(strs[2]);
            string format = "{0:#.##}";

            X     = String.Format(format, strs[3]);
            Y     = String.Format(format, strs[4]);
            Z     = String.Format(format, strs[5]);
            Spawn = strs[6];
            Memo  = memo;
        }
Пример #8
0
 public ItemData(string[] strs)
 {
     if (strs.Length < 6)
     {
         strs = new string[6];
     }
     Id         = TreasureCalc.IntParse(strs[0]);
     Name       = strs[1];
     Type       = strs[2];
     RarityType = strs[3];
     Rarity     = TreasureCalc.IntParse(strs[4]);
     Prob       = TreasureCalc.IntParse(strs[5]);
     Enchant    = null;
 }
Пример #9
0
        private void SetEditMode()
        {
            string str = "" + form1_ListBox.Items[form1_ListBox.SelectedIndex];

            string[] strs = str.Split(',');

            comboBox1.Text = strs[0];
            int index = TreasureCalc.IntParse(strs[1]) + 1;

            if (index < 5)
            {
                comboBox3.SelectedIndex = index;
            }

            for (int i = 2; i < strs.Length; i++)
            {
                listBox1.Items.Add(strs[i]);
            }
        }
Пример #10
0
 public TreasureBoxData(string[] strs)
 {
     PosHash = TreasureCalc.IntParse(strs[0]);
     Memo    = strs[1];
 }