public void LoadIff() { try { if (File.Exists("data/pangya_gb.iff")) { Card.Load(); Items.Load(); SetItem.Load(); Character.Load(); HairStyle.Load(); Club.Load(); Caddie.Load(); Skin.Load(); CaddieItem.Load(); Mascot.Load(); CutinInfo.Load(); GrandPrix.Load(); LevelPrize.Load(); Ball.Load(); GPSpecial.Load(); GPReward.Load(); MemorialRare.Load(); MemorialCoin.Load(); MgicBox.Load(); AuxPart.Load(); Desc.Load(); Part.Load(); } else { MessageBox.Show("data/pangya_gb.iff file in folder not found !", "Pangya File Core", MessageBoxButtons.OK, MessageBoxIcon.Error); throw new Exception("[ERROR_IFF]: data/pangya_gb.iff file in folder not found !"); } } catch (Exception ex) { Console.WriteLine(ex.Message, ConsoleColor.Red); Environment.Exit(0); } }
public void LoadIff() { bool result; try { if (Directory.Exists("data") && File.Exists(FileName)) { var zip = ZipFileEx.Open(FileName); result = Part.Load(zip.GetFileData("Part.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Part]: Items Loads {Part.Count}"); } result = Card.Load(zip.GetFileData("Card.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Card]: Items Loads {Card.Count}"); } result = Caddie.Load(zip.GetFileData("Caddie.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Caddie]: Items Loads {Caddie.Count}"); } result = Item.Load(zip.GetFileData("Item.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Item]: Items Loads {Item.Count}"); } result = LevelUpPrizeItem.Load(zip.GetFileData("LevelUpPrizeItem.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.LevelUpPrizeItem]: Items Loads {LevelUpPrizeItem.Count}"); } result = Character.Load(zip.GetFileData("Character.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Character]: Items Loads {Character.Count}"); } result = Ball.Load(zip.GetFileData("Ball.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Ball]: Items Loads {Ball.Count}"); } result = Ability.Load(zip.GetFileData("Ability.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Ability]: Items Loads {Ability.Count}"); } result = Skin.Load(zip.GetFileData("Skin.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Skin]: Items Loads {Skin.Count}"); } result = CaddieItem.Load(zip.GetFileData("CaddieItem.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.CaddieItem]: Items Loads {CaddieItem.Count}"); } result = Club.Load(zip.GetFileData("Club.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Club]: Items Loads {Club.Count}"); } result = ClubSet.Load(zip.GetFileData("ClubSet.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.ClubSet]: Items Loads {ClubSet.Count}"); } result = Course.Load(zip.GetFileData("Course.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Course]: Items Loads {Course.Count}"); } result = CutinInformation.Load(zip.GetFileData("CutinInfomation.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.CutinInformation]: Items Loads {CutinInformation.Count}"); } result = Desc.Load(zip.GetFileData("Desc.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Desc]: Items Loads {Desc.Count}"); } result = Furniture.Load(zip.GetFileData("Furniture.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Furniture]: Items Loads {Furniture.Count}"); } result = FurnitureAbility.Load(zip.GetFileData("FurnitureAbility.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.FurnitureAbility]: Items Loads {FurnitureAbility.Count}"); } result = Mascot.Load(zip.GetFileData("Mascot.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Mascot]: Items Loads {Mascot.Count}"); } result = TikiSpecialTable.Load(zip.GetFileData("TikiSpecialTable.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.TikiSpecialTable]: Items Loads {TikiSpecialTable.Count}"); } result = TikiRecipe.Load(zip.GetFileData("TikiRecipe.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.TikiRecipe]: Items Loads {TikiRecipe.Count}"); } result = TikiPointTable.Load(zip.GetFileData("TikiPointTable.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.TikiPointTable]: Items Loads {TikiPointTable.Count}"); } result = CadieMagicBox.Load(zip.GetFileData("CadieMagicBox.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.CadieMagicBox]: Items Loads {CadieMagicBox.Count}"); } result = CadieMagicBoxRandom.Load(zip.GetFileData("CadieMagicBoxRandom.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.CadieMagicBoxRandom]: Items Loads {CadieMagicBoxRandom.Count}"); } result = HairStyle.Load(zip.GetFileData("HairStyle.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.HairStyle]: Items Loads {HairStyle.Count}"); } result = Match.Load(zip.GetFileData("Match.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Match]: Items Loads {Match.Count}"); } result = SetItem.Load(zip.GetFileData("SetItem.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.SetItem]: Items Loads {SetItem.Count}"); } result = Enchant.Load(zip.GetFileData("Enchant.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Enchant]: Items Loads {Enchant.Count}"); } result = Achievement.Load(zip.GetFileData("Achievement.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.Achievement]: Items Loads {Achievement.Count}"); } result = QuestItem.Load(zip.GetFileData("QuestItem.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.QuestItem]: Items Loads {QuestItem.Count}"); } result = QuestStuff.Load(zip.GetFileData("QuestStuff.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.QuestStuff]: Items Loads {QuestStuff.Count}"); } result = SetEffectTable.Load(zip.GetFileData("SetEffectTable.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.SetEffectTable]: Items Loads {SetEffectTable.Count}"); } result = AuxPart.Load(zip.GetFileData("AuxPart.iff")); if (result) { Console.WriteLine(DateTime.Now.ToString("[yyyy/MM/dd HH:mm:ss] ") + $"[Pang.IFF.AuxPart]: Items Loads {AuxPart.Count}"); } } else { throw new Exception(" Failed to attempt to load data from file not found: " + FileName); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Pang.IFF.Exception", MessageBoxButtons.OK, MessageBoxIcon.Error); Environment.Exit(0); } }