Skip to content

Commit

Permalink
Fix loading queries for new database.
Browse files Browse the repository at this point in the history
  • Loading branch information
brotalnia committed Feb 8, 2019
1 parent c64f435 commit 793bca8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ScriptEditor/GameData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ public static void LoadSpells(string connString)

MySqlConnection conn = new MySqlConnection(connString);
MySqlCommand command = conn.CreateCommand();
command.CommandText = "SELECT `ID`, `effect1`, `effect2`, `effect3`, `name1`, `description1` FROM `spell_template` WHERE `build`=5875 ORDER BY `ID`";
command.CommandText = "SELECT `entry`, `effect1`, `effect2`, `effect3`, `name1`, `description1` FROM `spell_template` t1 WHERE `build`=(SELECT max(`build`) FROM `spell_template` t2 WHERE t1.`entry`=t2.`entry` && `build` <= 5875) ORDER BY `entry`";
try
{
conn.Open();
Expand Down Expand Up @@ -621,7 +621,7 @@ public static void LoadFactions(string connString)

MySqlConnection conn = new MySqlConnection(connString);
MySqlCommand command = conn.CreateCommand();
command.CommandText = "SELECT `id`, `reputation_list_id`, `team`, `name1`, `description1` FROM `faction` WHERE `build`=5875 ORDER BY `id`";
command.CommandText = "SELECT `id`, `reputation_list_id`, `team`, `name1`, `description1` FROM `faction` t1 WHERE `build`=(SELECT max(`build`) FROM `faction` t2 WHERE t1.`id`=t2.`id` && `build` <= 5875) ORDER BY `id`";
try
{
conn.Open();
Expand All @@ -646,7 +646,7 @@ public static void LoadFactionTemplates(string connString)

MySqlConnection conn = new MySqlConnection(connString);
MySqlCommand command = conn.CreateCommand();
command.CommandText = "SELECT `id`, `faction_id`, `faction_flags` FROM `faction_template` WHERE `build`=5875 ORDER BY `id`";
command.CommandText = "SELECT `id`, `faction_id`, `faction_flags` FROM `faction_template` t1 WHERE `build`=(SELECT max(`build`) FROM `faction_template` t2 WHERE t1.`id`=t2.`id` && `build` <= 5875) ORDER BY `id`";
try
{
conn.Open();
Expand Down
4 changes: 2 additions & 2 deletions ScriptEditor/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.1.0.0")]
[assembly: AssemblyFileVersion("7.1.0.0")]
[assembly: AssemblyVersion("7.2.0.0")]
[assembly: AssemblyFileVersion("7.2.0.0")]

0 comments on commit 793bca8

Please sign in to comment.