Example #1
0
        public Job( Context context, byte value, string name, IList<byte> bytes, Job defaults )
        {
            Value = value;
            Name = name;
            int equipEnd = context == Context.US_PSP ? 13 : 12;

            SkillSet = context == Context.US_PSP ? SkillSet.PSPSkills[bytes[0]] : SkillSet.PSXSkills[bytes[0]];
            InnateA = AllAbilities.DummyAbilities[PatcherLib.Utilities.Utilities.BytesToUShort( bytes[1], bytes[2] )];
            InnateB = AllAbilities.DummyAbilities[PatcherLib.Utilities.Utilities.BytesToUShort( bytes[3], bytes[4] )];
            InnateC = AllAbilities.DummyAbilities[PatcherLib.Utilities.Utilities.BytesToUShort( bytes[5], bytes[6] )];
            InnateD = AllAbilities.DummyAbilities[PatcherLib.Utilities.Utilities.BytesToUShort( bytes[7], bytes[8] )];
            Equipment = new Equipment( bytes.Sub( 9, equipEnd ), defaults == null ? null : defaults.Equipment );
            HPConstant = bytes[equipEnd + 1];
            HPMultiplier = bytes[equipEnd + 2];
            MPConstant = bytes[equipEnd + 3];
            MPMultiplier = bytes[equipEnd + 4];
            SpeedConstant = bytes[equipEnd + 5];
            SpeedMultiplier = bytes[equipEnd + 6];
            PAConstant = bytes[equipEnd + 7];
            PAMultiplier = bytes[equipEnd + 8];
            MAConstant = bytes[equipEnd + 9];
            MAMultiplier = bytes[equipEnd + 10];
            Move = bytes[equipEnd + 11];
            Jump = bytes[equipEnd + 12];
            CEvade = bytes[equipEnd + 13];
            PermanentStatus = new Statuses( bytes.Sub( equipEnd + 14, equipEnd + 18 ), defaults == null ? null : defaults.PermanentStatus );
            StatusImmunity = new Statuses( bytes.Sub( equipEnd + 19, equipEnd + 23 ), defaults == null ? null : defaults.StatusImmunity );
            StartingStatus = new Statuses( bytes.Sub( equipEnd + 24, equipEnd + 28 ), defaults == null ? null : defaults.StartingStatus );
            AbsorbElement = new Elements( bytes[equipEnd + 29] );
            CancelElement = new Elements( bytes[equipEnd + 30] );
            HalfElement = new Elements( bytes[equipEnd + 31] );
            WeakElement = new Elements( bytes[equipEnd + 32] );

            MPortrait = bytes[equipEnd + 33];
            MPalette = bytes[equipEnd + 34];
            MGraphic = bytes[equipEnd + 35];

            if( defaults != null )
            {
                Default = defaults;
                AbsorbElement.Default = defaults.AbsorbElement;
                CancelElement.Default = defaults.CancelElement;
                HalfElement.Default = defaults.HalfElement;
                WeakElement.Default = defaults.WeakElement;
            }
        }
Example #2
0
        public static void Copy( Equipment source, Equipment destination )
        {
            destination.Unused = source.Unused;
            destination.Knife = source.Knife;
            destination.NinjaBlade = source.NinjaBlade;
            destination.Sword = source.Sword;
            destination.KnightsSword = source.KnightsSword;
            destination.Katana = source.Katana;
            destination.Axe = source.Axe;
            destination.Rod = source.Rod;

            destination.Staff = source.Staff;
            destination.Flail = source.Flail;
            destination.Gun = source.Gun;
            destination.Crossbow = source.Crossbow;
            destination.Bow = source.Bow;
            destination.Instrument = source.Instrument;
            destination.Book = source.Book;
            destination.Polearm = source.Polearm;

            destination.Pole = source.Pole;
            destination.Bag = source.Bag;
            destination.Cloth = source.Cloth;
            destination.Shield = source.Shield;
            destination.Helmet = source.Helmet;
            destination.Hat = source.Hat;
            destination.HairAdornment = source.HairAdornment;
            destination.Armor = source.Armor;

            destination.Clothing = source.Clothing;
            destination.Robe = source.Robe;
            destination.Shoes = source.Shoes;
            destination.Armguard = source.Armguard;
            destination.Ring = source.Ring;
            destination.Armlet = source.Armlet;
            destination.Cloak = source.Cloak;
            destination.Perfume = source.Perfume;

            destination.Unknown1 = source.Unknown1;
            destination.Unknown2 = source.Unknown2;
            destination.Unknown3 = source.Unknown3;
            destination.FellSword = source.FellSword;
            destination.LipRouge = source.LipRouge;
            destination.Unknown6 = source.Unknown6;
            destination.Unknown7 = source.Unknown7;
            destination.Unknown8 = source.Unknown8;
        }
Example #3
0
 public void CopyTo( Equipment destination )
 {
     Copy( this, destination );
 }
Example #4
0
 public Equipment( IList<byte> bytes, Equipment defaults )
 {
     Default = defaults;
     PatcherLib.Utilities.Utilities.CopyByteToBooleans( bytes[0], ref Unused, ref Knife, ref NinjaBlade, ref Sword, ref KnightsSword, ref Katana, ref Axe, ref Rod );
     PatcherLib.Utilities.Utilities.CopyByteToBooleans( bytes[1], ref Staff, ref Flail, ref Gun, ref Crossbow, ref Bow, ref Instrument, ref Book, ref Polearm );
     PatcherLib.Utilities.Utilities.CopyByteToBooleans( bytes[2], ref Pole, ref Bag, ref Cloth, ref Shield, ref Helmet, ref Hat, ref HairAdornment, ref Armor );
     PatcherLib.Utilities.Utilities.CopyByteToBooleans( bytes[3], ref Clothing, ref Robe, ref Shoes, ref Armguard, ref Ring, ref Armlet, ref Cloak, ref Perfume );
     if( bytes.Count == 5 )
     {
         PatcherLib.Utilities.Utilities.CopyByteToBooleans( bytes[4], ref Unknown1, ref Unknown2, ref Unknown3, ref FellSword, ref LipRouge, ref Unknown6, ref Unknown7, ref Unknown8 );
     }
 }