Beispiel #1
0
        public bool putItems()
        {
            bool flag = true;

            this.editor.updateData(this.curUnit.Item);
            EquipItem item = new EquipItem();
            string    str  = "7,8,9,10,11";
            string    str2 = "0";

            switch (this.curUnit.Item.Code)
            {
            case 0x17:
            case 0x20:
            case 15:
            case 20:
            case 0x2f:
            case 0x30:
            case 0x25:
            case 0x47:
                str2 = "7";
                break;

            case 0x3b:
            case 60:
            case 0x3d:
            case 0x48:
                str2 = "10";
                break;
            }
            foreach (string str3 in str.Split(new char[] { ',' }))
            {
                if (!(str3 == str2) && (EquipEditor.xItem[(Convert.ToByte(str3) * 0x200) + this.curUnit.Item.Code] != null))
                {
                    item.assign(EquipItem.createItem(this.curUnit.Item.Code, Convert.ToByte(str3)));
                    item.Code = this.curUnit.Item.Code;
                    item.Type = Convert.ToByte(str3);
                    this.editor.updateData(item);
                    flag = flag && this.putItem(item, true, false);
                }
            }
            return(flag);
        }
Beispiel #2
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);
        }