예제 #1
0
            public void Read(BinaryReader br, int i)
            {
                Description = Memory.Strings.Read(Strings.FileID.KERNEL, id, i);
                br.BaseStream.Seek(2, SeekOrigin.Current);
                //0x0000  2 bytes Offset to devour description
                DMGorHEAL = br.ReadByte() == 0x1E ? true : false;
                //0x0002  1 byte Damage or heal HP and Status

                //0x1E - Cure
                //0x1F - Damage
                Quanity val = (Quanity)br.ReadByte();

                Amount = 0f;
                if ((val & Quanity._0625f) != 0)
                {
                    Amount += .0625f;
                }
                if ((val & Quanity._1250f) != 0)
                {
                    Amount += .1250f;
                }
                if ((val & Quanity._1f) != 0)
                {
                    Amount += 1f;
                }
                if ((val & Quanity._25f) != 0)
                {
                    Amount += .25f;
                }
                if ((val & Quanity._50f) != 0)
                {
                    Amount += .50f;
                }
                //0x0003  1 byte HP Heal / DMG Quantity Flag

                //0x00 - 0 %
                //0x01 - 6.25 %
                //0x02 - 12.50 %
                //0x04 - 25 %
                //0x08 - 50 %
                //0x10 - 100 %
                Statuses1 = (Battle_Only_Statuses)br.ReadUInt32();
                //0x0004  4 bytes status_1; //statuses 8-39
                Statuses0 = (Persistant_Statuses)br.ReadUInt16();
                //0x0008  2 bytes status_0; //statuses 0-7

                StatFlags = (StatFlags)br.ReadByte();
                //0x000A  1 byte Raised Stat Flag

                //0x00 - None
                //0x01 - STR
                //0x02 - VIT
                //0x04 - MAG
                //0x08 - SPR
                //0x10 - SPD
                HP = br.ReadByte();
                //0x000B  1 byte Raised Stat HP Quantity
            }
예제 #2
0
 //Сравнение по колличеству
 public int CompareTo(Item other) => Quanity.CompareTo(other.Quanity);