public void UpdateView( AllSkillSets skills ) { if( ourContext != FFTPatch.Context ) { ourContext = FFTPatch.Context; cbSkillSet = null; } skillSetListBox.SelectedIndexChanged -= skillSetListBox_SelectedIndexChanged; skillSetListBox.DataSource = skills.SkillSets; skillSetListBox.SelectedIndexChanged += skillSetListBox_SelectedIndexChanged; skillSetListBox.SelectedIndex = 0; skillSetEditor.SkillSet = skillSetListBox.SelectedItem as SkillSet; }
static SkillSet() { PSPSkills = new SkillSet[0xE3]; pspEventSkills = new SortedDictionary <byte, SkillSet>(); PSPNames = PatcherLib.Utilities.Utilities.GetStringsFromNumberedXmlNodes( PSPResources.SkillSets, "/SkillSets/SkillSet[@byte='{0:X2}']/@name", 0xE3); PSXNames = PatcherLib.Utilities.Utilities.GetStringsFromNumberedXmlNodes( PSXResources.SkillSets, "/SkillSets/SkillSet[@byte='{0:X2}']/@name", 0xE0); for (int i = 0; i < 0xE3; i++) { string n = PSPNames[i]; PSPSkills[i] = new SkillSet(n, (byte)(i & 0xFF)); pspEventSkills.Add((byte)i, PSPSkills[i]); } SkillSet random = new SkillSet("<Random>", 0xFE); SkillSet equal = new SkillSet("<Job's>", 0xFF); pspEventSkills.Add(0xFE, random); pspEventSkills.Add(0xFF, equal); PSXSkills = new SkillSet[0xE0]; psxEventSkills = new SortedDictionary <byte, SkillSet>(); for (int i = 0; i < 0xE0; i++) { string n = PSXNames[i]; PSXSkills[i] = new SkillSet(n, (byte)(i & 0xFF)); psxEventSkills.Add((byte)i, PSXSkills[i]); } psxEventSkills.Add(0xFE, random); psxEventSkills.Add(0xFF, equal); }
private void CloneClick( object sender, EventArgs args ) { cbSkillSet = skillSetListBox.SelectedItem as SkillSet; }
public void CopyTo(SkillSet destination) { Copy(this, destination); }
public SkillSet(byte value, IList <byte> bytes, SkillSet defaults) : this(value, bytes) { Default = defaults; }
public void CopyTo( SkillSet destination ) { Copy( this, destination ); }
public static void Copy( SkillSet source, SkillSet destination ) { for( int i = 0; i < 16; i++ ) { destination.Actions[i] = source.Actions[i]; } for( int i = 0; i < 6; i++ ) { destination.TheRest[i] = source.TheRest[i]; } }
public SkillSet( byte value, IList<byte> bytes, SkillSet defaults ) : this( value, bytes ) { Default = defaults; }
static SkillSet() { PSPSkills = new SkillSet[0xE3]; pspEventSkills = new SortedDictionary<byte, SkillSet>(); PSPNames = PatcherLib.Utilities.Utilities.GetStringsFromNumberedXmlNodes( PSPResources.SkillSets, "/SkillSets/SkillSet[@byte='{0:X2}']/@name", 0xE3 ); PSXNames = PatcherLib.Utilities.Utilities.GetStringsFromNumberedXmlNodes( PSXResources.SkillSets, "/SkillSets/SkillSet[@byte='{0:X2}']/@name", 0xE0 ); for( int i = 0; i < 0xE3; i++ ) { string n = PSPNames[i]; PSPSkills[i] = new SkillSet( n, (byte)(i & 0xFF) ); pspEventSkills.Add( (byte)i, PSPSkills[i] ); } SkillSet random = new SkillSet( "<Random>", 0xFE ); SkillSet equal = new SkillSet( "<Job's>", 0xFF ); pspEventSkills.Add( 0xFE, random ); pspEventSkills.Add( 0xFF, equal ); PSXSkills = new SkillSet[0xE0]; psxEventSkills = new SortedDictionary<byte, SkillSet>(); for( int i = 0; i < 0xE0; i++ ) { string n = PSXNames[i]; PSXSkills[i] = new SkillSet( n, (byte)(i & 0xFF) ); psxEventSkills.Add( (byte)i, PSXSkills[i] ); } psxEventSkills.Add( 0xFE, random ); psxEventSkills.Add( 0xFF, equal ); }