Exemplo n.º 1
0
 private void setEquipProperty(DrawingUnit unit)
 {
     if (unit != null)
     {
         this.Cursor = Cursors.WaitCursor;
         EquipProperty equipProperty = new EquipProperty(unit.Item);
         equipProperty.ShowDialog();
         equipProperty.Dispose();
         this.Cursor = Cursors.Default;
     }
 }
Exemplo n.º 2
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;
         }
     }
 }