Exemplo n.º 1
0
        public static string GetEquipInfo(EquipItem item)
        {
            if (item == null)
            {
                return("物品信息读取失败!");
            }
            string text = item.Name;
            string str  = "";
            string str2 = "";

            if (item.Is380)
            {
                str = "\r\n☆380属性:" + Utils.GetBoolenStr(true);
            }
            if (item.IsSet)
            {
                text += "〖套装〗";
            }
            if (!Utils.GetQX(item) && item.PlusType > 0 && item.PlusLevel > 0)
            {
                text += "〖强化属性〗";
                str2  = "\r\n★强化属性:" + Utils.GetPlusStr(item);
            }
            string text2 = string.Format("物品名称:{0}\r\n物品代码:{1}\r\n物品等级:+{2}\r\n物品持久:{3}{4}\r\n幸运:{5}\r\n技能:{6}\r\n", new object[]
            {
                text,
                item.ToString(),
                item.Level,
                item.Durability,
                str + str2,
                Utils.GetBoolenStr(item.XY),
                Utils.GetBoolenStr(item.JN)
            });

            text2 = text2 + "※卓越属性:" + Utils.GetZY(item) + "\r\n";
            text2 = text2 + "追加属性: 追" + item.Ext * 4;
            if (Utils.GetQX(item))
            {
                byte itemKindA    = EquipEditor.xItem[(int)(item.Type * 512 + item.Code)].ItemKindA;
                byte itemKindB    = EquipEditor.xItem[(int)(item.Type * 512 + item.Code)].ItemKindB;
                byte itemCategory = EquipEditor.xItem[(int)(item.Type * 512 + item.Code)].ItemCategory;
                if (itemKindA == 8)
                {
                    if (itemKindB == 0)
                    {
                        if (item.XQ1 == 255)
                        {
                            text2 += "\r\n※元素属性1:无属性";
                        }
                        else if (item.XQ1 == 0)
                        {
                            text2 += "\r\n※元素属性1:无属性";
                        }
                        if (item.XQ2 == 255)
                        {
                            text2 += "\r\n※元素属性2:无属性";
                        }
                        else if (item.XQ2 == 0)
                        {
                            text2 += "\r\n※元素属性2:无属性";
                        }
                        if (item.XQ3 == 255)
                        {
                            text2 += "\r\n※元素属性3:无属性";
                        }
                        else if (item.XQ3 == 0)
                        {
                            text2 += "\r\n※元素属性3:无属性";
                        }
                        if (item.XQ4 == 255)
                        {
                            text2 += "\r\n※元素属性4:无属性";
                        }
                        else if (item.XQ4 == 0)
                        {
                            text2 += "\r\n※元素属性4:无属性";
                        }
                        if (item.XQ5 == 255)
                        {
                            text2 += "\r\n※元素属性5:无属性";
                        }
                        else if (item.XQ5 == 0)
                        {
                            text2 += "\r\n※元素属性5:无属性";
                        }
                    }
                    else if (itemKindB == 43)
                    {
                        if (item.XQ1 == 255)
                        {
                            text2 += "\r\n※元素属性1:未开孔";
                        }
                        else if (item.XQ1 == 254)
                        {
                            text2 += "\r\n※元素属性1:愤怒的元素之魂";
                        }
                        else
                        {
                            text2 += "\r\n※元素属性1:愤怒的元素之魂(镶嵌)";
                        }
                        if (item.XQ2 == 255)
                        {
                            text2 += "\r\n※元素属性2:未开孔";
                        }
                        else if (item.XQ2 == 254)
                        {
                            text2 += "\r\n※元素属性2:庇护的元素之魂";
                        }
                        else
                        {
                            text2 += "\r\n※元素属性2:庇护的元素之魂(镶嵌)";
                        }
                        if (item.XQ3 == 255)
                        {
                            text2 += "\r\n※元素属性3:未开孔";
                        }
                        else if (item.XQ3 == 254)
                        {
                            text2 += "\r\n※元素属性3:高贵的元素之魂";
                        }
                        else
                        {
                            text2 += "\r\n※元素属性3:高贵的元素之魂(镶嵌)";
                        }
                        if (item.XQ4 == 255)
                        {
                            text2 += "\r\n※元素属性4:未开孔";
                        }
                        else if (item.XQ4 == 254)
                        {
                            text2 += "\r\n※元素属性4:神圣的元素之魂";
                        }
                        else
                        {
                            text2 += "\r\n※元素属性4:神圣的元素之魂(镶嵌)";
                        }
                        if (item.XQ5 == 255)
                        {
                            text2 += "\r\n※元素属性5:未开孔";
                        }
                        else if (item.XQ5 == 254)
                        {
                            text2 += "\r\n※元素属性5:狂喜的元素之魂";
                        }
                        else
                        {
                            text2 += "\r\n※元素属性5:狂喜的元素之魂(镶嵌)";
                        }
                    }
                    else if (itemKindB == 44)
                    {
                        if (item.XQ1 == 255)
                        {
                            text2 += "\r\n※元素属性1:无属性";
                        }
                        else if (item.XQ1 == 17)
                        {
                            text2 += "\r\n※元素属性1:1阶属性 +1";
                        }
                        else if (item.XQ1 == 33)
                        {
                            text2 += "\r\n※元素属性1:1阶属性 +2";
                        }
                        else if (item.XQ1 == 49)
                        {
                            text2 += "\r\n※元素属性1:1阶属性 +3";
                        }
                        else if (item.XQ1 == 65)
                        {
                            text2 += "\r\n※元素属性1:1阶属性 +4";
                        }
                        else if (item.XQ1 == 81)
                        {
                            text2 += "\r\n※元素属性1:1阶属性 +5";
                        }
                        else if (item.XQ1 == 97)
                        {
                            text2 += "\r\n※元素属性1:1阶属性 +6";
                        }
                        else if (item.XQ1 == 113)
                        {
                            text2 += "\r\n※元素属性1:1阶属性 +7";
                        }
                        else if (item.XQ1 == 129)
                        {
                            text2 += "\r\n※元素属性1:1阶属性 +8";
                        }
                        else if (item.XQ1 == 145)
                        {
                            text2 += "\r\n※元素属性1:1阶属性 +9";
                        }
                        else
                        {
                            text2 += "\r\n※元素属性1:1阶属性 +10";
                        }
                        if (item.XQ2 == 255)
                        {
                            text2 += "\r\n※元素属性2:无属性";
                        }
                        else if (item.XQ2 == 17)
                        {
                            text2 += "\r\n※元素属性2:2阶属性 +1";
                        }
                        else if (item.XQ2 == 33)
                        {
                            text2 += "\r\n※元素属性2:2阶属性 +2";
                        }
                        else if (item.XQ2 == 49)
                        {
                            text2 += "\r\n※元素属性2:2阶属性 +3";
                        }
                        else if (item.XQ2 == 65)
                        {
                            text2 += "\r\n※元素属性2:2阶属性 +4";
                        }
                        else if (item.XQ2 == 81)
                        {
                            text2 += "\r\n※元素属性2:2阶属性 +5";
                        }
                        else if (item.XQ2 == 97)
                        {
                            text2 += "\r\n※元素属性2:2阶属性 +6";
                        }
                        else if (item.XQ2 == 113)
                        {
                            text2 += "\r\n※元素属性2:2阶属性 +7";
                        }
                        else if (item.XQ2 == 129)
                        {
                            text2 += "\r\n※元素属性2:2阶属性 +8";
                        }
                        else if (item.XQ2 == 145)
                        {
                            text2 += "\r\n※元素属性2:2阶属性 +9";
                        }
                        else
                        {
                            text2 += "\r\n※元素属性2:2阶属性 +10";
                        }
                        if (item.XQ3 == 255)
                        {
                            text2 += "\r\n※元素属性3:无属性";
                        }
                        else if (item.XQ3 == 17)
                        {
                            text2 += "\r\n※元素属性3:3阶属性 +1";
                        }
                        else if (item.XQ3 == 33)
                        {
                            text2 += "\r\n※元素属性3:3阶属性 +2";
                        }
                        else if (item.XQ3 == 49)
                        {
                            text2 += "\r\n※元素属性3:3阶属性 +3";
                        }
                        else if (item.XQ3 == 65)
                        {
                            text2 += "\r\n※元素属性3:3阶属性 +4";
                        }
                        else if (item.XQ3 == 81)
                        {
                            text2 += "\r\n※元素属性3:3阶属性 +5";
                        }
                        else if (item.XQ3 == 97)
                        {
                            text2 += "\r\n※元素属性3:3阶属性 +6";
                        }
                        else if (item.XQ3 == 113)
                        {
                            text2 += "\r\n※元素属性3:3阶属性 +7";
                        }
                        else if (item.XQ3 == 129)
                        {
                            text2 += "\r\n※元素属性3:3阶属性 +8";
                        }
                        else if (item.XQ3 == 145)
                        {
                            text2 += "\r\n※元素属性3:3阶属性 +9";
                        }
                        else
                        {
                            text2 += "\r\n※元素属性3:3阶属性 +10";
                        }
                        if (item.XQ4 == 255)
                        {
                            text2 += "\r\n※元素属性4:无属性";
                        }
                        else if (item.XQ4 == 17)
                        {
                            text2 += "\r\n※元素属性4:4阶属性 +1";
                        }
                        else if (item.XQ4 == 33)
                        {
                            text2 += "\r\n※元素属性4:4阶属性 +2";
                        }
                        else if (item.XQ4 == 49)
                        {
                            text2 += "\r\n※元素属性4:4阶属性 +3";
                        }
                        else if (item.XQ4 == 65)
                        {
                            text2 += "\r\n※元素属性4:4阶属性 +4";
                        }
                        else if (item.XQ4 == 81)
                        {
                            text2 += "\r\n※元素属性4:4阶属性 +5";
                        }
                        else if (item.XQ4 == 97)
                        {
                            text2 += "\r\n※元素属性4:4阶属性 +6";
                        }
                        else if (item.XQ4 == 113)
                        {
                            text2 += "\r\n※元素属性4:4阶属性 +7";
                        }
                        else if (item.XQ4 == 129)
                        {
                            text2 += "\r\n※元素属性4:4阶属性 +8";
                        }
                        else if (item.XQ4 == 145)
                        {
                            text2 += "\r\n※元素属性4:4阶属性 +9";
                        }
                        else
                        {
                            text2 += "\r\n※元素属性4:4阶属性 +10";
                        }
                        if (item.XQ5 == 255)
                        {
                            text2 += "\r\n※元素属性5:无属性";
                        }
                        else if (item.XQ5 == 17)
                        {
                            text2 += "\r\n※元素属性5:5阶属性 +1";
                        }
                        else if (item.XQ5 == 33)
                        {
                            text2 += "\r\n※元素属性5:5阶属性 +2";
                        }
                        else if (item.XQ5 == 49)
                        {
                            text2 += "\r\n※元素属性5:5阶属性 +3";
                        }
                        else if (item.XQ5 == 65)
                        {
                            text2 += "\r\n※元素属性5:5阶属性 +4";
                        }
                        else if (item.XQ5 == 81)
                        {
                            text2 += "\r\n※元素属性5:5阶属性 +5";
                        }
                        else if (item.XQ5 == 97)
                        {
                            text2 += "\r\n※元素属性5:5阶属性 +6";
                        }
                        else if (item.XQ5 == 113)
                        {
                            text2 += "\r\n※元素属性5:5阶属性 +7";
                        }
                        else if (item.XQ5 == 129)
                        {
                            text2 += "\r\n※元素属性5:5阶属性 +8";
                        }
                        else if (item.XQ5 == 145)
                        {
                            text2 += "\r\n※元素属性5:5阶属性 +9";
                        }
                        else
                        {
                            text2 += "\r\n※元素属性5:5阶属性 +10";
                        }
                    }
                    if (item.YG >= 0 && (int)(item.YG - 17) < Utils.YSS.Length)
                    {
                        text2 = text2 + "\r\n※元素属性:" + Utils.YSS[(int)(item.YG - 17)];
                    }
                    else
                    {
                        text2 = text2 + "\r\n※元素属性:" + Utils.YSS[0];
                    }
                }
                else
                {
                    if (item.XQ1 == 255)
                    {
                        text2 += "\r\n※镶嵌属性1:未开孔";
                    }
                    else if (item.XQ1 == 254)
                    {
                        text2 += "\r\n※镶嵌属性1:无属性";
                    }
                    else
                    {
                        int    num   = (int)(item.XQ1 % 50);
                        int    num2  = ((int)item.XQ1 - num) / 50;
                        string text3 = text2;
                        text2 = string.Concat(new string[]
                        {
                            text3,
                            "\r\n※镶嵌属性1:",
                            frmMain.ByteToString(EquipEditor.xSocket[num].byte_0, 64),
                            " +",
                            EquipEditor.xSocket[num].uint_4[num2].ToString()
                        });
                    }
                    if (item.XQ2 == 255)
                    {
                        text2 += "\r\n※镶嵌属性2:未开孔";
                    }
                    else if (item.XQ2 == 254)
                    {
                        text2 += "\r\n※镶嵌属性2:无属性";
                    }
                    else
                    {
                        int    num3  = (int)(item.XQ2 % 50);
                        int    num4  = ((int)item.XQ2 - num3) / 50;
                        string text4 = text2;
                        text2 = string.Concat(new string[]
                        {
                            text4,
                            "\r\n※镶嵌属性2:",
                            frmMain.ByteToString(EquipEditor.xSocket[num3].byte_0, 64),
                            " +",
                            EquipEditor.xSocket[num3].uint_4[num4].ToString()
                        });
                    }
                    if (item.XQ3 == 255)
                    {
                        text2 += "\r\n※镶嵌属性3:未开孔";
                    }
                    else if (item.XQ3 == 254)
                    {
                        text2 += "\r\n※镶嵌属性3:无属性";
                    }
                    else
                    {
                        int    num5  = (int)(item.XQ3 % 50);
                        int    num6  = ((int)item.XQ3 - num5) / 50;
                        string text5 = text2;
                        text2 = string.Concat(new string[]
                        {
                            text5,
                            "\r\n※镶嵌属性3:",
                            frmMain.ByteToString(EquipEditor.xSocket[num5].byte_0, 64),
                            " +",
                            EquipEditor.xSocket[num5].uint_4[num6].ToString()
                        });
                    }
                    if (item.XQ4 == 255)
                    {
                        text2 += "\r\n※镶嵌属性4:未开孔";
                    }
                    else if (item.XQ4 == 254)
                    {
                        text2 += "\r\n※镶嵌属性4:无属性";
                    }
                    else
                    {
                        int    num7  = (int)(item.XQ4 % 50);
                        int    num8  = ((int)item.XQ4 - num7) / 50;
                        string text6 = text2;
                        text2 = string.Concat(new string[]
                        {
                            text6,
                            "\r\n※镶嵌属性4:",
                            frmMain.ByteToString(EquipEditor.xSocket[num7].byte_0, 64),
                            " +",
                            EquipEditor.xSocket[num7].uint_4[num8].ToString()
                        });
                    }
                    if (item.XQ5 == 255)
                    {
                        text2 += "\r\n※镶嵌属性5:未开孔";
                    }
                    else if (item.XQ5 == 254)
                    {
                        text2 += "\r\n※镶嵌属性5:无属性";
                    }
                    else
                    {
                        int    num9  = (int)(item.XQ5 % 50);
                        int    num10 = ((int)item.XQ5 - num9) / 50;
                        string text7 = text2;
                        text2 = string.Concat(new string[]
                        {
                            text7,
                            "\r\n※镶嵌属性5:",
                            frmMain.ByteToString(EquipEditor.xSocket[num9].byte_0, 64),
                            " +",
                            EquipEditor.xSocket[num9].uint_4[num10].ToString()
                        });
                    }
                    if (item.YG >= 0 && (int)item.YG < Utils.YGS.Length - 1)
                    {
                        text2 = text2 + "\r\n※荧光属性:" + Utils.YGS[(int)(item.YG + 1)];
                    }
                    else
                    {
                        text2 = text2 + "\r\n※荧光属性:" + Utils.YGS[0];
                    }
                }
            }
            return(text2 + string.Format("\r\n物品编号:{0} 【{1}】", item.SN, Utils.GetSNStr(item.SN)));
        }
Exemplo n.º 2
0
        public static string GetEquipInfo(EquipItem item)
        {
            if (item == null)
            {
                return("Error: Equipment could not be read.");
            }
            string name = item.Name;
            string str  = "";
            string str1 = "";

            if (item.Is380)
            {
                str = string.Concat("\r\n☆380 properties:", Utils.GetBoolenStr(true));
            }
            if (item.IsSet)
            {
                name = string.Concat(name, "〖Set〗");
            }
            if (!Utils.GetQX(item) && item.PlusType > 0 && item.PlusLevel > 0)
            {
                name = string.Concat(name, "〖Enhanced〗");
                str1 = string.Concat("\r\n★Enhanced:", Utils.GetPlusStr(item));
            }
            object[] objArray = new object[] { name, item.ToString(), item.Level, item.Durability, string.Concat(str, str1), Utils.GetBoolenStr(item.XY), Utils.GetBoolenStr(item.JN) };
            string   str2     = string.Format("Name:{0}\r\nItem code:{1}\r\nItem level:+{2}\r\nDurability:{3}{4}\r\nLuck:{5}\r\nSkill:{6}\r\n", objArray);

            str2 = string.Concat(str2, "※Excellent : ", Utils.GetZY(item), "\r\n");
            str2 = string.Concat(str2, "Options : ", item.Ext * 4);
            if (Utils.GetQX(item))
            {
                byte itemKindA    = EquipEditor.xItem[item.Type * 512 + item.Code].ItemKindA;
                byte itemKindB    = EquipEditor.xItem[item.Type * 512 + item.Code].ItemKindB;
                byte itemCategory = EquipEditor.xItem[item.Type * 512 + item.Code].ItemCategory;
                if (itemKindA != 8)
                {
                    if (item.XQ1 == 255)
                    {
                        str2 = string.Concat(str2, "\r\n※Socket 1:Empty");
                    }
                    else if (item.XQ1 != 254)
                    {
                        int      xQ1       = item.XQ1 % 50;
                        int      num       = (item.XQ1 - xQ1) / 50;
                        string   str3      = str2;
                        string[] strArrays = new string[] { str3, "\r\n※Socket 1:", frmMain.ByteToString(EquipEditor.xSocket[xQ1].捞抚, 64), " +", EquipEditor.xSocket[xQ1].饭骇1[num].ToString() };
                        str2 = string.Concat(strArrays);
                    }
                    else
                    {
                        str2 = string.Concat(str2, "\r\n※Socket 1:Empty");
                    }
                    if (item.XQ2 == 255)
                    {
                        str2 = string.Concat(str2, "\r\n※Socket 2:Empty");
                    }
                    else if (item.XQ2 != 254)
                    {
                        int      xQ2        = item.XQ2 % 50;
                        int      xQ21       = (item.XQ2 - xQ2) / 50;
                        string   str4       = str2;
                        string[] strArrays1 = new string[] { str4, "\r\n※Socket 2:", frmMain.ByteToString(EquipEditor.xSocket[xQ2].捞抚, 64), " +", EquipEditor.xSocket[xQ2].饭骇1[xQ21].ToString() };
                        str2 = string.Concat(strArrays1);
                    }
                    else
                    {
                        str2 = string.Concat(str2, "\r\n※Socket 2:Empty");
                    }
                    if (item.XQ3 == 255)
                    {
                        str2 = string.Concat(str2, "\r\n※Socket 3:Empty");
                    }
                    else if (item.XQ3 != 254)
                    {
                        int      xQ3        = item.XQ3 % 50;
                        int      xQ31       = (item.XQ3 - xQ3) / 50;
                        string   str5       = str2;
                        string[] strArrays2 = new string[] { str5, "\r\n※Socket 3:", frmMain.ByteToString(EquipEditor.xSocket[xQ3].捞抚, 64), " +", EquipEditor.xSocket[xQ3].饭骇1[xQ31].ToString() };
                        str2 = string.Concat(strArrays2);
                    }
                    else
                    {
                        str2 = string.Concat(str2, "\r\n※Socket 3:Empty");
                    }
                    if (item.XQ4 == 255)
                    {
                        str2 = string.Concat(str2, "\r\n※Socket 4:Empty");
                    }
                    else if (item.XQ4 != 254)
                    {
                        int      xQ4        = item.XQ4 % 50;
                        int      xQ41       = (item.XQ4 - xQ4) / 50;
                        string   str6       = str2;
                        string[] strArrays3 = new string[] { str6, "\r\n※Socket 4:", frmMain.ByteToString(EquipEditor.xSocket[xQ4].捞抚, 64), " +", EquipEditor.xSocket[xQ4].饭骇1[xQ41].ToString() };
                        str2 = string.Concat(strArrays3);
                    }
                    else
                    {
                        str2 = string.Concat(str2, "\r\n※Socket 4:Empty");
                    }
                    if (item.XQ5 == 255)
                    {
                        str2 = string.Concat(str2, "\r\n※Socket 5:Empty");
                    }
                    else if (item.XQ5 != 254)
                    {
                        int      xQ5        = item.XQ5 % 50;
                        int      xQ51       = (item.XQ5 - xQ5) / 50;
                        string   str7       = str2;
                        string[] strArrays4 = new string[] { str7, "\r\n※Socket 5:", frmMain.ByteToString(EquipEditor.xSocket[xQ5].捞抚, 64), " +", EquipEditor.xSocket[xQ5].饭骇1[xQ51].ToString() };
                        str2 = string.Concat(strArrays4);
                    }
                    else
                    {
                        str2 = string.Concat(str2, "\r\n※Socket 5:Empty");
                    }
                    str2 = (item.YG < 0 || item.YG >= (int)Utils.YGS.Length - 1 ? string.Concat(str2, "\r\n※Socket element : ", Utils.YGS[0]) : string.Concat(str2, "\r\n※Socket element : ", Utils.YGS[item.YG + 1]));
                }
                else
                {
                    if (itemKindB == 0)
                    {
                        if (item.XQ1 == 255)
                        {
                            str2 = string.Concat(str2, "\r\n※Element 1:Empty");
                        }
                        else if (item.XQ1 == 0)
                        {
                            str2 = string.Concat(str2, "\r\n※Element 1:Empty");
                        }
                        if (item.XQ2 == 255)
                        {
                            str2 = string.Concat(str2, "\r\n※Element 2:Empty");
                        }
                        else if (item.XQ2 == 0)
                        {
                            str2 = string.Concat(str2, "\r\n※Element 2:Empty");
                        }
                        if (item.XQ3 == 255)
                        {
                            str2 = string.Concat(str2, "\r\n※Element 3:Empty");
                        }
                        else if (item.XQ3 == 0)
                        {
                            str2 = string.Concat(str2, "\r\n※Element 3:Empty");
                        }
                        if (item.XQ4 == 255)
                        {
                            str2 = string.Concat(str2, "\r\n※Element 4:Empty");
                        }
                        else if (item.XQ4 == 0)
                        {
                            str2 = string.Concat(str2, "\r\n※Element 4:Empty");
                        }
                        if (item.XQ5 == 255)
                        {
                            str2 = string.Concat(str2, "\r\n※Element 5:Empty");
                        }
                        else if (item.XQ5 == 0)
                        {
                            str2 = string.Concat(str2, "\r\n※Element 5:Empty");
                        }
                    }
                    else if (itemKindB == 43)
                    {
                        if (item.XQ1 != 255)
                        {
                            str2 = (item.XQ1 != 254 ? string.Concat(str2, "\r\n※Element 1:Element (Fire)") : string.Concat(str2, "\r\n※Element 1:Element"));
                        }
                        else
                        {
                            str2 = string.Concat(str2, "\r\n※Element 1:No sockets");
                        }
                        if (item.XQ2 != 255)
                        {
                            str2 = (item.XQ2 != 254 ? string.Concat(str2, "\r\n※Element 2:Element (Water") : string.Concat(str2, "\r\n※Element 2:Element"));
                        }
                        else
                        {
                            str2 = string.Concat(str2, "\r\n※Element 2:No sockets");
                        }
                        if (item.XQ3 != 255)
                        {
                            str2 = (item.XQ3 != 254 ? string.Concat(str2, "\r\n※Element 3:Element (Earth)") : string.Concat(str2, "\r\n※Element 3:Element"));
                        }
                        else
                        {
                            str2 = string.Concat(str2, "\r\n※Element 3:No sockets");
                        }
                        if (item.XQ4 != 255)
                        {
                            str2 = (item.XQ4 != 254 ? string.Concat(str2, "\r\n※Element 4:Element (Air)") : string.Concat(str2, "\r\n※Element 4:Element"));
                        }
                        else
                        {
                            str2 = string.Concat(str2, "\r\n※Element 4:No sockets");
                        }
                        if (item.XQ5 != 255)
                        {
                            str2 = (item.XQ5 != 254 ? string.Concat(str2, "\r\n※Element 5:Element (Darkness)") : string.Concat(str2, "\r\n※Element 5:Element"));
                        }
                        else
                        {
                            str2 = string.Concat(str2, "\r\n※Element 5:No sockets");
                        }
                    }
                    else if (itemKindB == 44)
                    {
                        if (item.XQ1 == 255)
                        {
                            str2 = string.Concat(str2, "\r\n※Element1:None");
                        }
                        else if (item.XQ1 == 17)
                        {
                            str2 = string.Concat(str2, "\r\n※Element1:1st element +1");
                        }
                        else if (item.XQ1 == 33)
                        {
                            str2 = string.Concat(str2, "\r\n※Element1:1st element +2");
                        }
                        else if (item.XQ1 == 49)
                        {
                            str2 = string.Concat(str2, "\r\n※Element1:1st element +3");
                        }
                        else if (item.XQ1 == 65)
                        {
                            str2 = string.Concat(str2, "\r\n※Element1:1st element +4");
                        }
                        else if (item.XQ1 == 81)
                        {
                            str2 = string.Concat(str2, "\r\n※Element1:1st element +5");
                        }
                        else if (item.XQ1 == 97)
                        {
                            str2 = string.Concat(str2, "\r\n※Element1:1st element +6");
                        }
                        else if (item.XQ1 == 113)
                        {
                            str2 = string.Concat(str2, "\r\n※Element1:1st element +7");
                        }
                        else if (item.XQ1 != 129)
                        {
                            str2 = (item.XQ1 != 145 ? string.Concat(str2, "\r\n※Element1:1st element +10") : string.Concat(str2, "\r\n※Element1:1st element +9"));
                        }
                        else
                        {
                            str2 = string.Concat(str2, "\r\n※Element1:1st element +8");
                        }
                        if (item.XQ2 == 255)
                        {
                            str2 = string.Concat(str2, "\r\n※Element2:None");
                        }
                        else if (item.XQ2 == 17)
                        {
                            str2 = string.Concat(str2, "\r\n※Element2:2nd element +1");
                        }
                        else if (item.XQ2 == 33)
                        {
                            str2 = string.Concat(str2, "\r\n※Element2:2nd element +2");
                        }
                        else if (item.XQ2 == 49)
                        {
                            str2 = string.Concat(str2, "\r\n※Element2:2nd element +3");
                        }
                        else if (item.XQ2 == 65)
                        {
                            str2 = string.Concat(str2, "\r\n※Element2:2nd element +4");
                        }
                        else if (item.XQ2 == 81)
                        {
                            str2 = string.Concat(str2, "\r\n※Element2:2nd element +5");
                        }
                        else if (item.XQ2 == 97)
                        {
                            str2 = string.Concat(str2, "\r\n※Element2:2nd element +6");
                        }
                        else if (item.XQ2 == 113)
                        {
                            str2 = string.Concat(str2, "\r\n※Element2:2nd element +7");
                        }
                        else if (item.XQ2 != 129)
                        {
                            str2 = (item.XQ2 != 145 ? string.Concat(str2, "\r\n※Element2:2nd element +10") : string.Concat(str2, "\r\n※Element2:2nd element +9"));
                        }
                        else
                        {
                            str2 = string.Concat(str2, "\r\n※Element2:2nd element +8");
                        }
                        if (item.XQ3 == 255)
                        {
                            str2 = string.Concat(str2, "\r\n※Element3:None");
                        }
                        else if (item.XQ3 == 17)
                        {
                            str2 = string.Concat(str2, "\r\n※Element3:3rd element +1");
                        }
                        else if (item.XQ3 == 33)
                        {
                            str2 = string.Concat(str2, "\r\n※Element3:3rd element +2");
                        }
                        else if (item.XQ3 == 49)
                        {
                            str2 = string.Concat(str2, "\r\n※Element3:3rd element +3");
                        }
                        else if (item.XQ3 == 65)
                        {
                            str2 = string.Concat(str2, "\r\n※Element3:3rd element +4");
                        }
                        else if (item.XQ3 == 81)
                        {
                            str2 = string.Concat(str2, "\r\n※Element3:3rd element +5");
                        }
                        else if (item.XQ3 == 97)
                        {
                            str2 = string.Concat(str2, "\r\n※Element3:3rd element +6");
                        }
                        else if (item.XQ3 == 113)
                        {
                            str2 = string.Concat(str2, "\r\n※Element3:3rd element +7");
                        }
                        else if (item.XQ3 != 129)
                        {
                            str2 = (item.XQ3 != 145 ? string.Concat(str2, "\r\n※Element3:3rd element +10") : string.Concat(str2, "\r\n※Element3:3rd element +9"));
                        }
                        else
                        {
                            str2 = string.Concat(str2, "\r\n※Element3:3rd element +8");
                        }
                        if (item.XQ4 == 255)
                        {
                            str2 = string.Concat(str2, "\r\n※Element4:None");
                        }
                        else if (item.XQ4 == 17)
                        {
                            str2 = string.Concat(str2, "\r\n※Element4:4th element +1");
                        }
                        else if (item.XQ4 == 33)
                        {
                            str2 = string.Concat(str2, "\r\n※Element4:4th element +2");
                        }
                        else if (item.XQ4 == 49)
                        {
                            str2 = string.Concat(str2, "\r\n※Element4:4th element +3");
                        }
                        else if (item.XQ4 == 65)
                        {
                            str2 = string.Concat(str2, "\r\n※Element4:4th element +4");
                        }
                        else if (item.XQ4 == 81)
                        {
                            str2 = string.Concat(str2, "\r\n※Element4:4th element +5");
                        }
                        else if (item.XQ4 == 97)
                        {
                            str2 = string.Concat(str2, "\r\n※Element4:4th element +6");
                        }
                        else if (item.XQ4 == 113)
                        {
                            str2 = string.Concat(str2, "\r\n※Element4:4th element +7");
                        }
                        else if (item.XQ4 != 129)
                        {
                            str2 = (item.XQ4 != 145 ? string.Concat(str2, "\r\n※Element4:4th element +10") : string.Concat(str2, "\r\n※Element4:4th element +9"));
                        }
                        else
                        {
                            str2 = string.Concat(str2, "\r\n※Element4:4th element +8");
                        }
                        if (item.XQ5 == 255)
                        {
                            str2 = string.Concat(str2, "\r\n※Element5:None");
                        }
                        else if (item.XQ5 == 17)
                        {
                            str2 = string.Concat(str2, "\r\n※Element5:5th element +1");
                        }
                        else if (item.XQ5 == 33)
                        {
                            str2 = string.Concat(str2, "\r\n※Element5:5th element +2");
                        }
                        else if (item.XQ5 == 49)
                        {
                            str2 = string.Concat(str2, "\r\n※Element5:5th element +3");
                        }
                        else if (item.XQ5 == 65)
                        {
                            str2 = string.Concat(str2, "\r\n※Element5:5th element +4");
                        }
                        else if (item.XQ5 == 81)
                        {
                            str2 = string.Concat(str2, "\r\n※Element5:5th element +5");
                        }
                        else if (item.XQ5 == 97)
                        {
                            str2 = string.Concat(str2, "\r\n※Element5:5th element +6");
                        }
                        else if (item.XQ5 == 113)
                        {
                            str2 = string.Concat(str2, "\r\n※Element5:5th element +7");
                        }
                        else if (item.XQ5 != 129)
                        {
                            str2 = (item.XQ5 != 145 ? string.Concat(str2, "\r\n※Element5:5th element +10") : string.Concat(str2, "\r\n※Element5:5th element +9"));
                        }
                        else
                        {
                            str2 = string.Concat(str2, "\r\n※Element5:5th element +8");
                        }
                    }
                    str2 = (item.YG < 0 || item.YG - 17 >= (int)Utils.YSS.Length ? string.Concat(str2, "\r\n※Element:", Utils.YSS[0]) : string.Concat(str2, "\r\n※Element:", Utils.YSS[item.YG - 17]));
                }
            }
            str2 = string.Concat(str2, string.Format("", item.SN, Utils.GetSNStr(item.SN)));
            return(str2);
        }
Exemplo n.º 3
0
 // Token: 0x0600020F RID: 527 RVA: 0x00024494 File Offset: 0x00022694
 public void updateUI(EquipItem item)
 {
     this.SetUIbyCob(item);
     this.txtName.Text                = item.Name;
     this.txtEquipCodes.Text          = item.ToString();
     this.txtSN.Text                  = item.SN.ToString();
     this.cboEquipLevel.SelectedIndex = (int)item.Level;
     this.cboEquipExt.SelectedIndex   = item.Ext;
     if (item.PlusType < this.cboPlusType.Items.Count)
     {
         this.cboPlusType.SelectedIndex = item.PlusType;
     }
     if (item.PlusLevel < this.cboPlusLevel.Items.Count)
     {
         this.cboPlusLevel.SelectedIndex = item.PlusLevel;
     }
     this.chkEquipJN.Checked    = item.JN;
     this.chkEquipXY.Checked    = item.XY;
     this.chkEquipZY1.Checked   = item.ZY1;
     this.chkEquipZY2.Checked   = item.ZY2;
     this.chkEquipZY3.Checked   = item.ZY3;
     this.chkEquipZY4.Checked   = item.ZY4;
     this.chkEquipZY5.Checked   = item.ZY5;
     this.chkEquipZY6.Checked   = item.ZY6;
     this.cbSetVal.SelectedItem = string.Concat(item.SetVal);
     this.chk380.Checked        = item.Is380;
     this.txtDurability.Text    = Convert.ToString(item.Durability);
     if (this.gbXQ.Enabled)
     {
         this.cboPlusType.SelectedIndex  = 0;
         this.cboPlusLevel.SelectedIndex = 0;
         byte itemKindA    = EquipEditor.xItem[(int)(item.Type * 512 + item.Code)].ItemKindA;
         byte itemKindB    = EquipEditor.xItem[(int)(item.Type * 512 + item.Code)].ItemKindB;
         byte itemCategory = EquipEditor.xItem[(int)(item.Type * 512 + item.Code)].ItemCategory;
         if (itemKindA == 8)
         {
             if (itemKindB == 0)
             {
                 if (item.XQ1 == 255)
                 {
                     this.cbInlay1b.SelectedIndex = 0;
                 }
                 else if (item.XQ1 == 0)
                 {
                     this.cbInlay1b.SelectedIndex = 0;
                 }
                 if (item.XQ2 == 255)
                 {
                     this.cbInlay2b.SelectedIndex = 0;
                 }
                 else if (item.XQ2 == 0)
                 {
                     this.cbInlay2b.SelectedIndex = 0;
                 }
                 if (item.XQ3 == 255)
                 {
                     this.cbInlay3b.SelectedIndex = 0;
                 }
                 else if (item.XQ3 == 0)
                 {
                     this.cbInlay3b.SelectedIndex = 0;
                 }
                 if (item.XQ4 == 255)
                 {
                     this.cbInlay4b.SelectedIndex = 0;
                 }
                 else if (item.XQ4 == 0)
                 {
                     this.cbInlay4b.SelectedIndex = 0;
                 }
                 if (item.XQ5 == 255)
                 {
                     this.cbInlay5b.SelectedIndex = 0;
                 }
                 else if (item.XQ5 == 0)
                 {
                     this.cbInlay5b.SelectedIndex = 0;
                 }
             }
             else if (itemKindB == 43)
             {
                 if (item.XQ1 == 255)
                 {
                     this.cbInlay1b.SelectedIndex = 0;
                 }
                 else if (item.XQ1 == 254)
                 {
                     this.cbInlay1b.SelectedIndex = 1;
                 }
                 else
                 {
                     this.cbInlay1b.SelectedIndex = 2;
                 }
                 if (item.XQ2 == 255)
                 {
                     this.cbInlay2b.SelectedIndex = 0;
                 }
                 else if (item.XQ2 == 254)
                 {
                     this.cbInlay2b.SelectedIndex = 1;
                 }
                 else
                 {
                     this.cbInlay2b.SelectedIndex = 2;
                 }
                 if (item.XQ3 == 255)
                 {
                     this.cbInlay3b.SelectedIndex = 0;
                 }
                 else if (item.XQ3 == 254)
                 {
                     this.cbInlay3b.SelectedIndex = 1;
                 }
                 else
                 {
                     this.cbInlay3b.SelectedIndex = 2;
                 }
                 if (item.XQ4 == 255)
                 {
                     this.cbInlay4b.SelectedIndex = 0;
                 }
                 else if (item.XQ4 == 254)
                 {
                     this.cbInlay4b.SelectedIndex = 1;
                 }
                 else
                 {
                     this.cbInlay4b.SelectedIndex = 2;
                 }
                 if (item.XQ5 == 255)
                 {
                     this.cbInlay5b.SelectedIndex = 0;
                 }
                 else if (item.XQ5 == 254)
                 {
                     this.cbInlay5b.SelectedIndex = 1;
                 }
                 else
                 {
                     this.cbInlay5b.SelectedIndex = 2;
                 }
             }
             else if (itemKindB == 44)
             {
                 if (item.XQ1 == 255)
                 {
                     this.cbInlay1b.SelectedIndex = 0;
                 }
                 else if (item.XQ1 == 17)
                 {
                     this.cbInlay1b.SelectedIndex = 1;
                 }
                 else if (item.XQ1 == 33)
                 {
                     this.cbInlay1b.SelectedIndex = 2;
                 }
                 else if (item.XQ1 == 49)
                 {
                     this.cbInlay1b.SelectedIndex = 3;
                 }
                 else if (item.XQ1 == 65)
                 {
                     this.cbInlay1b.SelectedIndex = 4;
                 }
                 else if (item.XQ1 == 81)
                 {
                     this.cbInlay1b.SelectedIndex = 5;
                 }
                 else if (item.XQ1 == 97)
                 {
                     this.cbInlay1b.SelectedIndex = 6;
                 }
                 else if (item.XQ1 == 113)
                 {
                     this.cbInlay1b.SelectedIndex = 7;
                 }
                 else if (item.XQ1 == 129)
                 {
                     this.cbInlay1b.SelectedIndex = 8;
                 }
                 else if (item.XQ1 == 145)
                 {
                     this.cbInlay1b.SelectedIndex = 9;
                 }
                 else
                 {
                     this.cbInlay1b.SelectedIndex = 10;
                 }
                 if (item.XQ2 == 255)
                 {
                     this.cbInlay2b.SelectedIndex = 0;
                 }
                 else if (item.XQ2 == 17)
                 {
                     this.cbInlay2b.SelectedIndex = 1;
                 }
                 else if (item.XQ2 == 33)
                 {
                     this.cbInlay2b.SelectedIndex = 2;
                 }
                 else if (item.XQ2 == 49)
                 {
                     this.cbInlay2b.SelectedIndex = 3;
                 }
                 else if (item.XQ2 == 65)
                 {
                     this.cbInlay2b.SelectedIndex = 4;
                 }
                 else if (item.XQ2 == 81)
                 {
                     this.cbInlay2b.SelectedIndex = 5;
                 }
                 else if (item.XQ2 == 97)
                 {
                     this.cbInlay2b.SelectedIndex = 6;
                 }
                 else if (item.XQ2 == 113)
                 {
                     this.cbInlay2b.SelectedIndex = 7;
                 }
                 else if (item.XQ2 == 129)
                 {
                     this.cbInlay2b.SelectedIndex = 8;
                 }
                 else if (item.XQ2 == 145)
                 {
                     this.cbInlay2b.SelectedIndex = 9;
                 }
                 else
                 {
                     this.cbInlay2b.SelectedIndex = 10;
                 }
                 if (item.XQ3 == 255)
                 {
                     this.cbInlay3b.SelectedIndex = 0;
                 }
                 else if (item.XQ3 == 17)
                 {
                     this.cbInlay3b.SelectedIndex = 1;
                 }
                 else if (item.XQ3 == 33)
                 {
                     this.cbInlay3b.SelectedIndex = 2;
                 }
                 else if (item.XQ3 == 49)
                 {
                     this.cbInlay3b.SelectedIndex = 3;
                 }
                 else if (item.XQ3 == 65)
                 {
                     this.cbInlay3b.SelectedIndex = 4;
                 }
                 else if (item.XQ3 == 81)
                 {
                     this.cbInlay3b.SelectedIndex = 5;
                 }
                 else if (item.XQ3 == 97)
                 {
                     this.cbInlay3b.SelectedIndex = 6;
                 }
                 else if (item.XQ3 == 113)
                 {
                     this.cbInlay3b.SelectedIndex = 7;
                 }
                 else if (item.XQ3 == 129)
                 {
                     this.cbInlay3b.SelectedIndex = 8;
                 }
                 else if (item.XQ3 == 145)
                 {
                     this.cbInlay3b.SelectedIndex = 9;
                 }
                 else
                 {
                     this.cbInlay3b.SelectedIndex = 10;
                 }
                 if (item.XQ4 == 255)
                 {
                     this.cbInlay4b.SelectedIndex = 0;
                 }
                 else if (item.XQ4 == 17)
                 {
                     this.cbInlay4b.SelectedIndex = 1;
                 }
                 else if (item.XQ4 == 33)
                 {
                     this.cbInlay4b.SelectedIndex = 2;
                 }
                 else if (item.XQ4 == 49)
                 {
                     this.cbInlay4b.SelectedIndex = 3;
                 }
                 else if (item.XQ4 == 65)
                 {
                     this.cbInlay4b.SelectedIndex = 4;
                 }
                 else if (item.XQ4 == 81)
                 {
                     this.cbInlay4b.SelectedIndex = 5;
                 }
                 else if (item.XQ4 == 97)
                 {
                     this.cbInlay4b.SelectedIndex = 6;
                 }
                 else if (item.XQ4 == 113)
                 {
                     this.cbInlay4b.SelectedIndex = 7;
                 }
                 else if (item.XQ4 == 129)
                 {
                     this.cbInlay4b.SelectedIndex = 8;
                 }
                 else if (item.XQ4 == 145)
                 {
                     this.cbInlay4b.SelectedIndex = 9;
                 }
                 else
                 {
                     this.cbInlay4b.SelectedIndex = 10;
                 }
                 if (item.XQ5 == 255)
                 {
                     this.cbInlay5b.SelectedIndex = 0;
                 }
                 else if (item.XQ5 == 17)
                 {
                     this.cbInlay5b.SelectedIndex = 1;
                 }
                 else if (item.XQ5 == 33)
                 {
                     this.cbInlay5b.SelectedIndex = 2;
                 }
                 else if (item.XQ5 == 49)
                 {
                     this.cbInlay5b.SelectedIndex = 3;
                 }
                 else if (item.XQ5 == 65)
                 {
                     this.cbInlay5b.SelectedIndex = 4;
                 }
                 else if (item.XQ5 == 81)
                 {
                     this.cbInlay5b.SelectedIndex = 5;
                 }
                 else if (item.XQ5 == 97)
                 {
                     this.cbInlay5b.SelectedIndex = 6;
                 }
                 else if (item.XQ5 == 113)
                 {
                     this.cbInlay5b.SelectedIndex = 7;
                 }
                 else if (item.XQ5 == 129)
                 {
                     this.cbInlay5b.SelectedIndex = 8;
                 }
                 else if (item.XQ5 == 145)
                 {
                     this.cbInlay5b.SelectedIndex = 9;
                 }
                 else
                 {
                     this.cbInlay5b.SelectedIndex = 10;
                 }
             }
             Trace.WriteLine("item.YG : " + (int)(item.YG - 17));
             if (item.YG >= 0 && (int)(item.YG - 17) < Utils.YSS.Length)
             {
                 this.cbInlay6b.SelectedIndex = (int)(item.YG - 17);
                 return;
             }
             this.cbInlay6b.SelectedIndex = 0;
             return;
         }
         else
         {
             if (item.XQ1 == 255)
             {
                 this.cbInlay1b.SelectedIndex = 0;
             }
             else if (item.XQ1 == 254)
             {
                 this.cbInlay1b.SelectedIndex = 1;
             }
             else
             {
                 int    num    = (int)(item.XQ1 % 50);
                 int    num2   = ((int)item.XQ1 - num) / 50;
                 string lParam = frmMain.ByteToString(EquipEditor.xSocket[num].byte_0, 64) + " +" + EquipEditor.xSocket[num].uint_4[num2].ToString();
                 this.cbInlay1b.SelectedIndex = EquipProperty.SendMessageA(this.cbInlay1b.Handle, 332, IntPtr.Zero, lParam);
             }
             if (item.XQ2 == 255)
             {
                 this.cbInlay2b.SelectedIndex = 0;
             }
             else if (item.XQ2 == 254)
             {
                 this.cbInlay2b.SelectedIndex = 1;
             }
             else
             {
                 int    num3    = (int)(item.XQ2 % 50);
                 int    num4    = ((int)item.XQ2 - num3) / 50;
                 string lParam2 = frmMain.ByteToString(EquipEditor.xSocket[num3].byte_0, 64) + " +" + EquipEditor.xSocket[num3].uint_4[num4].ToString();
                 this.cbInlay2b.SelectedIndex = EquipProperty.SendMessageA(this.cbInlay2b.Handle, 332, IntPtr.Zero, lParam2);
             }
             if (item.XQ3 == 255)
             {
                 this.cbInlay3b.SelectedIndex = 0;
             }
             else if (item.XQ3 == 254)
             {
                 this.cbInlay3b.SelectedIndex = 1;
             }
             else
             {
                 int    num5    = (int)(item.XQ3 % 50);
                 int    num6    = ((int)item.XQ3 - num5) / 50;
                 string lParam3 = frmMain.ByteToString(EquipEditor.xSocket[num5].byte_0, 64) + " +" + EquipEditor.xSocket[num5].uint_4[num6].ToString();
                 this.cbInlay3b.SelectedIndex = EquipProperty.SendMessageA(this.cbInlay3b.Handle, 332, IntPtr.Zero, lParam3);
             }
             if (item.XQ4 == 255)
             {
                 this.cbInlay4b.SelectedIndex = 0;
             }
             else if (item.XQ4 == 254)
             {
                 this.cbInlay4b.SelectedIndex = 1;
             }
             else
             {
                 int    num7    = (int)(item.XQ4 % 50);
                 int    num8    = ((int)item.XQ4 - num7) / 50;
                 string lParam4 = frmMain.ByteToString(EquipEditor.xSocket[num7].byte_0, 64) + " +" + EquipEditor.xSocket[num7].uint_4[num8].ToString();
                 this.cbInlay4b.SelectedIndex = EquipProperty.SendMessageA(this.cbInlay4b.Handle, 332, IntPtr.Zero, lParam4);
             }
             if (item.XQ5 == 255)
             {
                 this.cbInlay5b.SelectedIndex = 0;
             }
             else if (item.XQ5 == 254)
             {
                 this.cbInlay5b.SelectedIndex = 1;
             }
             else
             {
                 int    num9    = (int)(item.XQ5 % 50);
                 int    num10   = ((int)item.XQ5 - num9) / 50;
                 string lParam5 = frmMain.ByteToString(EquipEditor.xSocket[num9].byte_0, 64) + " +" + EquipEditor.xSocket[num9].uint_4[num10].ToString();
                 this.cbInlay5b.SelectedIndex = EquipProperty.SendMessageA(this.cbInlay5b.Handle, 332, IntPtr.Zero, lParam5);
             }
             if (item.YG >= 0 && (int)item.YG < Utils.YGS.Length - 1)
             {
                 this.cbInlay6b.SelectedIndex = (int)(item.YG + 1);
                 return;
             }
             this.cbInlay6b.SelectedIndex = 0;
         }
     }
 }