Ejemplo n.º 1
0
 public bool canPutItems(EquipItem[] items)
 {
     bool[,] flagArray = (bool[, ]) this.flags.Clone();
     EquipItem[] equipItemArray = items;
     for (int i = 0; i < (int)equipItemArray.Length; i++)
     {
         EquipItem equipItem = equipItemArray[i];
         if (equipItem != null)
         {
             for (int j = 0; j < this.ynum; j++)
             {
                 for (int k = 0; k < this.xnum; k++)
                 {
                     if (!flagArray[k, j] && this.canPutItem(equipItem, k, j, flagArray) && this.tryPutItem(equipItem, k, j, flagArray))
                     {
                         continue;
                     }
                 }
             }
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 2
0
        public EquipItem getItemByCodeType(string codeType)
        {
            EquipItem equipItem = null;

            if ((equipItem = (EquipItem)this.cache[codeType]) == null)
            {
                lock (this.cache)
                {
                    if ((equipItem = (EquipItem)this.cache[codeType]) == null)
                    {
                        equipItem = this.getItemFromDb(EquipItem.getItemCode(codeType), (ushort)EquipItem.getItemType(codeType));
                        if (equipItem == null)
                        {
                            equipItem = EquipItem.UnknownItem;
                        }
                        this.cache[codeType]       = equipItem;
                        this.cache[equipItem.Name] = equipItem;
                    }
                }
            }
            return(equipItem);
        }
Ejemplo n.º 3
0
        public EquipItem getItemByCodeType(string codeType)
        {
            EquipItem itemFromDb = null;
            EquipItem item       = (EquipItem)this.cache[codeType];

            itemFromDb = item;
            if (item == null)
            {
                lock (this.cache)
                {
                    EquipItem equipItem = (EquipItem)this.cache[codeType];
                    itemFromDb = equipItem;
                    if (equipItem == null)
                    {
                        itemFromDb                  = this.getItemFromDb(EquipItem.getItemCode(codeType), EquipItem.getItemType(codeType)) ?? EquipItem.UnknownItem;
                        this.cache[codeType]        = itemFromDb;
                        this.cache[itemFromDb.Name] = itemFromDb;
                    }
                }
            }
            return(itemFromDb);
        }
Ejemplo n.º 4
0
        public bool canPutItem(DrawingUnit unit)
        {
            EquipItem item = unit.Item;
            int       x    = unit.X;
            int       y    = unit.Y;

            if (x < 0 && x >= 12 && this.units[x] != null)
            {
                return(false);
            }
            ushort itemSlot = EquipEditor.xItem[(int)(item.Type * 512 + item.Code)].ItemSlot;

            switch (this.index)
            {
            case 0:
                if (itemSlot == 0)
                {
                    return(true);
                }
                break;

            case 1:
                if (itemSlot == 0 || itemSlot == 1)
                {
                    return(true);
                }
                break;

            case 2:
                if (itemSlot == 2)
                {
                    return(true);
                }
                break;

            case 3:
                if (itemSlot == 3)
                {
                    return(true);
                }
                break;

            case 4:
                if (itemSlot == 4)
                {
                    return(true);
                }
                break;

            case 5:
                if (itemSlot == 5)
                {
                    return(true);
                }
                break;

            case 6:
                if (itemSlot == 6)
                {
                    return(true);
                }
                break;

            case 7:
                if (itemSlot == 7)
                {
                    return(true);
                }
                break;

            case 8:
                if (itemSlot == 8)
                {
                    return(true);
                }
                break;

            case 9:
                if (itemSlot == 9)
                {
                    return(true);
                }
                break;

            case 10:
                if (itemSlot == 10 || itemSlot == 11)
                {
                    return(true);
                }
                break;

            case 11:
                if (itemSlot != 10)
                {
                    if (itemSlot != 11)
                    {
                        break;
                    }
                }
                return(true);
            }
            return(false);
        }
Ejemplo n.º 5
0
        public static string GetZY(EquipItem item)
        {
            string str  = "";
            string str1 = "Increase mana after kill/8 | Zen after kill+40%";
            string str2 = "Increase life after kill/8 | Defense Success Rate+10%";
            string str3 = "Speed + 7 | Reflect damage 5%";
            string str4 = "Increase damage +2% | Damage decrease 4%";
            string str5 = "Increase damage + level/20 | Increase MP 4%";
            string str6 = "Excellent damage rate + 10% | Increase HP +4%";

            switch (item.Type)
            {
            case 12:
            {
                if ((item.Code < 3 || item.Code > 6) && item.Code != 42)
                {
                    if ((item.Code < 36 || item.Code > 40) && item.Code != 43)
                    {
                        break;
                    }
                    str1 = "Ignore";
                    str2 = "Restore damage";
                    str3 = "Restore life";
                    str4 = "Restore mana";
                    str5 = "Recovery";
                    str6 = "Recovery";
                    break;
                }
                else
                {
                    str1 = "Add HP";
                    str2 = "Add MP";
                    str3 = "Ignore";
                    str4 = "Skill values";
                    str5 = "Speed";
                    str6 = "Recovery";
                    break;
                }
            }

            case 13:
            {
                ushort code = item.Code;
                if (code == 30)
                {
                    str1 = "Add HP";
                    str2 = "Add MP";
                    str3 = "Ignore";
                    str4 = "Add VIP";
                    break;
                }
                else if (code == 37)
                {
                    str1 = "Black Wolf";
                    str2 = "Green Wolf";
                    str3 = "Golden Wolf";
                    break;
                }
                else
                {
                    break;
                }
            }
            }
            str = string.Concat(str, (item.ZY1 ? string.Concat("\r\n\t", str1) : ""));
            str = string.Concat(str, (item.ZY2 ? string.Concat("\r\n\t", str2) : ""));
            str = string.Concat(str, (item.ZY3 ? string.Concat("\r\n\t", str3) : ""));
            str = string.Concat(str, (item.ZY4 ? string.Concat("\r\n\t", str4) : ""));
            str = string.Concat(str, (item.ZY5 ? string.Concat("\r\n\t", str5) : ""));
            str = string.Concat(str, (item.ZY6 ? string.Concat("\r\n\t", str6) : ""));
            if (str != "")
            {
                return(str);
            }
            return(Utils.GetBoolenStr(false));
        }
Ejemplo n.º 6
0
 public DrawingUnit(EquipItem item, int x, int y)
 {
     this.item = item;
     this.x    = x;
     this.y    = y;
 }
Ejemplo n.º 7
0
        // Token: 0x06000212 RID: 530 RVA: 0x0002599C File Offset: 0x00023B9C
        public void SetUIbyCob(EquipItem item)
        {
            this.gbXQ.Enabled       = Utils.GetQX(item);
            this.chkEquipXY.Enabled = (item.Type >= 0 && item.Type <= 11);
            this.cbSetVal.Enabled   = this.chkEquipXY.Enabled;
            this.chk380.Enabled     = Utils.Get380(item);
            this.chk380.Checked     = this.chk380.Enabled;
            this.chkEquipJN.Enabled = Utils.GetJN(item);
            if (item.Type >= 0 && item.Type <= 5)
            {
                this.setZY(1);
                if (item.IsFZ)
                {
                    Utils.GetPlusType(this.cboPlusType, 3);
                }
                else
                {
                    Utils.GetPlusType(this.cboPlusType, 1);
                }
            }
            else if (item.Type >= 6 && item.Type <= 11)
            {
                this.setZY(2);
                Utils.GetPlusType(this.cboPlusType, 2);
            }
            else
            {
                Utils.GetPlusType(this.cboPlusType, 0);
            }
            this.Init_EquipEditor();
            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;

            switch (item.Type)
            {
            case 12:
                this.cbInlay6b.Items.Clear();
                if (itemKindA == 8)
                {
                    if (itemKindB == 0)
                    {
                        this.cbInlay1b.Items.Clear();
                        this.cbInlay1b.Items.Add(new ComboBoxItem("无属性", "0"));
                        this.cbInlay2b.Items.Clear();
                        this.cbInlay2b.Items.Add(new ComboBoxItem("无属性", "0"));
                        this.cbInlay3b.Items.Clear();
                        this.cbInlay3b.Items.Add(new ComboBoxItem("无属性", "0"));
                        this.cbInlay4b.Items.Clear();
                        this.cbInlay4b.Items.Add(new ComboBoxItem("无属性", "0"));
                        this.cbInlay5b.Items.Clear();
                        this.cbInlay5b.Items.Add(new ComboBoxItem("无属性", "0"));
                    }
                    else if (itemKindB == 43)
                    {
                        this.cbInlay1b.Items.Clear();
                        this.cbInlay1b.Items.Add(new ComboBoxItem("未开孔", "255"));
                        this.cbInlay1b.Items.Add(new ComboBoxItem("愤怒的元素之魂", "254"));
                        this.cbInlay1b.Items.Add(new ComboBoxItem("愤怒的元素之魂(镶嵌)", "0"));
                        this.cbInlay2b.Items.Clear();
                        this.cbInlay2b.Items.Add(new ComboBoxItem("未开孔", "255"));
                        this.cbInlay2b.Items.Add(new ComboBoxItem("庇护的元素之魂", "254"));
                        this.cbInlay2b.Items.Add(new ComboBoxItem("庇护的元素之魂(镶嵌)", "1"));
                        this.cbInlay3b.Items.Clear();
                        this.cbInlay3b.Items.Add(new ComboBoxItem("未开孔", "255"));
                        this.cbInlay3b.Items.Add(new ComboBoxItem("高贵的元素之魂", "254"));
                        this.cbInlay3b.Items.Add(new ComboBoxItem("高贵的元素之魂(镶嵌)", "2"));
                        this.cbInlay4b.Items.Clear();
                        this.cbInlay4b.Items.Add(new ComboBoxItem("未开孔", "255"));
                        this.cbInlay4b.Items.Add(new ComboBoxItem("神圣的元素之魂", "254"));
                        this.cbInlay4b.Items.Add(new ComboBoxItem("神圣的元素之魂(镶嵌)", "3"));
                        this.cbInlay5b.Items.Clear();
                        this.cbInlay5b.Items.Add(new ComboBoxItem("未开孔", "255"));
                        this.cbInlay5b.Items.Add(new ComboBoxItem("狂喜的元素之魂", "254"));
                        this.cbInlay5b.Items.Add(new ComboBoxItem("狂喜的元素之魂(镶嵌)", "4"));
                    }
                    else if (itemKindB == 44)
                    {
                        this.cbInlay1b.Items.Clear();
                        this.cbInlay1b.Items.Add(new ComboBoxItem("无属性", "255"));
                        this.cbInlay1b.Items.Add(new ComboBoxItem("1阶属性 +1", "17"));
                        this.cbInlay1b.Items.Add(new ComboBoxItem("1阶属性 +2", "33"));
                        this.cbInlay1b.Items.Add(new ComboBoxItem("1阶属性 +3", "49"));
                        this.cbInlay1b.Items.Add(new ComboBoxItem("1阶属性 +4", "65"));
                        this.cbInlay1b.Items.Add(new ComboBoxItem("1阶属性 +5", "81"));
                        this.cbInlay1b.Items.Add(new ComboBoxItem("1阶属性 +6", "97"));
                        this.cbInlay1b.Items.Add(new ComboBoxItem("1阶属性 +7", "113"));
                        this.cbInlay1b.Items.Add(new ComboBoxItem("1阶属性 +8", "129"));
                        this.cbInlay1b.Items.Add(new ComboBoxItem("1阶属性 +9", "145"));
                        this.cbInlay1b.Items.Add(new ComboBoxItem("1阶属性 +10", "161"));
                        this.cbInlay2b.Items.Clear();
                        this.cbInlay2b.Items.Add(new ComboBoxItem("无属性", "255"));
                        this.cbInlay2b.Items.Add(new ComboBoxItem("2阶属性 +1", "17"));
                        this.cbInlay2b.Items.Add(new ComboBoxItem("2阶属性 +2", "33"));
                        this.cbInlay2b.Items.Add(new ComboBoxItem("2阶属性 +3", "49"));
                        this.cbInlay2b.Items.Add(new ComboBoxItem("2阶属性 +4", "65"));
                        this.cbInlay2b.Items.Add(new ComboBoxItem("2阶属性 +5", "81"));
                        this.cbInlay2b.Items.Add(new ComboBoxItem("2阶属性 +6", "97"));
                        this.cbInlay2b.Items.Add(new ComboBoxItem("2阶属性 +7", "113"));
                        this.cbInlay2b.Items.Add(new ComboBoxItem("2阶属性 +8", "129"));
                        this.cbInlay2b.Items.Add(new ComboBoxItem("2阶属性 +9", "145"));
                        this.cbInlay2b.Items.Add(new ComboBoxItem("2阶属性 +10", "161"));
                        this.cbInlay3b.Items.Clear();
                        this.cbInlay3b.Items.Add(new ComboBoxItem("无属性", "255"));
                        this.cbInlay3b.Items.Add(new ComboBoxItem("3阶属性 +1", "17"));
                        this.cbInlay3b.Items.Add(new ComboBoxItem("3阶属性 +2", "33"));
                        this.cbInlay3b.Items.Add(new ComboBoxItem("3阶属性 +3", "49"));
                        this.cbInlay3b.Items.Add(new ComboBoxItem("3阶属性 +4", "65"));
                        this.cbInlay3b.Items.Add(new ComboBoxItem("3阶属性 +5", "81"));
                        this.cbInlay3b.Items.Add(new ComboBoxItem("3阶属性 +6", "97"));
                        this.cbInlay3b.Items.Add(new ComboBoxItem("3阶属性 +7", "113"));
                        this.cbInlay3b.Items.Add(new ComboBoxItem("3阶属性 +8", "129"));
                        this.cbInlay3b.Items.Add(new ComboBoxItem("3阶属性 +9", "145"));
                        this.cbInlay3b.Items.Add(new ComboBoxItem("3阶属性 +10", "161"));
                        this.cbInlay4b.Items.Clear();
                        this.cbInlay4b.Items.Add(new ComboBoxItem("无属性", "255"));
                        this.cbInlay4b.Items.Add(new ComboBoxItem("4阶属性 +1", "17"));
                        this.cbInlay4b.Items.Add(new ComboBoxItem("4阶属性 +2", "33"));
                        this.cbInlay4b.Items.Add(new ComboBoxItem("4阶属性 +3", "49"));
                        this.cbInlay4b.Items.Add(new ComboBoxItem("4阶属性 +4", "65"));
                        this.cbInlay4b.Items.Add(new ComboBoxItem("4阶属性 +5", "81"));
                        this.cbInlay4b.Items.Add(new ComboBoxItem("4阶属性 +6", "97"));
                        this.cbInlay4b.Items.Add(new ComboBoxItem("4阶属性 +7", "113"));
                        this.cbInlay4b.Items.Add(new ComboBoxItem("4阶属性 +8", "129"));
                        this.cbInlay4b.Items.Add(new ComboBoxItem("4阶属性 +9", "145"));
                        this.cbInlay4b.Items.Add(new ComboBoxItem("4阶属性 +10", "161"));
                        this.cbInlay5b.Items.Clear();
                        this.cbInlay5b.Items.Add(new ComboBoxItem("无属性", "255"));
                        this.cbInlay5b.Items.Add(new ComboBoxItem("5阶属性 +1", "17"));
                        this.cbInlay5b.Items.Add(new ComboBoxItem("5阶属性 +2", "33"));
                        this.cbInlay5b.Items.Add(new ComboBoxItem("5阶属性 +3", "49"));
                        this.cbInlay5b.Items.Add(new ComboBoxItem("5阶属性 +4", "65"));
                        this.cbInlay5b.Items.Add(new ComboBoxItem("5阶属性 +5", "81"));
                        this.cbInlay5b.Items.Add(new ComboBoxItem("5阶属性 +6", "97"));
                        this.cbInlay5b.Items.Add(new ComboBoxItem("5阶属性 +7", "113"));
                        this.cbInlay5b.Items.Add(new ComboBoxItem("5阶属性 +8", "129"));
                        this.cbInlay5b.Items.Add(new ComboBoxItem("5阶属性 +9", "145"));
                        this.cbInlay5b.Items.Add(new ComboBoxItem("5阶属性 +10", "161"));
                    }
                    this.cbInlay1b.SelectedIndex = 0;
                    this.cbInlay2b.SelectedIndex = 0;
                    this.cbInlay3b.SelectedIndex = 0;
                    this.cbInlay4b.SelectedIndex = 0;
                    this.cbInlay5b.SelectedIndex = 0;
                    for (int i = 0; i < Utils.YSS.Length; i++)
                    {
                        this.cbInlay6b.Items.Add(new ComboBoxItem(Utils.YSS[i], i.ToString()));
                    }
                }
                else
                {
                    for (int j = 0; j < Utils.YGS.Length; j++)
                    {
                        this.cbInlay6b.Items.Add(new ComboBoxItem(Utils.YGS[j], j.ToString()));
                    }
                }
                this.cbInlay6b.SelectedIndex = 0;
                if (itemCategory == 1)
                {
                    if (itemKindB == 23)
                    {
                        this.setZY(0);
                        this.chkEquipXY.Enabled = true;
                    }
                    else
                    {
                        if (itemKindB != 24)
                        {
                            if (itemKindB != 27)
                            {
                                if (itemKindB != 25 && itemKindB != 28)
                                {
                                    if (itemKindB != 60)
                                    {
                                        this.setZY(0);
                                        this.chkEquipXY.Enabled = false;
                                        break;
                                    }
                                }
                                this.setZY(4);
                                this.chkEquipXY.Enabled = true;
                                break;
                            }
                        }
                        this.setZY(3);
                        this.chkEquipXY.Enabled = true;
                    }
                }
                else
                {
                    this.setZY(0);
                    this.chkEquipXY.Enabled = false;
                }
                break;

            case 13:
                if (itemCategory == 1)
                {
                    if (itemKindB == 26)
                    {
                        this.setZY(5);
                        this.chkEquipXY.Enabled = true;
                        this.cbSetVal.Enabled   = false;
                    }
                    else
                    {
                        if (itemKindB != 29)
                        {
                            if (itemKindB != 30)
                            {
                                if (itemKindB == 31)
                                {
                                    this.setZY(2);
                                    this.cbSetVal.Enabled = true;
                                    break;
                                }
                                this.setZY(0);
                                this.cbSetVal.Enabled = false;
                                break;
                            }
                        }
                        this.setZY(1);
                        this.cbSetVal.Enabled = true;
                    }
                }
                else if (item.Code == 37 && itemKindB == 46)
                {
                    this.setZY(6);
                    this.chkEquipJN.Enabled = true;
                }
                else
                {
                    this.setZY(0);
                    this.cbSetVal.Enabled = false;
                }
                break;

            case 14:
            case 15:
                this.setZY(0);
                break;
            }
            this.chkEquipZY1.Enabled = (this.chkEquipZY1.Text != "无");
            this.chkEquipZY2.Enabled = (this.chkEquipZY2.Text != "无");
            this.chkEquipZY3.Enabled = (this.chkEquipZY3.Text != "无");
            this.chkEquipZY4.Enabled = (this.chkEquipZY4.Text != "无");
            this.chkEquipZY5.Enabled = (this.chkEquipZY5.Text != "无");
            this.chkEquipZY6.Enabled = (this.chkEquipZY6.Text != "无");
        }
Ejemplo n.º 8
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)));
        }
Ejemplo n.º 9
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;
         }
     }
 }
Ejemplo n.º 10
0
 // Token: 0x0600020A RID: 522 RVA: 0x000038FE File Offset: 0x00001AFE
 public EquipProperty(EquipItem item)
 {
     this.InitializeComponent();
     this.item = item;
     this.updateUI(item);
 }
Ejemplo n.º 11
0
        public static EquipItem createItem(ushort code, ushort type)
        {
            string itemCodeType = EquipItem.getItemCodeType(code, type);

            return(new EquipItem(EquipImageCache.Instance.getItemByCodeType(itemCodeType)));
        }
Ejemplo n.º 12
0
 static EquipItem()
 {
     EquipItem.unknownItem = EquipItem.createUnknownItem();
 }
Ejemplo n.º 13
0
 public void assign(DrawingUnit unit)
 {
     this.x    = unit.X;
     this.y    = unit.Y;
     this.item = unit.Item;
 }
Ejemplo n.º 14
0
 public static EquipItem createItem(byte[] codes)
 {
     return(EquipItem.createItem(codes, 0, 16));
 }
Ejemplo n.º 15
0
        public bool putItems()
        {
            bool flag = true;

            this.editor.updateData(this.curUnit.Item);
            EquipItem equipItem = new EquipItem();
            string    text      = "7,8,9,10,11";
            string    b         = "0";
            ushort    code      = this.curUnit.Item.Code;

            if (code <= 32)
            {
                if (code <= 20)
                {
                    if (code != 15 && code != 20)
                    {
                        goto IL_BC;
                    }
                }
                else if (code != 23 && code != 32)
                {
                    goto IL_BC;
                }
            }
            else
            {
                if (code > 48)
                {
                    switch (code)
                    {
                    case 59:
                    case 60:
                    case 61:
                        break;

                    default:
                        switch (code)
                        {
                        case 71:
                            goto IL_AE;

                        case 72:
                            break;

                        default:
                            goto IL_BC;
                        }
                        break;
                    }
                    b = "10";
                    goto IL_BC;
                }
                if (code != 37)
                {
                    switch (code)
                    {
                    case 47:
                    case 48:
                        break;

                    default:
                        goto IL_BC;
                    }
                }
            }
IL_AE:
            b = "7";
IL_BC:
            foreach (string text2 in text.Split(new char[]
            {
                ','
            }))
            {
                if (!(text2 == b) && EquipEditor.xItem[(int)((ushort)Convert.ToByte(text2) * 512 + this.curUnit.Item.Code)] != null)
                {
                    equipItem.assign(EquipItem.createItem(this.curUnit.Item.Code, (ushort)Convert.ToByte(text2)));
                    equipItem.Code = this.curUnit.Item.Code;
                    equipItem.Type = (ushort)Convert.ToByte(text2);
                    this.editor.updateData(equipItem);
                    flag = (flag && this.putItem(equipItem, true, false));
                }
            }
            return(flag);
        }
Ejemplo n.º 16
0
        public static string GetZY(EquipItem item)
        {
            string text = "";
            string str  = "+魔法值/8|金钱+40%";
            string str2 = "+生命值/8|防+10%";
            string str3 = "+速度+7|反伤";
            string str4 = "+2%攻击|减伤";
            string str5 = "等级/20攻击|魔+4%";
            string str6 = "卓越一击|生+4%";

            switch (item.Type)
            {
            case 12:
                if ((item.Code >= 3 && item.Code <= 6) || item.Code == 42)
                {
                    str  = "加生";
                    str2 = "加魔";
                    str3 = "无视";
                    str4 = "技能最大值";
                    str5 = "加速";
                    str6 = "追/回";
                }
                else if ((item.Code >= 36 && item.Code <= 40) || item.Code == 43)
                {
                    str  = "无视";
                    str2 = "还原攻击";
                    str3 = "恢复生命";
                    str4 = "恢复魔法";
                    str5 = "追/回";
                    str6 = "追/回";
                }
                break;

            case 13:
            {
                ushort code = item.Code;
                if (code != 30)
                {
                    if (code == 37)
                    {
                        str  = "黑狼";
                        str2 = "青狼";
                        str3 = "金狼";
                    }
                }
                else
                {
                    str  = "加生";
                    str2 = "加魔";
                    str3 = "无视";
                    str4 = "加声望";
                }
                break;
            }
            }
            text += (item.ZY1 ? ("\r\n\t" + str) : "");
            text += (item.ZY2 ? ("\r\n\t" + str2) : "");
            text += (item.ZY3 ? ("\r\n\t" + str3) : "");
            text += (item.ZY4 ? ("\r\n\t" + str4) : "");
            text += (item.ZY5 ? ("\r\n\t" + str5) : "");
            text += (item.ZY6 ? ("\r\n\t" + str6) : "");
            if (!(text == ""))
            {
                return(text);
            }
            return(Utils.GetBoolenStr(false));
        }
Ejemplo n.º 17
0
        private void drawUnit(Graphics g, DrawingUnit unit)
        {
            int       x    = unit.X;
            int       y    = unit.Y;
            EquipItem item = unit.Item;

            g.DrawImage(item.Img, x * 26, y * 26, (int)(item.Width * 26), (int)(item.Height * 26));
            if (item.Level > 0)
            {
                g.DrawString(string.Format("+{0}", item.Level), new Font("Arial", 8f), Brushes.White, (float)(x * 26), (float)(y * 26));
            }
            else if (item.IsNoDurability && item.Durability > 1)
            {
                g.DrawString(Convert.ToString(item.Durability), new Font("Arial", 6f), Brushes.White, (float)(x * 26), (float)(y * 26));
            }
            if (item.SN < 0)
            {
                g.DrawRectangle(Pens.White, x * 26, y * 26, (int)(item.Width * 26), (int)(item.Height * 26));
                return;
            }
            if (item.XQ1 > 0 && (int)item.XQ1 < EquipEditor.xSocket.Length && item.XQ2 > 0 && (int)item.XQ2 < EquipEditor.xSocket.Length && item.XQ3 > 0 && (int)item.XQ3 < EquipEditor.xSocket.Length && item.XQ4 > 0 && (int)item.XQ4 < EquipEditor.xSocket.Length && item.XQ5 > 0 && (int)item.XQ5 < EquipEditor.xSocket.Length && item.YG > 0 && (int)item.YG < Utils.YGS.Length - 1 && (item.ZY1 || item.ZY2 || item.ZY3 || item.ZY4 || item.ZY5 || item.ZY6))
            {
                g.DrawRectangle(Pens.Fuchsia, x * 26, y * 26, (int)(item.Width * 26), (int)(item.Height * 26));
                return;
            }
            if (((item.XQ1 > 0 && (int)item.XQ1 < EquipEditor.xSocket.Length) || (item.XQ2 > 0 && (int)item.XQ2 < EquipEditor.xSocket.Length) || (item.XQ3 > 0 && (int)item.XQ3 < EquipEditor.xSocket.Length) || (item.XQ4 > 0 && (int)item.XQ4 < EquipEditor.xSocket.Length) || (item.XQ5 > 0 && (int)item.XQ5 < EquipEditor.xSocket.Length) || (item.YG > 0 && (int)item.YG < Utils.YGS.Length - 1)) && (item.ZY1 || item.ZY2 || item.ZY3 || item.ZY4 || item.ZY5 || item.ZY6))
            {
                g.DrawRectangle(Pens.Violet, x * 26, y * 26, (int)(item.Width * 26), (int)(item.Height * 26));
                return;
            }
            if ((item.XQ1 > 0 && (int)item.XQ1 < EquipEditor.xSocket.Length) || (item.XQ2 > 0 && (int)item.XQ2 < EquipEditor.xSocket.Length) || (item.XQ3 > 0 && (int)item.XQ3 < EquipEditor.xSocket.Length) || (item.XQ4 > 0 && (int)item.XQ4 < EquipEditor.xSocket.Length) || (item.XQ5 > 0 && (int)item.XQ5 < EquipEditor.xSocket.Length) || (item.YG > 0 && (int)item.YG < Utils.YGS.Length - 1))
            {
                g.DrawRectangle(Pens.Pink, x * 26, y * 26, (int)(item.Width * 26), (int)(item.Height * 26));
                return;
            }
            if (item.PlusLevel > 0 && item.SetVal > 0 && item.ZY1 && item.ZY2 && item.ZY3 && item.ZY4 && item.ZY5 && item.ZY6)
            {
                g.DrawRectangle(Pens.Aqua, x * 26, y * 26, (int)(item.Width * 26), (int)(item.Height * 26));
                return;
            }
            if ((item.SetVal > 0 && item.ZY1 && item.ZY2 && item.ZY3 && item.ZY4 && item.ZY5 && item.ZY6) || (item.PlusLevel > 0 && item.ZY1 && item.ZY2 && item.ZY3 && item.ZY4 && item.ZY5 && item.ZY6))
            {
                g.DrawRectangle(Pens.Turquoise, x * 26, y * 26, (int)(item.Width * 26), (int)(item.Height * 26));
                return;
            }
            if (item.ZY1 && item.ZY2 && item.ZY3 && item.ZY4 && item.ZY5 && item.ZY6)
            {
                g.DrawRectangle(Pens.LawnGreen, x * 26, y * 26, (int)(item.Width * 26), (int)(item.Height * 26));
                return;
            }
            if (item.PlusLevel > 0 && item.SetVal > 0 && (item.ZY1 || item.ZY2 || item.ZY3 || item.ZY4 || item.ZY5 || item.ZY6))
            {
                g.DrawRectangle(Pens.Gold, x * 26, y * 26, (int)(item.Width * 26), (int)(item.Height * 26));
                return;
            }
            if ((item.PlusLevel > 0 && (item.ZY1 || item.ZY2 || item.ZY3 || item.ZY4 || item.ZY5 || item.ZY6)) || (item.SetVal > 0 && (item.ZY1 || item.ZY2 || item.ZY3 || item.ZY4 || item.ZY5 || item.ZY6)))
            {
                g.DrawRectangle(Pens.Yellow, x * 26, y * 26, (int)(item.Width * 26), (int)(item.Height * 26));
                return;
            }
            if (item.ZY1 || item.ZY2 || item.ZY3 || item.ZY4 || item.ZY5 || item.ZY6)
            {
                g.DrawRectangle(Pens.YellowGreen, x * 26, y * 26, (int)(item.Width * 26), (int)(item.Height * 26));
                return;
            }
            if (item.PlusLevel > 0)
            {
                g.DrawRectangle(Pens.SkyBlue, x * 26, y * 26, (int)(item.Width * 26), (int)(item.Height * 26));
                return;
            }
            if (item.SetVal > 0)
            {
                g.DrawRectangle(Pens.Khaki, x * 26, y * 26, (int)(item.Width * 26), (int)(item.Height * 26));
            }
        }
Ejemplo n.º 18
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);
        }
Ejemplo n.º 19
0
        public bool canPutItem(DrawingUnit unit)
        {
            EquipItem item = unit.Item;
            int       x    = unit.X;
            int       y    = unit.Y;

            if (x < 0 && x >= 12 && this.units[x] != null)
            {
                return(false);
            }
            ushort itemSlot = EquipEditor.xItem[item.Type * 512 + item.Code].ItemSlot;

            switch (this.index)
            {
            case 0:
            {
                if (itemSlot != 0)
                {
                    break;
                }
                return(true);
            }

            case 1:
            {
                if (itemSlot != 0 && itemSlot != 1)
                {
                    break;
                }
                return(true);
            }

            case 2:
            {
                if (itemSlot != 2)
                {
                    break;
                }
                return(true);
            }

            case 3:
            {
                if (itemSlot != 3)
                {
                    break;
                }
                return(true);
            }

            case 4:
            {
                if (itemSlot != 4)
                {
                    break;
                }
                return(true);
            }

            case 5:
            {
                if (itemSlot != 5)
                {
                    break;
                }
                return(true);
            }

            case 6:
            {
                if (itemSlot != 6)
                {
                    break;
                }
                return(true);
            }

            case 7:
            {
                if (itemSlot != 7)
                {
                    break;
                }
                return(true);
            }

            case 8:
            {
                if (itemSlot != 8)
                {
                    break;
                }
                return(true);
            }

            case 9:
            {
                if (itemSlot != 9)
                {
                    break;
                }
                return(true);
            }

            case 10:
            {
                if (itemSlot != 10 && itemSlot != 11)
                {
                    break;
                }
                return(true);
            }

            case 11:
            {
                if (itemSlot != 10 && itemSlot != 11)
                {
                    break;
                }
                return(true);
            }
            }
            return(false);
        }
Ejemplo n.º 20
0
        private void drawUnit(Graphics g, DrawingUnit unit)
        {
            int       x    = unit.X;
            int       y    = unit.Y;
            EquipItem item = unit.Item;
            int       num  = Math.Max(this.positions[x].Width - item.Width * 26 >> 1, 0);
            int       num1 = Math.Max(this.positions[x].Height - item.Height * 26 >> 1, 0);
            int       num2 = Math.Min(item.Width * 26, this.positions[x].Width);
            int       num3 = Math.Min(item.Height * 26, this.positions[x].Height);

            g.DrawImage(item.Img, this.positions[x].X + num, this.positions[x].Y + num1, num2, num3);
            if (item.Level > 0)
            {
                g.DrawString(string.Format("+{0}", item.Level), new System.Drawing.Font("Arial", 8f), Brushes.White, (float)(this.positions[x].X + num), (float)(this.positions[x].Y + num1));
            }
            else if (item.IsNoDurability && item.Durability > 1)
            {
                g.DrawString(Convert.ToString(item.Durability), new System.Drawing.Font("Arial", 6f), Brushes.White, (float)(this.positions[x].X + num), (float)(this.positions[x].Y + num1));
            }
            if (item.SN < 0)
            {
                g.DrawRectangle(Pens.White, this.positions[x].X + num, this.positions[x].Y + num1, num2, num3);
                return;
            }
            if (item.XQ1 > 0 && item.XQ1 < (int)EquipEditor.xSocket.Length && item.XQ2 > 0 && item.XQ2 < (int)EquipEditor.xSocket.Length && item.XQ3 > 0 && item.XQ3 < (int)EquipEditor.xSocket.Length && item.XQ4 > 0 && item.XQ4 < (int)EquipEditor.xSocket.Length && item.XQ5 > 0 && item.XQ5 < (int)EquipEditor.xSocket.Length && item.YG > 0 && item.YG < (int)Utils.YGS.Length - 1 && (item.ZY1 || item.ZY2 || item.ZY3 || item.ZY4 || item.ZY5 || item.ZY6))
            {
                g.DrawRectangle(Pens.Fuchsia, this.positions[x].X + num, this.positions[x].Y + num1, num2, num3);
                return;
            }
            if ((item.XQ1 > 0 && item.XQ1 < (int)EquipEditor.xSocket.Length || item.XQ2 > 0 && item.XQ2 < (int)EquipEditor.xSocket.Length || item.XQ3 > 0 && item.XQ3 < (int)EquipEditor.xSocket.Length || item.XQ4 > 0 && item.XQ4 < (int)EquipEditor.xSocket.Length || item.XQ5 > 0 && item.XQ5 < (int)EquipEditor.xSocket.Length || item.YG > 0 && item.YG < (int)Utils.YGS.Length - 1) && (item.ZY1 || item.ZY2 || item.ZY3 || item.ZY4 || item.ZY5 || item.ZY6))
            {
                g.DrawRectangle(Pens.Violet, this.positions[x].X + num, this.positions[x].Y + num1, num2, num3);
                return;
            }
            if (item.XQ1 > 0 && item.XQ1 < (int)EquipEditor.xSocket.Length || item.XQ2 > 0 && item.XQ2 < (int)EquipEditor.xSocket.Length || item.XQ3 > 0 && item.XQ3 < (int)EquipEditor.xSocket.Length || item.XQ4 > 0 && item.XQ4 < (int)EquipEditor.xSocket.Length || item.XQ5 > 0 && item.XQ5 < (int)EquipEditor.xSocket.Length || item.YG > 0 && item.YG < (int)Utils.YGS.Length - 1)
            {
                g.DrawRectangle(Pens.Pink, this.positions[x].X + num, this.positions[x].Y + num1, num2, num3);
                return;
            }
            if (item.PlusLevel > 0 && item.SetVal > 0 && item.ZY1 && item.ZY2 && item.ZY3 && item.ZY4 && item.ZY5 && item.ZY6)
            {
                g.DrawRectangle(Pens.Aqua, this.positions[x].X + num, this.positions[x].Y + num1, num2, num3);
                return;
            }
            if (item.SetVal > 0 && item.ZY1 && item.ZY2 && item.ZY3 && item.ZY4 && item.ZY5 && item.ZY6 || item.PlusLevel > 0 && item.ZY1 && item.ZY2 && item.ZY3 && item.ZY4 && item.ZY5 && item.ZY6)
            {
                g.DrawRectangle(Pens.Turquoise, this.positions[x].X + num, this.positions[x].Y + num1, num2, num3);
                return;
            }
            if (item.ZY1 && item.ZY2 && item.ZY3 && item.ZY4 && item.ZY5 && item.ZY6)
            {
                g.DrawRectangle(Pens.LawnGreen, this.positions[x].X + num, this.positions[x].Y + num1, num2, num3);
                return;
            }
            if (item.PlusLevel > 0 && item.SetVal > 0 && (item.ZY1 || item.ZY2 || item.ZY3 || item.ZY4 || item.ZY5 || item.ZY6))
            {
                g.DrawRectangle(Pens.Gold, this.positions[x].X + num, this.positions[x].Y + num1, num2, num3);
                return;
            }
            if (item.PlusLevel > 0 && (item.ZY1 || item.ZY2 || item.ZY3 || item.ZY4 || item.ZY5 || item.ZY6) || item.SetVal > 0 && (item.ZY1 || item.ZY2 || item.ZY3 || item.ZY4 || item.ZY5 || item.ZY6))
            {
                g.DrawRectangle(Pens.Yellow, this.positions[x].X + num, this.positions[x].Y + num1, num2, num3);
                return;
            }
            if (item.ZY1 || item.ZY2 || item.ZY3 || item.ZY4 || item.ZY5 || item.ZY6)
            {
                g.DrawRectangle(Pens.YellowGreen, this.positions[x].X + num, this.positions[x].Y + num1, num2, num3);
                return;
            }
            if (item.PlusLevel > 0)
            {
                g.DrawRectangle(Pens.SkyBlue, this.positions[x].X + num, this.positions[x].Y + num1, num2, num3);
                return;
            }
            if (item.SetVal > 0)
            {
                g.DrawRectangle(Pens.Khaki, this.positions[x].X + num, this.positions[x].Y + num1, num2, num3);
            }
        }
Ejemplo n.º 21
0
 public DrawingUnit(EquipItem item)
 {
     this.item = item;
 }