Skip to content

Commit

Permalink
Fix broadcast text loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
brotalnia committed Apr 23, 2020
1 parent 2f49deb commit 170895f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions ScriptEditor/FormScriptEditor.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions ScriptEditor/FormScriptEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ private void LoadControls()
cmbTargetType.Items.Add(new ComboboxPair("Nearest Player", 23));
cmbTargetType.Items.Add(new ComboboxPair("Nearest Hostile Player", 24));
cmbTargetType.Items.Add(new ComboboxPair("Nearest Friendly Player", 25));
cmbTargetType.Items.Add(new ComboboxPair("Random Creature", 26));
cmbTargetType.SelectedIndex = 0;

// Add chat types to combo box.
Expand Down Expand Up @@ -2365,8 +2366,9 @@ private void SetTargetControlsBasedOnType(int target_type)
txtTargetParam2.Enabled = false;
break;
}
case 8: // Creature Entry
case 11: // GameObject Entry
case 8: // Nearest Creature with Entry
case 11: // Nearest GameObject with Entry
case 26: // Random Creature with Entry
{
lblTargetParam1.Text = "Entry:";
lblTargetParam2.Text = "Radius:";
Expand Down
2 changes: 1 addition & 1 deletion ScriptEditor/GameData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public static void LoadBroadcastTexts(string connString)

MySqlConnection conn = new MySqlConnection(connString);
MySqlCommand command = conn.CreateCommand();
command.CommandText = "SELECT `ID`, `MaleText`, `FemaleText`, `Type`, `Language` FROM `broadcast_text` ORDER BY `ID`";
command.CommandText = "SELECT `entry`, `male_text`, `female_text`, `chat_type`, `language_id` FROM `broadcast_text` ORDER BY `entry`";
try
{
conn.Open();
Expand Down

0 comments on commit 170895f

Please sign in to comment.