Exemple #1
0
 public void UpdateView( AllItems items )
 {
     itemListBox.SelectedIndexChanged -= itemListBox_SelectedIndexChanged;
     itemListBox.DataSource = items.Items;
     itemListBox.SelectedIndexChanged += itemListBox_SelectedIndexChanged;
     itemListBox.SelectedIndex = 0;
     itemEditor.Item = itemListBox.SelectedItem as Item;
 }
Exemple #2
0
 private static void LoadDataFromBytes(
     IList<byte> abilities, IList<byte> abilityEffects,
     IList<byte> oldItems, IList<byte> oldItemAttributes,
     IList<byte> newItems, IList<byte> newItemAttributes,
     IList<byte> jobs, IList<byte> jobLevels,
     IList<byte> skillSets, IList<byte> monsterSkills,
     IList<byte> actionMenus,
     IList<byte> statusAttributes, IList<byte> inflictStatuses,
     IList<byte> poach,
     IList<byte> entd1, IList<byte> entd2, IList<byte> entd3, IList<byte> entd4, IList<byte> entd5,
     IList<byte> moveFind,
     IList<byte> inventories )
 {
     try
     {
         bool psp = Context == Context.US_PSP;
         var Abilities = new AllAbilities( abilities, abilityEffects );
         var Items = new AllItems( oldItems, newItems != null ? newItems : null );
         var ItemAttributes = new AllItemAttributes( oldItemAttributes, newItemAttributes != null ? newItemAttributes : null );
         var Jobs = new AllJobs( Context, jobs );
         var JobLevels = new JobLevels( Context, jobLevels,
             new JobLevels( Context, Context == Context.US_PSP ? PSPResources.JobLevelsBin : PSXResources.JobLevelsBin ) );
         var SkillSets = new AllSkillSets( Context, skillSets,
             Context == Context.US_PSP ? PSPResources.SkillSetsBin : PSXResources.SkillSetsBin );
         var MonsterSkills = new AllMonsterSkills( monsterSkills );
         var ActionMenus = new AllActionMenus( actionMenus, Context );
         var StatusAttributes = new AllStatusAttributes( statusAttributes );
         var InflictStatuses = new AllInflictStatuses( inflictStatuses );
         var PoachProbabilities = new AllPoachProbabilities( poach );
         var ENTDs = psp ? new AllENTDs( entd1, entd2, entd3, entd4, entd5 ) : new AllENTDs( entd1, entd2, entd3, entd4 );
         var MoveFind = new AllMoveFindItems( Context, moveFind, new AllMoveFindItems( Context, psp ? PSPResources.MoveFind : PSXResources.MoveFind ) );
         var StoreInventories = new AllStoreInventories( Context, inventories, psp ? PSPResources.StoreInventoriesBin : PSXResources.StoreInventoriesBin );
         FFTPatch.Abilities = Abilities;
         FFTPatch.Items = Items;
         FFTPatch.ItemAttributes = ItemAttributes;
         FFTPatch.Jobs = Jobs;
         FFTPatch.JobLevels = JobLevels;
         FFTPatch.SkillSets = SkillSets;
         FFTPatch.MonsterSkills = MonsterSkills;
         FFTPatch.ActionMenus = ActionMenus;
         FFTPatch.StatusAttributes = StatusAttributes;
         FFTPatch.InflictStatuses = InflictStatuses;
         FFTPatch.PoachProbabilities = PoachProbabilities;
         FFTPatch.ENTDs = ENTDs;
         FFTPatch.MoveFind = MoveFind;
         FFTPatch.StoreInventories = StoreInventories;
     }
     catch( Exception )
     {
         throw new LoadPatchException();
     }
 }
Exemple #3
0
 private static void BuildFromContext()
 {
     switch( Context )
     {
         case Context.US_PSP:
             Abilities = new AllAbilities( PSPResources.AbilitiesBin, PSPResources.AbilityEffectsBin );
             Items = new AllItems(
                 PSPResources.OldItemsBin,
                 PSPResources.NewItemsBin );
             ItemAttributes = new AllItemAttributes(
                 PSPResources.OldItemAttributesBin,
                 PSPResources.NewItemAttributesBin );
             Jobs = new AllJobs( Context, PSPResources.JobsBin );
             JobLevels = new JobLevels( Context, PSPResources.JobLevelsBin,
                 new JobLevels( Context, PSPResources.JobLevelsBin ) );
             SkillSets = new AllSkillSets( Context, PSPResources.SkillSetsBin,
                 PSPResources.SkillSetsBin );
             MonsterSkills = new AllMonsterSkills( PSPResources.MonsterSkillsBin );
             ActionMenus = new AllActionMenus( PSPResources.ActionEventsBin, Context );
             StatusAttributes = new AllStatusAttributes( PSPResources.StatusAttributesBin );
             InflictStatuses = new AllInflictStatuses( PSPResources.InflictStatusesBin );
             PoachProbabilities = new AllPoachProbabilities( PSPResources.PoachProbabilitiesBin );
             ENTDs = new AllENTDs( PSPResources.ENTD1, PSPResources.ENTD2, PSPResources.ENTD3, PSPResources.ENTD4, PSPResources.ENTD5 );
             MoveFind = new AllMoveFindItems( Context, PSPResources.MoveFind, new AllMoveFindItems( Context, PSPResources.MoveFind ) );
             StoreInventories = new AllStoreInventories( Context, PSPResources.StoreInventoriesBin, PSPResources.StoreInventoriesBin );
             break;
         case Context.US_PSX:
             Abilities = new AllAbilities( PSXResources.AbilitiesBin, PSXResources.AbilityEffectsBin );
             Items = new AllItems( PSXResources.OldItemsBin, null );
             ItemAttributes = new AllItemAttributes( PSXResources.OldItemAttributesBin, null );
             Jobs = new AllJobs( Context, PSXResources.JobsBin );
             JobLevels = new JobLevels( Context, PSXResources.JobLevelsBin,
                 new JobLevels( Context, PSXResources.JobLevelsBin ) );
             SkillSets = new AllSkillSets( Context, PSXResources.SkillSetsBin,
                 PSXResources.SkillSetsBin );
             MonsterSkills = new AllMonsterSkills( PSXResources.MonsterSkillsBin );
             ActionMenus = new AllActionMenus( PSXResources.ActionEventsBin, Context );
             StatusAttributes = new AllStatusAttributes( PSXResources.StatusAttributesBin );
             InflictStatuses = new AllInflictStatuses( PSXResources.InflictStatusesBin );
             PoachProbabilities = new AllPoachProbabilities( PSXResources.PoachProbabilitiesBin );
             ENTDs = new AllENTDs( PSXResources.ENTD1, PSXResources.ENTD2, PSXResources.ENTD3, PSXResources.ENTD4 );
             MoveFind = new AllMoveFindItems( Context, PSXResources.MoveFind, new AllMoveFindItems( Context, PSXResources.MoveFind ) );
             StoreInventories = new AllStoreInventories( Context, PSXResources.StoreInventoriesBin, PSXResources.StoreInventoriesBin );
             break;
         default:
             throw new ArgumentException();
     }
 }