Skip to content

Commit

Permalink
Finished work on the condition editor.
Browse files Browse the repository at this point in the history
  • Loading branch information
brotalnia committed Dec 13, 2018
1 parent 085c40b commit 02c4c9a
Show file tree
Hide file tree
Showing 16 changed files with 1,160 additions and 50 deletions.
500 changes: 467 additions & 33 deletions ScriptEditor/DataFinderForms/FormConditionFinder.Designer.cs

Large diffs are not rendered by default.

349 changes: 348 additions & 1 deletion ScriptEditor/DataFinderForms/FormConditionFinder.cs

Large diffs are not rendered by default.

257 changes: 257 additions & 0 deletions ScriptEditor/DataFinderForms/FormConditionFinder.resx

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions ScriptEditor/DataFinderForms/FormDataFinder.Designer.cs

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

4 changes: 4 additions & 0 deletions ScriptEditor/DataFinderForms/FormDataFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace ScriptEditor
public partial class FormDataFinder : Form
{
public int ReturnValue { get; set; } // we return the chosen id in this
protected bool editMode = false;

System.Collections.IComparer textComparer;

Expand Down Expand Up @@ -149,6 +150,9 @@ private void lstData_ColumnClick(object sender, ColumnClickEventArgs e)

private void FormDataFinder_ResizeEnd(object sender, EventArgs e)
{
if (editMode)
return;

lstData.Width = this.Size.Width - 30;
lstData.Height = this.Size.Height - lstData.Location.Y - 65;
btnCancel.Location = new Point(lstData.Size.Width + lstData.Location.X - btnCancel.Size.Width, lstData.Location.Y + lstData.Height + 5);
Expand Down
21 changes: 20 additions & 1 deletion ScriptEditor/Form1.Designer.cs

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

19 changes: 19 additions & 0 deletions ScriptEditor/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public partial class Form1 : Form
Image imgEventEditorHighlighted = ScriptEditor.Properties.Resources.event_editor_button;
Image imgCastsEditor = ScriptEditor.Properties.Resources.cast_editor_button_black;
Image imgCastsEditorHighlighted = ScriptEditor.Properties.Resources.cast_editor_button;
Image imgConditionsEditor = ScriptEditor.Properties.Resources.condition_editor_button_black;
Image imgConditionsEditorHighlighted = ScriptEditor.Properties.Resources.condition_editor_button;
Image imgGitLink = ScriptEditor.Properties.Resources.gitlink1;
Image imgGitLinkHighlighted = ScriptEditor.Properties.Resources.gitlink2;

Expand Down Expand Up @@ -95,5 +97,22 @@ private void picCastsEditor_Click(object sender, EventArgs e)
FormCastsEditor editor = new FormCastsEditor();
editor.Show();
}

private void picConditionEditor_MouseEnter(object sender, EventArgs e)
{
picConditionEditor.BackgroundImage = imgConditionsEditorHighlighted;
player.Play();
}

private void picConditionEditor_MouseLeave(object sender, EventArgs e)
{
picConditionEditor.BackgroundImage = imgConditionsEditor;
}

private void picConditionEditor_Click(object sender, EventArgs e)
{
FormConditionFinder editor = new FormConditionFinder();
editor.ShowStandalone();
}
}
}
2 changes: 1 addition & 1 deletion ScriptEditor/FormScriptEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2960,7 +2960,7 @@ private void Command4SetCheckboxNamesBasedOnFieldIndex(int field)
chkModifyFlags64.Visible = true;
chkModifyFlags128.Text = "NOT_ATTACKABLE_1";
chkModifyFlags128.Visible = true;
chkModifyFlags256.Text = "OOC_NOT_ATTACKABLE";
chkModifyFlags256.Text = "IMMUNE_TO_PLAYER";
chkModifyFlags256.Visible = true;
chkModifyFlags512.Text = "PASSIVE";
chkModifyFlags512.Visible = true;
Expand Down
12 changes: 5 additions & 7 deletions ScriptEditor/GameData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1603,7 +1603,7 @@ static GameData()
ConditionNamesList.Add(new ComboboxPair("AD_COMMISSION_AURA", 10));
ConditionNamesList.Add(new ComboboxPair("WAR_EFFORT_STAGE", 11));
ConditionNamesList.Add(new ComboboxPair("ACTIVE_GAME_EVENT", 12));
ConditionNamesList.Add(new ComboboxPair("AREA_FLAG", 13));
ConditionNamesList.Add(new ComboboxPair("CANT_PATH_TO_VICTIM", 13));
ConditionNamesList.Add(new ComboboxPair("RACE_CLASS", 14));
ConditionNamesList.Add(new ComboboxPair("LEVEL", 15));
ConditionNamesList.Add(new ComboboxPair("SOURCE_ENTRY", 16));
Expand All @@ -1617,8 +1617,8 @@ static GameData()
ConditionNamesList.Add(new ComboboxPair("WOW_PATCH", 24));
ConditionNamesList.Add(new ComboboxPair("DEAD_OR_AWAY", 25));
ConditionNamesList.Add(new ComboboxPair("ACTIVE_HOLIDAY", 26));
ConditionNamesList.Add(new ComboboxPair("TARGET_GENDER", 27));
ConditionNamesList.Add(new ComboboxPair("LEARNABLE_ABILITY", 28));
ConditionNamesList.Add(new ComboboxPair("GENDER", 27));
ConditionNamesList.Add(new ComboboxPair("IS_PLAYER", 28));
ConditionNamesList.Add(new ComboboxPair("SKILL_BELOW", 29));
ConditionNamesList.Add(new ComboboxPair("REPUTATION_RANK_MAX", 30));
ConditionNamesList.Add(new ComboboxPair("HAS_FLAG", 31));
Expand All @@ -1638,10 +1638,8 @@ static GameData()
ConditionNamesList.Add(new ComboboxPair("IS_IN_GROUP", 45));
ConditionNamesList.Add(new ComboboxPair("IS_ALIVE", 46));
ConditionNamesList.Add(new ComboboxPair("MAP_EVENT_TARGETS", 47));
ConditionNamesList.Add(new ComboboxPair("CANT_PATH_TO_VICTIM", 48));
ConditionNamesList.Add(new ComboboxPair("IS_PLAYER", 49));
ConditionNamesList.Add(new ComboboxPair("OBJECT_IS_SPAWNED", 50));
ConditionNamesList.Add(new ComboboxPair("OBJECT_LOOT_STATE", 51));
ConditionNamesList.Add(new ComboboxPair("OBJECT_IS_SPAWNED", 48));
ConditionNamesList.Add(new ComboboxPair("OBJECT_LOOT_STATE", 49));

// Add skill names.
SkillsList.Add(new ComboboxPair("Frost", 6));
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("6.1.0.0")]
[assembly: AssemblyFileVersion("6.1.0.0")]
[assembly: AssemblyVersion("7.0.0.0")]
[assembly: AssemblyFileVersion("7.0.0.0")]
20 changes: 20 additions & 0 deletions ScriptEditor/Properties/Resources.Designer.cs

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

6 changes: 6 additions & 0 deletions ScriptEditor/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,10 @@
<data name="mage" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\mage.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="condition_editor_button" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\condition_editor_button.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="condition_editor_button_black" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\condition_editor_button_black.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ScriptEditor/Resources/conditions.ico
Binary file not shown.
6 changes: 6 additions & 0 deletions ScriptEditor/ScriptEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,12 @@
<ItemGroup>
<None Include="Resources\mage.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\condition_editor_button.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\condition_editor_button_black.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down

0 comments on commit 02c4c9a

Please sign in to comment.