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(); } }
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(); } }