コード例 #1
0
ファイル: AllJobsEditor.cs プロジェクト: Glain/FFTPatcher
 public void UpdateView( AllJobs jobs )
 {
     if( FFTPatch.Context != ourContext )
     {
         ourContext = FFTPatch.Context;
         cbJob = null;
     }
     jobsListBox.SelectedIndexChanged -= jobsListBox_SelectedIndexChanged;
     jobsListBox.DataSource = jobs.Jobs;
     jobsListBox.SelectedIndexChanged += jobsListBox_SelectedIndexChanged;
     jobsListBox.SelectedIndex = 0;
     jobEditor.Job = jobsListBox.SelectedItem as Job;
 }
コード例 #2
0
ファイル: AllJobsEditor.cs プロジェクト: Glain/FFTPatcher
 private void CloneClick( object sender, EventArgs args )
 {
     cbJob = jobsListBox.SelectedItem as Job;
 }
コード例 #3
0
ファイル: Job.cs プロジェクト: Wi150nZ/lioneditor
        static AllJobs()
        {
            pspJobs = new Job[0xAA];
            psxJobs = new Job[0xA0];

            PSPNames = PatcherLib.Utilities.Utilities.GetStringsFromNumberedXmlNodes(
                PSPResources.Jobs,
                "/Jobs/Job[@offset='{0:X2}']/@name",
                0xAA );
            List<string> psxNames = new List<string>( PatcherLib.Utilities.Utilities.GetStringsFromNumberedXmlNodes(
                PSXResources.Jobs,
                "/Jobs/Job[@offset='{0:X2}']/@name",
                0xA0 ) );
            psxNames.AddRange( new string[9] { "", "", "", "", "", "", "", "", "" } );
            PSXNames = psxNames.ToArray();

            for( int i = 0; i < 0xAA; i++ )
            {
                pspJobs[i] = new Job( (byte)i, PSPNames[i] );
            }

            for( int i = 0; i < 0xA0; i++ )
            {
                psxJobs[i] = new Job( (byte)i, PSXNames[i] );
            }
        }
コード例 #4
0
ファイル: Job.cs プロジェクト: Wi150nZ/lioneditor
 public void CopyTo( Job destination )
 {
     Copy( this, destination );
 }
コード例 #5
0
ファイル: Job.cs プロジェクト: Wi150nZ/lioneditor
 public static void Copy( Job source, Job destination )
 {
     source.PermanentStatus.CopyTo( destination.PermanentStatus );
     source.StatusImmunity.CopyTo( destination.StatusImmunity );
     source.StartingStatus.CopyTo( destination.StartingStatus );
     source.AbsorbElement.CopyTo( destination.AbsorbElement );
     source.CancelElement.CopyTo( destination.CancelElement );
     source.HalfElement.CopyTo( destination.HalfElement );
     source.WeakElement.CopyTo( destination.WeakElement );
     source.Equipment.CopyTo( destination.Equipment );
     destination.SkillSet = source.SkillSet;
     destination.InnateA = source.InnateA;
     destination.InnateB = source.InnateB;
     destination.InnateC = source.InnateC;
     destination.InnateD = source.InnateD;
     destination.HPConstant = source.HPConstant;
     destination.HPMultiplier = source.HPMultiplier;
     destination.MPConstant = source.MPConstant;
     destination.MPMultiplier = source.MPMultiplier;
     destination.PAConstant = source.PAConstant;
     destination.PAMultiplier = source.PAMultiplier;
     destination.MAConstant = source.MAConstant;
     destination.MAMultiplier = source.MAMultiplier;
     destination.SpeedConstant = source.SpeedConstant;
     destination.SpeedMultiplier = source.SpeedMultiplier;
     destination.Move = source.Move;
     destination.Jump = source.Jump;
     destination.CEvade = source.CEvade;
     destination.MPortrait = source.MPortrait;
     destination.MPalette = source.MPalette;
     destination.MGraphic = source.MGraphic;
 }
コード例 #6
0
ファイル: Job.cs プロジェクト: Wi150nZ/lioneditor
        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;
            }
        }
コード例 #7
0
ファイル: Job.cs プロジェクト: Wi150nZ/lioneditor
 public AllJobs( Context context, IList<byte> bytes )
 {
     int numJobs = context == Context.US_PSP ? 0xA9 : 0xA0;
     int jobLength = context == Context.US_PSP ? 49 : 48;
     byte[] defaultBytes = context == Context.US_PSP ? PSPResources.JobsBin : PSXResources.JobsBin;
     Jobs = new Job[numJobs];
     for( int i = 0; i < numJobs; i++ )
     {
         Jobs[i] = new Job( context, (byte)i, Names[i], bytes.Sub( i * jobLength, (i + 1) * jobLength - 1 ),
             new Job( context, (byte)i, Names[i], defaultBytes.Sub( i * jobLength, (i + 1) * jobLength - 1 ) ) );
     }
 }