diff --git a/GlobalTerminalService/GTServer4.cs b/GlobalTerminalService/GTServer4.cs index 4781f57e..68b4db1b 100644 --- a/GlobalTerminalService/GTServer4.cs +++ b/GlobalTerminalService/GTServer4.cs @@ -85,7 +85,7 @@ namespace PkmnFoundations.GlobalTerminalService byte[] boxData = new byte[0x21c]; Array.Copy(data, 0x144, boxData, 0, 0x21c); BoxRecord4 record = new BoxRecord4(pid, label, 0, boxData); - ulong serial = DataAbstract.Instance.BoxUpload4(record); + ulong serial = Database.Instance.BoxUpload4(record); if (serial == 0) { @@ -116,7 +116,7 @@ namespace PkmnFoundations.GlobalTerminalService logEntry.AppendFormat("Searching for {0} boxes.", label); logEntry.AppendLine(); - BoxRecord4[] results = DataAbstract.Instance.BoxSearch4(label, 20); + BoxRecord4[] results = Database.Instance.BoxSearch4(label, 20); response.Write(new byte[] { 0x00, 0x00 }, 0, 2); // result code (0 for OK) response.Write(BitConverter.GetBytes(results.Length), 0, 4); @@ -147,7 +147,7 @@ namespace PkmnFoundations.GlobalTerminalService byte[] dressupData = new byte[0xe0]; Array.Copy(data, 0x140, dressupData, 0, 0xe0); DressupRecord4 record = new DressupRecord4(pid, 0, dressupData); - ulong serial = DataAbstract.Instance.DressupUpload4(record); + ulong serial = Database.Instance.DressupUpload4(record); if (serial == 0) { @@ -177,7 +177,7 @@ namespace PkmnFoundations.GlobalTerminalService logEntry.AppendFormat("Searching for dressups of species {0}.", species); logEntry.AppendLine(); - DressupRecord4[] results = DataAbstract.Instance.DressupSearch4(species, 10); + DressupRecord4[] results = Database.Instance.DressupSearch4(species, 10); response.Write(new byte[] { 0x00, 0x00 }, 0, 2); // result code (0 for OK) response.Write(BitConverter.GetBytes(results.Length), 0, 4); @@ -207,7 +207,7 @@ namespace PkmnFoundations.GlobalTerminalService byte[] battlevidData = new byte[0x1d4c]; Array.Copy(data, 0x140, battlevidData, 0, 0x1d4c); BattleVideoRecord4 record = new BattleVideoRecord4(pid, 0, battlevidData); - ulong serial = DataAbstract.Instance.BattleVideoUpload4(record); + ulong serial = Database.Instance.BattleVideoUpload4(record); if (serial == 0) { @@ -264,7 +264,7 @@ namespace PkmnFoundations.GlobalTerminalService break; } - BattleVideoHeader4[] results = DataAbstract.Instance.BattleVideoSearch4(species, ranking, meta, country, region, 30); + BattleVideoHeader4[] results = Database.Instance.BattleVideoSearch4(species, ranking, meta, country, region, 30); response.Write(new byte[] { 0x00, 0x00 }, 0, 2); // result code (0 for OK) response.Write(BitConverter.GetBytes(results.Length), 0, 4); @@ -289,7 +289,7 @@ namespace PkmnFoundations.GlobalTerminalService } ulong serial = BitConverter.ToUInt64(data, 0x140); - BattleVideoRecord4 record = DataAbstract.Instance.BattleVideoGet4(serial, true); + BattleVideoRecord4 record = Database.Instance.BattleVideoGet4(serial, true); if (record == null) { response.Write(new byte[] { 0x02, 0x00 }, 0, 2); @@ -320,7 +320,7 @@ namespace PkmnFoundations.GlobalTerminalService ulong serial = BitConverter.ToUInt64(data, 0x140); - if (DataAbstract.Instance.BattleVideoFlagSaved4(serial)) + if (Database.Instance.BattleVideoFlagSaved4(serial)) { response.Write(new byte[] { 0x00, 0x00 }, 0, 2); // result code (0 for OK) logEntry.AppendFormat("Battle video {0} flagged saved.", BattleVideoHeader4.FormatSerial(serial)); diff --git a/GlobalTerminalService/GTServer5.cs b/GlobalTerminalService/GTServer5.cs index 80f37469..f1568dda 100644 --- a/GlobalTerminalService/GTServer5.cs +++ b/GlobalTerminalService/GTServer5.cs @@ -83,7 +83,7 @@ namespace PkmnFoundations.GlobalTerminalService byte[] musicalData = new byte[0x230]; Array.Copy(data, 0x140, musicalData, 0, 0x230); MusicalRecord5 record = new MusicalRecord5(pid, 0, musicalData); - ulong serial = DataAbstract.Instance.MusicalUpload5(record); + ulong serial = Database.Instance.MusicalUpload5(record); if (serial == 0) { @@ -114,7 +114,7 @@ namespace PkmnFoundations.GlobalTerminalService logEntry.AppendFormat("Searching for musical photos of species {0}.", species); logEntry.AppendLine(); - MusicalRecord5[] results = DataAbstract.Instance.MusicalSearch5(species, 5); + MusicalRecord5[] results = Database.Instance.MusicalSearch5(species, 5); response.Write(new byte[] { 0x00, 0x00 }, 0, 2); // result code (0 for OK) response.Write(BitConverter.GetBytes(results.Length), 0, 4); @@ -155,7 +155,7 @@ namespace PkmnFoundations.GlobalTerminalService Array.Copy(data, 0x19e8, vldtSignature, 0, sigLength); // todo: validate signature. - ulong serial = DataAbstract.Instance.BattleVideoUpload5(record); + ulong serial = Database.Instance.BattleVideoUpload5(record); if (serial == 0) { @@ -208,7 +208,7 @@ namespace PkmnFoundations.GlobalTerminalService } logEntry.AppendLine("."); - BattleVideoHeader5[] results = DataAbstract.Instance.BattleVideoSearch5(species, ranking, meta, country, region, 30); + BattleVideoHeader5[] results = Database.Instance.BattleVideoSearch5(species, ranking, meta, country, region, 30); response.Write(new byte[] { 0x00, 0x00 }, 0, 2); // result code (0 for OK) response.Write(BitConverter.GetBytes(results.Length), 0, 4); @@ -233,7 +233,7 @@ namespace PkmnFoundations.GlobalTerminalService } ulong serial = BitConverter.ToUInt64(data, 0x140); - BattleVideoRecord5 record = DataAbstract.Instance.BattleVideoGet5(serial, true); + BattleVideoRecord5 record = Database.Instance.BattleVideoGet5(serial, true); if (record == null) { response.Write(new byte[] { 0x02, 0x00 }, 0, 2); @@ -264,7 +264,7 @@ namespace PkmnFoundations.GlobalTerminalService ulong serial = BitConverter.ToUInt64(data, 0x140); - if (DataAbstract.Instance.BattleVideoFlagSaved5(serial)) + if (Database.Instance.BattleVideoFlagSaved5(serial)) { response.Write(new byte[] { 0x00, 0x00 }, 0, 2); // result code (0 for OK) logEntry.AppendFormat("Battle video {0} flagged saved.", BattleVideoHeader4.FormatSerial(serial)); diff --git a/bvRestorer4/Program.cs b/bvRestorer4/Program.cs index 6d1fea6c..c4f316ea 100644 --- a/bvRestorer4/Program.cs +++ b/bvRestorer4/Program.cs @@ -69,7 +69,7 @@ namespace bvRestorer4 BattleVideoRecord4 record = new BattleVideoRecord4(pid, serial, mainData); - DataAbstract.Instance.BattleVideoUpload4(record); + Database.Instance.BattleVideoUpload4(record); Console.WriteLine("Video {0} added successfully.", BattleVideoHeader4.FormatSerial(serial)); successCount++; diff --git a/bvRestorer5/Program.cs b/bvRestorer5/Program.cs index ee4d802d..64ff3b1d 100644 --- a/bvRestorer5/Program.cs +++ b/bvRestorer5/Program.cs @@ -63,7 +63,7 @@ namespace bvRestorer5 BattleVideoRecord5 record = new BattleVideoRecord5(pid, serial, mainData); - DataAbstract.Instance.BattleVideoUpload5(record); + Database.Instance.BattleVideoUpload5(record); Console.WriteLine("Video {0} added successfully.", BattleVideoHeader4.FormatSerial(serial)); successCount++; diff --git a/gts/MasterPage.master.cs b/gts/MasterPage.master.cs index 81a3f472..201548ea 100644 --- a/gts/MasterPage.master.cs +++ b/gts/MasterPage.master.cs @@ -25,8 +25,8 @@ namespace PkmnFoundations.GTS if (Cache["BattleVideoCount4"] == null || Cache["BattleVideoCount5"] == null) { - bvCount4 = DataAbstract.Instance.BattleVideoCount4(); - bvCount5 = DataAbstract.Instance.BattleVideoCount5(); + bvCount4 = Database.Instance.BattleVideoCount4(); + bvCount5 = Database.Instance.BattleVideoCount5(); Cache.Insert("BattleVideoCount4", bvCount4, null, DateTime.Now.AddMinutes(1), System.Web.Caching.Cache.NoSlidingExpiration); diff --git a/gts/RoomLeaders.aspx.cs b/gts/RoomLeaders.aspx.cs index 8f9f0091..f986396e 100644 --- a/gts/RoomLeaders.aspx.cs +++ b/gts/RoomLeaders.aspx.cs @@ -46,7 +46,7 @@ namespace PkmnFoundations.GTS { case "4": { - BattleTowerProfile4[] results = DataAbstract.Instance.BattleTowerGetLeaders4(rank, room); + BattleTowerProfile4[] results = Database.Instance.BattleTowerGetLeaders4(rank, room); StringBuilder builder = new StringBuilder(); @@ -60,7 +60,7 @@ namespace PkmnFoundations.GTS } builder.Append("

Opponents:

Opponents: