Ejemplo n.º 1
0
 private void ParseUpgrade(CSVLoader csvLoader)
 {
     for (int i = 0; i < csvLoader.Rows; i++)
     {
         csvLoader.ReadValue(0, i, string.Empty, out string Value);
         csvLoader.ReadValue(1, i, string.Empty, out string Value2);
         csvLoader.ReadValue(2, i, string.Empty, out string Value3);
         csvLoader.ReadValue(3, i, string.Empty, out string Value4);
         csvLoader.ReadValue(4, i, -1, out int Value5);
         csvLoader.ReadValue(5, i, string.Empty, out string Value6);
         csvLoader.ReadValue(6, i, -1, out int Value7);
         csvLoader.ReadValue(7, i, -1, out int Value8);
         csvLoader.ReadValue(8, i, -1, out int Value9);
         csvLoader.ReadValue(9, i, string.Empty, out string Value10);
         csvLoader.ReadValue(10, i, 100, out int Value11);
         Value.Trim();
         Value.ToLower();
         Value2.Trim();
         Value3.Trim();
         Value4.Trim();
         Value4.ToLower();
         Value6.Trim();
         Value6.ToLower();
         Value10.Trim();
         int ct = TItem.String2Type(Value4);
         Add(Value, new TUpgrade(Value, Value2, FindIcon(Value3), ct, Value5, Value6, Value7, Value8, Value9, Value10, Value11));
     }
 }
Ejemplo n.º 2
0
 private void ParseSpecial(CSVLoader csvLoader)
 {
     for (int i = 0; i < csvLoader.Rows; i++)
     {
         csvLoader.ReadValue(0, i, string.Empty, out string Value);
         csvLoader.ReadValue(1, i, string.Empty, out string Value2);
         csvLoader.ReadValue(2, i, string.Empty, out string Value3);
         csvLoader.ReadValue(3, i, string.Empty, out string Value4);
         csvLoader.ReadValue(4, i, def: false, out bool Value5);
         csvLoader.ReadValue(5, i, string.Empty, out string Value6);
         csvLoader.ReadValue(6, i, string.Empty, out string Value7);
         csvLoader.ReadValue(7, i, def: false, out bool Value8);
         csvLoader.ReadValue(8, i, string.Empty, out string Value9);
         csvLoader.ReadValue(9, i, def: false, out bool Value10);
         csvLoader.ReadValue(10, i, string.Empty, out string Value11);
         csvLoader.ReadValue(11, i, string.Empty, out string Value12);
         csvLoader.ReadValue(12, i, 100, out int Value13);
         Value.Trim();
         Value.ToLower();
         Value2.Trim();
         Value3.Trim();
         Value4.Trim();
         Value4.ToLower();
         Value6 = Value6.Trim();
         Value6 = Value6.ToLower();
         Value7.Trim();
         Value11.Trim();
         int ct = TItem.String2Type(Value4);
         Add(Value, new TSpecial(Value, Value2, FindIcon(Value3), ct, Value5, TItem.String2FunctionMask(Value6), Value7, Value8, Value9, Value10, Convert.ToInt32(Value11), Value12, Value13));
     }
 }
Ejemplo n.º 3
0
 private void ParsePurcharseItemsTable(CSVLoader csvLoader)
 {
     purcharseItems = new PurcharseItems[csvLoader.Rows];
     for (int i = 0; i < csvLoader.Rows; i++)
     {
         purcharseItems[i] = new PurcharseItems();
         csvLoader.ReadValue(0, i, string.Empty, out string Value);
         csvLoader.ReadValue(1, i, string.Empty, out string _);
         csvLoader.ReadValue(2, i, string.Empty, out string Value3);
         csvLoader.ReadValue(3, i, string.Empty, out string Value4);
         csvLoader.ReadValue(4, i, string.Empty, out string Value5);
         csvLoader.ReadValue(5, i, string.Empty, out string Value6);
         csvLoader.ReadValue(6, i, string.Empty, out string Value7);
         Value.Trim();
         Value3.Trim();
         Value4.Trim();
         Value5.Trim();
         Value6.Trim();
         Value7.Trim();
         purcharseItems[i].Slot         = Convert.ToInt32(Value);
         purcharseItems[i].Price        = Convert.ToInt32(Value3);
         purcharseItems[i].BuyUnit      = Convert.ToInt32(Value4);
         purcharseItems[i].incAtkSpeed  = (float)Convert.ToDouble(Value5);
         purcharseItems[i].incMoveSpeed = (float)Convert.ToDouble(Value6);
         purcharseItems[i].cotinuesTime = (float)Convert.ToDouble(Value7);
     }
 }
Ejemplo n.º 4
0
 private void ParseUpgradeChargeTable(CSVLoader csvLoader)
 {
     upgradeChargeTables = new UpgradeTable[csvLoader.Rows];
     for (int i = 0; i < csvLoader.Rows; i++)
     {
         upgradeChargeTables[i] = new UpgradeTable();
         csvLoader.ReadValue(0, i, string.Empty, out string Value);
         csvLoader.ReadValue(1, i, string.Empty, out string Value2);
         csvLoader.ReadValue(2, i, string.Empty, out string Value3);
         csvLoader.ReadValue(3, i, string.Empty, out string Value4);
         csvLoader.ReadValue(4, i, string.Empty, out string Value5);
         csvLoader.ReadValue(5, i, string.Empty, out string Value6);
         csvLoader.ReadValue(6, i, string.Empty, out string Value7);
         csvLoader.ReadValue(7, i, string.Empty, out string Value8);
         Value.Trim();
         Value2.Trim();
         Value3.Trim();
         Value4.Trim();
         Value5.Trim();
         Value6.Trim();
         Value7.Trim();
         Value8.Trim();
         upgradeChargeTables[i].Level            = Convert.ToInt32(Value);
         upgradeChargeTables[i].AssultAtkVal     = (float)Convert.ToDouble(Value2);
         upgradeChargeTables[i].SubmachineAtkVal = (float)Convert.ToDouble(Value3);
         upgradeChargeTables[i].SniperAtkVal     = (float)Convert.ToDouble(Value4);
         upgradeChargeTables[i].HeavyAtkVal      = (float)Convert.ToDouble(Value5);
         upgradeChargeTables[i].HandgunAtkVal    = (float)Convert.ToDouble(Value6);
         upgradeChargeTables[i].SpecialAtkVal    = (float)Convert.ToDouble(Value7);
         upgradeChargeTables[i].Price            = Convert.ToInt32(Value8);
     }
 }
Ejemplo n.º 5
0
 private void ParseMonTable(CSVLoader csvLoader)
 {
     monTables = new MonTable[csvLoader.Rows];
     for (int i = 0; i < csvLoader.Rows; i++)
     {
         monTables[i] = new MonTable();
         csvLoader.ReadValue(0, i, string.Empty, out string Value);
         csvLoader.ReadValue(1, i, string.Empty, out string Value2);
         csvLoader.ReadValue(2, i, string.Empty, out string Value3);
         csvLoader.ReadValue(3, i, string.Empty, out string Value4);
         csvLoader.ReadValue(4, i, string.Empty, out string Value5);
         csvLoader.ReadValue(5, i, string.Empty, out string Value6);
         Value.Trim();
         Value2.Trim();
         Value3.Trim();
         Value4.Trim();
         Value5.Trim();
         Value6.Trim();
         monTables[i].name      = Value;
         monTables[i].str       = Value2;
         monTables[i].HP        = Convert.ToInt32(Value3);
         monTables[i].MoveSpeed = (float)Convert.ToDouble(Value4);
         monTables[i].toCoreDmg = Convert.ToInt32(Value5);
         monTables[i].Dp        = Convert.ToInt32(Value6);
     }
 }
Ejemplo n.º 6
0
 private void ParseAccessory(CSVLoader csvLoader)
 {
     for (int i = 0; i < csvLoader.Rows; i++)
     {
         csvLoader.ReadValue(0, i, string.Empty, out string Value);
         csvLoader.ReadValue(1, i, string.Empty, out string Value2);
         csvLoader.ReadValue(2, i, string.Empty, out string Value3);
         csvLoader.ReadValue(3, i, string.Empty, out string Value4);
         csvLoader.ReadValue(4, i, string.Empty, out string Value5);
         csvLoader.ReadValue(5, i, string.Empty, out string Value6);
         csvLoader.ReadValue(6, i, def: true, out bool Value7);
         csvLoader.ReadValue(7, i, string.Empty, out string Value8);
         csvLoader.ReadValue(8, i, string.Empty, out string Value9);
         csvLoader.ReadValue(9, i, string.Empty, out string Value10);
         csvLoader.ReadValue(10, i, string.Empty, out string Value11);
         csvLoader.ReadValue(11, i, def: false, out bool Value12);
         csvLoader.ReadValue(12, i, string.Empty, out string Value13);
         csvLoader.ReadValue(13, i, string.Empty, out string Value14);
         csvLoader.ReadValue(14, i, string.Empty, out string Value15);
         csvLoader.ReadValue(15, i, 0, out int Value16);
         csvLoader.ReadValue(16, i, 0f, out float Value17);
         csvLoader.ReadValue(17, i, string.Empty, out string Value18);
         csvLoader.ReadValue(18, i, string.Empty, out string Value19);
         csvLoader.ReadValue(19, i, string.Empty, out string Value20);
         csvLoader.ReadValue(20, i, string.Empty, out string Value21);
         csvLoader.ReadValue(21, i, string.Empty, out string Value22);
         csvLoader.ReadValue(22, i, 100, out int Value23);
         Value.Trim();
         Value.ToLower();
         Value2.Trim();
         Value3.Trim();
         Value4.Trim();
         Value4.ToLower();
         Value5.Trim();
         Value5.ToLower();
         Value6.Trim();
         Value6.ToLower();
         Value8.Trim();
         Value9.Trim();
         Value10.Trim();
         Value11.Trim();
         Value19.Trim();
         Value20.Trim();
         Value21.Trim();
         Value22.Trim();
         Value14 = Value14.Trim();
         Value14 = Value14.ToLower();
         Value15.Trim();
         Value18 = Value18.ToLower();
         int num   = TItem.String2Type(Value4);
         int ck    = TItem.String2Kind(num, Value5);
         int upCat = TItem.String2UpgradeCategory(Value18);
         Add(Value, new TAccessory(Value, Value2, Value9, FindPrefab(Value8), FindIcon(Value3), num, ck, Value7, TItem.String2Slot(Value6), Value10, BuffManager.Instance.Get(Value11), Value12, Value13, TItem.String2FunctionMask(Value14), Value16, Value17, upCat, Convert.ToInt32(Value19), Value20, Value21, Value22, FindIcon(Value15), Value23));
     }
 }
Ejemplo n.º 7
0
 protected override void AddDescriptions()
 {
     base.AddDescriptions();
     AddDescription(nameof(Key), Key.ToStr());
     AddDescription(nameof(Value), Value.ToStr());
     AddDescription(nameof(Value1), Value1.ToStr());
     AddDescription(nameof(Value2), Value2.ToStr());
     AddDescription(nameof(Value3), Value3.ToStr());
     AddDescription(nameof(Value4), Value4.ToStr());
     AddDescription(nameof(Value5), Value5.ToStr());
     AddDescription(nameof(Value6), Value6.ToStr());
     AddDescription(nameof(Value7), Value7.ToStr());
     AddDescription(nameof(Value8), Value8.ToStr());
     AddDescription(nameof(Value9), Value9.ToStr());
 }
 protected bool Equals(TestEntityWithAllTypes other)
 {
     return
         (Id == other.Id &&
          Value1.Equals(other.Value1) &&
          Value2.Equals(other.Value2) &&
          Value3.Equals(other.Value3) &&
          Value4.Equals(other.Value4) &&
          Value5.Equals(other.Value5) &&
          Value6.Equals(other.Value6) &&
          Value7.Equals(other.Value7) &&
          Value8.Equals(other.Value8) &&
          Value9.Equals(other.Value9) &&
          Value10.Equals(other.Value10) &&
          Value12.IsEquals(other.Value12) &&
          string.Equals(Value14, other.Value14) &&
          Value15.Equals(other.Value15));
 }
Ejemplo n.º 9
0
 private void ParseCharacter(CSVLoader csvLoader)
 {
     for (int i = 0; i < csvLoader.Rows; i++)
     {
         csvLoader.ReadValue(0, i, string.Empty, out string Value);
         csvLoader.ReadValue(1, i, string.Empty, out string Value2);
         csvLoader.ReadValue(2, i, string.Empty, out string Value3);
         csvLoader.ReadValue(3, i, string.Empty, out string Value4);
         csvLoader.ReadValue(4, i, def: true, out bool Value5);
         csvLoader.ReadValue(5, i, string.Empty, out string Value6);
         csvLoader.ReadValue(6, i, string.Empty, out string Value7);
         csvLoader.ReadValue(7, i, string.Empty, out string Value8);
         csvLoader.ReadValue(8, i, string.Empty, out string Value9);
         csvLoader.ReadValue(9, i, def: false, out bool Value10);
         csvLoader.ReadValue(10, i, string.Empty, out string Value11);
         csvLoader.ReadValue(11, i, string.Empty, out string Value12);
         csvLoader.ReadValue(12, i, string.Empty, out string Value13);
         csvLoader.ReadValue(13, i, string.Empty, out string Value14);
         csvLoader.ReadValue(14, i, string.Empty, out string Value15);
         csvLoader.ReadValue(15, i, string.Empty, out string Value16);
         csvLoader.ReadValue(16, i, 100, out int Value17);
         Value.Trim();
         Value.ToLower();
         Value2.Trim();
         Value3.Trim();
         Value4.Trim();
         Value4.ToLower();
         Value6.Trim();
         Value7.Trim();
         Value8.Trim();
         Value9.Trim();
         Value12.Trim();
         Value13.Trim();
         Value14.Trim();
         Value15.Trim();
         Value16.Trim();
         int ct = TItem.String2Type(Value4);
         Add(Value, new TCharacter(Value, Value2, FindIcon(Value3), ct, Value5, Value6, Value7, Value8, BuffManager.Instance.Get(Value9), Value10, Value11, Convert.ToInt32(Value12), FindMaterial(Value13), Value14, Value15, Value16, Value17));
     }
 }
 private void c_ParseGachapon(CSVLoader csvLoader)
 {
     c_Gachapons = new c_Gachapon[csvLoader.Rows];
     for (int i = 0; i < csvLoader.Rows; i++)
     {
         c_Gachapons[i]           = new c_Gachapon();
         c_Gachapons[i].items     = new string[5];
         c_Gachapons[i].qualities = new int[5];
         csvLoader.ReadValue(0, i, string.Empty, out string Value);
         csvLoader.ReadValue(1, i, string.Empty, out string Value2);
         csvLoader.ReadValue(2, i, string.Empty, out string Value3);
         csvLoader.ReadValue(3, i, string.Empty, out string Value4);
         csvLoader.ReadValue(4, i, string.Empty, out string Value5);
         csvLoader.ReadValue(5, i, string.Empty, out string Value6);
         Value.Trim();
         Value2.Trim();
         Value3.Trim();
         Value4.Trim();
         Value5.Trim();
         Value6.Trim();
         c_Gachapons[i].code       = Value;
         c_Gachapons[i].itemName   = Value2;
         c_Gachapons[i].classType  = String2Type(Value3);
         c_Gachapons[i].strtblCode = Value4;
         c_Gachapons[i].icon       = FindIcon(Value5);
         c_Gachapons[i].brickPoint = Convert.ToInt32(Value6);
         int num = 6;
         for (int j = 0; j < 5; j++)
         {
             csvLoader.ReadValue(num, i, string.Empty, out string Value7);
             csvLoader.ReadValue(num + 1, i, string.Empty, out string Value8);
             Value7.Trim();
             Value8.Trim();
             c_Gachapons[i].items[j]     = Value7;
             c_Gachapons[i].qualities[j] = Convert.ToInt32(Value8);
             num += 2;
         }
         Add(Value, c_Gachapons[i]);
     }
 }
 private void Parse(CSVLoader csvLoader)
 {
     reward1IsPoints = new bool[csvLoader.Rows];
     reward2IsPoints = new bool[csvLoader.Rows];
     reward3IsPoints = new bool[csvLoader.Rows];
     reward1Counts   = new int[csvLoader.Rows];
     reward2Counts   = new int[csvLoader.Rows];
     reward3Counts   = new int[csvLoader.Rows];
     for (int i = 0; i < csvLoader.Rows; i++)
     {
         csvLoader.ReadValue(0, i, string.Empty, out string Value);
         csvLoader.ReadValue(1, i, string.Empty, out string Value2);
         csvLoader.ReadValue(2, i, string.Empty, out string Value3);
         csvLoader.ReadValue(3, i, string.Empty, out string Value4);
         csvLoader.ReadValue(4, i, string.Empty, out string Value5);
         csvLoader.ReadValue(5, i, string.Empty, out string Value6);
         csvLoader.ReadValue(6, i, string.Empty, out string Value7);
         Value.Trim();
         Value.ToLower();
         Value2.Trim();
         Value2.ToLower();
         Value3.Trim();
         Value3.ToLower();
         Value4.Trim();
         Value4.ToLower();
         Value5.Trim();
         Value5.ToLower();
         Value6.Trim();
         Value6.ToLower();
         Value7.Trim();
         Value7.ToLower();
         reward1IsPoints[i] = ((Convert.ToInt32(Value2) == 1) ? true : false);
         reward2IsPoints[i] = ((Convert.ToInt32(Value3) == 1) ? true : false);
         reward3IsPoints[i] = ((Convert.ToInt32(Value4) == 1) ? true : false);
         reward1Counts[i]   = Convert.ToInt32(Value5);
         reward2Counts[i]   = Convert.ToInt32(Value6);
         reward3Counts[i]   = Convert.ToInt32(Value7);
     }
 }
Ejemplo n.º 12
0
    private void ParseWeapon(CSVLoader csvLoader)
    {
        for (int i = 0; i < csvLoader.Rows; i++)
        {
            csvLoader.ReadValue(0, i, string.Empty, out string Value);
            csvLoader.ReadValue(1, i, string.Empty, out string Value2);
            csvLoader.ReadValue(2, i, string.Empty, out string Value3);
            csvLoader.ReadValue(3, i, string.Empty, out string Value4);
            csvLoader.ReadValue(4, i, string.Empty, out string Value5);
            csvLoader.ReadValue(5, i, string.Empty, out string Value6);
            csvLoader.ReadValue(6, i, string.Empty, out string Value7);
            csvLoader.ReadValue(7, i, string.Empty, out string Value8);
            csvLoader.ReadValue(8, i, def: true, out bool Value9);
            csvLoader.ReadValue(9, i, string.Empty, out string Value10);
            csvLoader.ReadValue(10, i, string.Empty, out string Value11);
            csvLoader.ReadValue(11, i, string.Empty, out string Value12);
            csvLoader.ReadValue(12, i, string.Empty, out string Value13);
            csvLoader.ReadValue(13, i, string.Empty, out string Value14);
            csvLoader.ReadValue(14, i, def: false, out bool Value15);
            csvLoader.ReadValue(15, i, string.Empty, out string Value16);
            csvLoader.ReadValue(16, i, -1, out int Value17);
            csvLoader.ReadValue(17, i, string.Empty, out string Value18);
            csvLoader.ReadValue(18, i, def: false, out bool Value19);
            csvLoader.ReadValue(19, i, string.Empty, out string Value20);
            csvLoader.ReadValue(20, i, string.Empty, out string Value21);
            csvLoader.ReadValue(21, i, string.Empty, out string Value22);
            csvLoader.ReadValue(22, i, string.Empty, out string Value23);
            csvLoader.ReadValue(23, i, def: false, out bool Value24);
            csvLoader.ReadValue(24, i, 100, out int Value25);
            Value8 = Value8.Trim();
            Value8 = Value8.ToLower();
            Value.Trim();
            Value.ToLower();
            Value2.Trim();
            Value3.Trim();
            Value4.Trim();
            Value5.Trim();
            Value5.ToLower();
            Value6.Trim();
            Value6.ToLower();
            Value7.Trim();
            Value7.ToLower();
            Value10.Trim();
            Value11.Trim();
            Value12.Trim();
            Value13.Trim();
            Value14.Trim();
            Value20.Trim();
            Value21.Trim();
            Value22.Trim();
            Value23.Trim();
            Value18 = Value18.ToLower();
            int     num     = TItem.String2Type(Value5);
            int     ck      = TItem.String2Kind(num, Value6);
            int     num2    = TWeapon.String2WeaponCategory(Value8);
            int     upCat   = TItem.String2UpgradeCategory(Value18);
            TWeapon tWeapon = new TWeapon(Value, Value2, Value12, FindPrefab(Value10), FindPrefab(Value11), FindIcon(Value3), FindIcon(Value4), num, ck, num2, Value9, TItem.String2Slot(Value7), Value13, BuffManager.Instance.Get(Value14), Value15, Value16, Value17, upCat, Value19, Convert.ToInt32(Value20), Value21, Value22, Value23, Value24, Value25);
            Add(Value, tWeapon);
            if (tWeapon.CurPrefab() != null)
            {
                WeaponFunction component = tWeapon.CurPrefab().GetComponent <WeaponFunction>();
                Gun            gun       = tWeapon.CurPrefab().GetComponent <Gun>();

                if (null == component)
                {
                    Debug.LogError(Value + " weapon does not have WeaponFunction");
                }
                else
                {
                    if (!wpnBy2Slot.ContainsKey((int)component.weaponBy))
                    {
                        wpnBy2Slot.Add((int)component.weaponBy, (int)tWeapon.slot);
                    }
                    if (!wpnBy2Category.ContainsKey((int)component.weaponBy))
                    {
                        wpnBy2Category.Add((int)component.weaponBy, num2);
                    }
                }
            }
        }
    }