Exemplo n.º 1
0
 public void UpdateView( AllMoveFindItems items )
 {
     mapListBox.SelectedIndexChanged -= mapListBox_SelectedIndexChanged;
     mapListBox.DataSource = items.MoveFindItems;
     mapListBox.SelectedIndexChanged += mapListBox_SelectedIndexChanged;
     mapListBox.SelectedIndex = 0;
     mapMoveFindItemEditor1.MapMoveFindItems = mapListBox.SelectedItem as MapMoveFindItems;
 }
Exemplo n.º 2
0
        private static void LoadDataFromBytes(
            IList <byte> abilities, IList <byte> abilityEffects, IList <byte> itemAbilityEffects, IList <byte> reactionEffects, IList <byte> abilityAnimations,
            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,
            IList <byte> propositions, bool brokenLevelBonuses)
        {
            try
            {
                bool psp               = Context == Context.US_PSP;
                var  Abilities         = new AllAbilities(abilities, abilityEffects, itemAbilityEffects, reactionEffects);
                var  AbilityAnimations = new AllAnimations(Context, abilityAnimations, psp ? PSPResources.Binaries.AbilityAnimations : PSXResources.Binaries.AbilityAnimations);
                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.Binaries.JobLevels : PSXResources.Binaries.JobLevels));
                var SkillSets = new AllSkillSets(Context, skillSets,
                                                 Context == Context.US_PSP ? PSPResources.Binaries.SkillSets : PSXResources.Binaries.SkillSets);
                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.Binaries.MoveFind : PSXResources.Binaries.MoveFind));
                var StoreInventories = new AllStoreInventories(Context, inventories, psp ? PSPResources.Binaries.StoreInventories : PSXResources.Binaries.StoreInventories);
                var Propositions     = new AllPropositions(propositions, psp ? PSPResources.Binaries.Propositions : PSXResources.Binaries.Propositions, brokenLevelBonuses);
                FFTPatch.Propositions = Propositions;

                FFTPatch.Abilities         = Abilities;
                FFTPatch.AbilityAnimations = AbilityAnimations;
                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();
            }
        }
Exemplo n.º 3
0
        private static void BuildFromContext()
        {
            switch (Context)
            {
            case Context.US_PSP:
                Abilities         = new AllAbilities(PSPResources.Binaries.Abilities, PSPResources.Binaries.AbilityEffects, PSPResources.Binaries.ItemAbilityEffects, PSPResources.Binaries.ReactionAbilityEffects);
                AbilityAnimations = new AllAnimations(Context, PSPResources.Binaries.AbilityAnimations, PSPResources.Binaries.AbilityAnimations);
                Items             = new AllItems(
                    PSPResources.Binaries.OldItems,
                    PSPResources.Binaries.NewItems);
                ItemAttributes = new AllItemAttributes(
                    PSPResources.Binaries.OldItemAttributes,
                    PSPResources.Binaries.NewItemAttributes);
                Jobs      = new AllJobs(Context, PSPResources.Binaries.Jobs);
                JobLevels = new JobLevels(Context, PSPResources.Binaries.JobLevels,
                                          new JobLevels(Context, PSPResources.Binaries.JobLevels));
                SkillSets = new AllSkillSets(Context, PSPResources.Binaries.SkillSets,
                                             PSPResources.Binaries.SkillSets);
                MonsterSkills      = new AllMonsterSkills(PSPResources.Binaries.MonsterSkills);
                ActionMenus        = new AllActionMenus(PSPResources.Binaries.ActionEvents, Context);
                StatusAttributes   = new AllStatusAttributes(PSPResources.Binaries.StatusAttributes);
                InflictStatuses    = new AllInflictStatuses(PSPResources.Binaries.InflictStatuses);
                PoachProbabilities = new AllPoachProbabilities(PSPResources.Binaries.PoachProbabilities);
                ENTDs            = new AllENTDs(PSPResources.Binaries.ENTD1, PSPResources.Binaries.ENTD2, PSPResources.Binaries.ENTD3, PSPResources.Binaries.ENTD4, PSPResources.Binaries.ENTD5);
                MoveFind         = new AllMoveFindItems(Context, PSPResources.Binaries.MoveFind, new AllMoveFindItems(Context, PSPResources.Binaries.MoveFind));
                StoreInventories = new AllStoreInventories(Context, PSPResources.Binaries.StoreInventories, PSPResources.Binaries.StoreInventories);
                Propositions     = new AllPropositions(PSPResources.Binaries.Propositions, PSPResources.Binaries.Propositions, false);
                break;

            case Context.US_PSX:
                Abilities         = new AllAbilities(PSXResources.Binaries.Abilities, PSXResources.Binaries.AbilityEffects, PSXResources.Binaries.ItemAbilityEffects, PSXResources.Binaries.ReactionAbilityEffects);
                AbilityAnimations = new AllAnimations(Context, PSXResources.Binaries.AbilityAnimations, PSXResources.Binaries.AbilityAnimations);
                Items             = new AllItems(PSXResources.Binaries.OldItems, null);
                ItemAttributes    = new AllItemAttributes(PSXResources.Binaries.OldItemAttributes, null);
                Jobs      = new AllJobs(Context, PSXResources.Binaries.Jobs);
                JobLevels = new JobLevels(Context, PSXResources.Binaries.JobLevels,
                                          new JobLevels(Context, PSXResources.Binaries.JobLevels));
                SkillSets = new AllSkillSets(Context, PSXResources.Binaries.SkillSets,
                                             PSXResources.Binaries.SkillSets);
                MonsterSkills      = new AllMonsterSkills(PSXResources.Binaries.MonsterSkills);
                ActionMenus        = new AllActionMenus(PSXResources.Binaries.ActionEvents, Context);
                StatusAttributes   = new AllStatusAttributes(PSXResources.Binaries.StatusAttributes);
                InflictStatuses    = new AllInflictStatuses(PSXResources.Binaries.InflictStatuses);
                PoachProbabilities = new AllPoachProbabilities(PSXResources.Binaries.PoachProbabilities);
                ENTDs            = new AllENTDs(PSXResources.Binaries.ENTD1, PSXResources.Binaries.ENTD2, PSXResources.Binaries.ENTD3, PSXResources.Binaries.ENTD4);
                MoveFind         = new AllMoveFindItems(Context, PSXResources.Binaries.MoveFind, new AllMoveFindItems(Context, PSXResources.Binaries.MoveFind));
                StoreInventories = new AllStoreInventories(Context, PSXResources.Binaries.StoreInventories, PSXResources.Binaries.StoreInventories);
                Propositions     = new AllPropositions(PSXResources.Binaries.Propositions, PSXResources.Binaries.Propositions, false);
                break;

            default:
                throw new ArgumentException();
            }
        }
Exemplo n.º 4
0
        public AllMoveFindItems(Context context, IList <byte> bytes, AllMoveFindItems def)
        {
            Default = def;
            const int      numMaps = 128;
            IList <string> names   = context == Context.US_PSP ? PSPResources.MapNames : PSXResources.MapNames;

            List <MapMoveFindItems> moveFindItems = new List <MapMoveFindItems>(numMaps * 4);

            if (Default == null)
            {
                for (int i = 0; i < numMaps; i++)
                {
                    moveFindItems.Add(new MapMoveFindItems(bytes.Sub(i * 4 * 4, (i + 1) * 4 * 4 - 1), names[i]));
                }
            }
            else
            {
                for (int i = 0; i < numMaps; i++)
                {
                    moveFindItems.Add(new MapMoveFindItems(bytes.Sub(i * 4 * 4, (i + 1) * 4 * 4 - 1), names[i], def.MoveFindItems[i]));
                }
            }
            MoveFindItems = moveFindItems.ToArray();
        }
Exemplo n.º 5
0
        public AllMoveFindItems( Context context, IList<byte> bytes, AllMoveFindItems def )
        {
            Default = def;
            const int numMaps = 128;
            IList<string> names = context == Context.US_PSP ? PSPResources.MapNames : PSXResources.MapNames;

            List<MapMoveFindItems> moveFindItems = new List<MapMoveFindItems>( numMaps * 4 );
            if ( Default == null )
            {
                for ( int i = 0; i < numMaps; i++ )
                {
                    moveFindItems.Add( new MapMoveFindItems( bytes.Sub( i * 4 * 4, ( i + 1 ) * 4 * 4 - 1 ), names[i] ) );
                }
            }
            else
            {
                for ( int i = 0; i < numMaps; i++ )
                {
                    moveFindItems.Add( new MapMoveFindItems( bytes.Sub( i * 4 * 4, ( i + 1 ) * 4 * 4 - 1 ), names[i], def.MoveFindItems[i] ) );
                }
            }
            MoveFindItems = moveFindItems.ToArray();
        }
Exemplo n.º 6
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();
     }
 }
Exemplo n.º 7
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();
     }
 }