Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
70a8c10
Initial commit for new gem editor for Hour of Twilight
stoneharry Sep 14, 2024
163fbd1
Implement class structure and full data display in UI
stoneharry Sep 15, 2024
afc8860
Implement Save button
stoneharry Sep 15, 2024
4c47470
Begin implementing duplicate and doc missing logic
stoneharry Sep 15, 2024
062fbcd
Implement Skill Discovery and two new Filter options
stoneharry Sep 15, 2024
775a15a
Implement more save functionality and data mappings
stoneharry Sep 16, 2024
d314bef
Clean unused data
stoneharry Sep 16, 2024
d0701a6
Add support for reference_loot_template
stoneharry Sep 25, 2024
4028afc
Add Green Gem Data
stoneharry Sep 25, 2024
df14da7
Fix green gem type
stoneharry Sep 25, 2024
d2445fe
Update UI to be gem editor specific
stoneharry Oct 5, 2024
672323f
Duplicate spell implementation
stoneharry Oct 5, 2024
eebfb50
Missing cache update
stoneharry Oct 5, 2024
4cfadc8
Implement delete functionality
stoneharry Oct 5, 2024
6000f5b
Update AssemblyInfo
stoneharry Oct 5, 2024
eec135f
Small tweaks
stoneharry Oct 5, 2024
978166b
Fix bug saving Trigger Spell name
stoneharry Oct 18, 2024
f3d880d
Add No Filter option to gem colour filter
stoneharry Oct 18, 2024
b5a7724
Bump Minor Version
stoneharry Oct 18, 2024
7c25763
Fix SkillLineAbility data being created when saving a duplicated spell
stoneharry Oct 19, 2024
90821df
Fix bad data
stoneharry Oct 19, 2024
fa03121
Update gem icons
stoneharry Oct 19, 2024
669c8b5
Add button to generate discovery data
stoneharry Oct 19, 2024
3f999a1
Add Harmony to categories searched for
stoneharry Oct 19, 2024
389010c
Fix item subclass being saved correctly
stoneharry Oct 20, 2024
32d7180
Fix switching to and from purple gems
stoneharry Dec 16, 2024
864bd83
Fix hard delete nuking the temp spell rather than discover spell
stoneharry Dec 16, 2024
31426b6
Allow all discovery data to be loaded if one errors
stoneharry Dec 22, 2024
53452ed
Sort by Spell Name
stoneharry Dec 22, 2024
c6c5ba2
Fix incorrect table bug when converting from prismatic <-> any other …
stoneharry Jan 6, 2025
936876e
Support custom column for HoT
stoneharry Jan 6, 2025
89fde11
Fix SkillLineAbility data for discovery spell
stoneharry Jan 22, 2025
3027491
Fix bugs and update to new schema
stoneharry Apr 9, 2026
599c5e3
Bump version
stoneharry Apr 9, 2026
7aa18b7
Merge branch 'master' into HoT/feature/gem-editor
stoneharry Apr 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 76 additions & 30 deletions SpellGUIV2/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@
Icon="icon.ico"
KeyDown="_KeyDown"
Loaded="_Loaded">
<controls:MetroWindow.Resources>
<ResourceDictionary>
<Style TargetType="c2:ThreadSafeComboBox" BasedOn="{StaticResource {x:Type ComboBox}}"/>
<Style TargetType="c2:ThreadSafeTextBox" BasedOn="{StaticResource {x:Type TextBox}}"/>
<Style TargetType="c2:ThreadSafeCheckBox" BasedOn="{StaticResource {x:Type CheckBox}}"/>
<Style TargetType="c2:FilteredComboBox" BasedOn="{StaticResource {x:Type ComboBox}}"/>
<Style TargetType="c2:ListContextMenu" BasedOn="{StaticResource {x:Type ContextMenu}}"/>
<Style TargetType="c2:SyntaxHighlightBox" BasedOn="{StaticResource {x:Type RichTextBox}}"/>
<Style TargetType="c:SpellSelectionList" BasedOn="{StaticResource {x:Type ListBox}}"/>
<Style TargetType="c:GemSelectionList" BasedOn="{StaticResource {x:Type ListBox}}"/>
</ResourceDictionary>
</controls:MetroWindow.Resources>
<controls:MetroWindow.Flyouts>
<controls:FlyoutsControl>
<controls:Flyout Name="Flyout" Position="Bottom" Height="65" AutoCloseInterval="1700" IsAutoCloseEnabled="true" IsPinned="false">
Expand Down Expand Up @@ -1283,6 +1295,70 @@
</TabItem>
</TabControl>
</TabItem>
<TabItem Name="GemTab" Header="Gems">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="AUTO"/>
<RowDefinition Height="AUTO"/>
<RowDefinition Height="AUTO"/>
<RowDefinition Height="AUTO"/>
<RowDefinition Height="AUTO"/>
<RowDefinition Height="AUTO"/>
<RowDefinition Height="AUTO"/>
<RowDefinition Height="AUTO"/>
<RowDefinition Height="AUTO"/>
<RowDefinition Height="AUTO"/>
<RowDefinition Height="AUTO"/>
<RowDefinition Height="AUTO"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="AUTO"/>
<ColumnDefinition Width="AUTO"/>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="200"/>
</Grid.ColumnDefinitions>
<Label Content="Filter by Name:" Margin="5" Grid.Row="0" Grid.Column="2"/>
<c2:ThreadSafeTextBox x:Name="FilterGemNames" HorizontalAlignment="Left" Margin="5" Width="180" TextWrapping="NoWrap" KeyDown="_KeyDown" KeyUp="_KeyUp" Grid.Row="0" Grid.Column="3"/>
<Label Content="Filter by Colour:" Margin="5" Grid.Row="1" Grid.Column="2"/>
<c2:ThreadSafeComboBox x:Name="FilterGemBox" Margin="5" Width="180" Grid.Row="1" Grid.Column="3" HorizontalAlignment="LEFT"/>
<Label Content="Filter by Discoverable:" Margin="5" Grid.Row="2" Grid.Column="2"/>
<c2:ThreadSafeComboBox x:Name="FilterGemDisc" Margin="5" Width="180" Grid.Row="2" Grid.Column="3" HorizontalAlignment="LEFT"/>
<c:GemSelectionList x:Name="SelectGemList"
Margin="10,10,0,10"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.VirtualizationMode="Recycling"
Width="400"
Focusable="False"
Grid.Row="0"
Grid.RowSpan="14"
Grid.Column="0"
Grid.ColumnSpan="2"/>
<Label Content="Selected Gem:" Margin="5" Grid.Row="3" Grid.Column="2"/>
<Label x:Name="SelectedGemIdTxt" Content="0" Margin="5" Grid.Row="3" Grid.Column="3"/>
<Button Name="SameGemChangesBtn" Content="Save Gem Changes" Grid.Row="4" Grid.Column="2" Margin="5,10,5,10" IsEnabled="false"/>
<Button Name="DuplicateGemBtn" Content="Duplicate to New Gem" Grid.Row="4" Grid.Column="3" Margin="5,10,5,10" IsEnabled="false"/>
<Button Name="DeleteGemBtn" Content="Delete Selected Gem" Grid.Row="4" Grid.Column="4" Margin="5,10,5,10" IsEnabled="false"/>
<Label Content="Enchantment Name:" Margin="5" Grid.Row="5" Grid.Column="2"/>
<c2:ThreadSafeTextBox x:Name="GemEnchantNameTxt" HorizontalAlignment="Left" Margin="5" Width="180" TextWrapping="NoWrap" Grid.Row="5" Grid.Column="3"/>
<Label Content="Gem Type:" Margin="5" Grid.Row="6" Grid.Column="2"/>
<c2:ThreadSafeComboBox x:Name="GemTypeBox" Margin="5" Width="180" Grid.Row="6" Grid.Column="3" HorizontalAlignment="LEFT" IsEnabled="false"/>
<Label Content="Gem Item Id:" Margin="5" Grid.Row="7" Grid.Column="2"/>
<c2:ThreadSafeTextBox x:Name="GemItemIdTxt" HorizontalAlignment="Left" Margin="5" Width="180" TextWrapping="NoWrap" Grid.Row="7" Grid.Column="3"/>
<Label Content="Trigger Spell:" Margin="5" Grid.Row="8" Grid.Column="2"/>
<c2:ThreadSafeTextBox x:Name="GemTriggerSpellTxt" HorizontalAlignment="Left" Margin="5" Width="180" TextWrapping="NoWrap" Grid.Row="8" Grid.Column="3"/>
<Label Content="Temp Learn Spell:" Margin="5" Grid.Row="9" Grid.Column="2"/>
<c2:ThreadSafeTextBox x:Name="GemTempLearnSpellTxt" HorizontalAlignment="Left" Margin="5" Width="180" TextWrapping="NoWrap" Grid.Row="9" Grid.Column="3"/>
<Label Content="SkillDiscovery SpellId:" Margin="5" Grid.Row="10" Grid.Column="2"/>
<c2:ThreadSafeTextBox x:Name="SkillDiscSpellIdTxt" HorizontalAlignment="Left" Margin="5" Width="180" TextWrapping="NoWrap" Grid.Row="10" Grid.Column="3" IsReadOnly="true"/>
<Button Name="GenerateDiscoveryBtn" Content="Generate Discovery Data" Grid.Row="10" Grid.Column="4" IsEnabled="false"/>
<Label Content="AchievementId / CriteriaId:" Margin="5" Grid.Row="11" Grid.Column="2"/>
<c2:ThreadSafeTextBox x:Name="GemAchievementIdTxt" HorizontalAlignment="Left" Margin="5" Width="180" TextWrapping="NoWrap" Grid.Row="11" Grid.Column="3" IsReadOnly="true"/>
</Grid>
</TabItem>
</TabControl>
</Grid>
<controls:MetroWindow.RightWindowCommands>
Expand All @@ -1297,36 +1373,6 @@
<TextBlock Text="{DynamicResource butImportExportDBC}" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<Button Name="LogBookButton" Click="LogBookWindowButtonClick">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{DynamicResource butLogBook}" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<Button Name="OpenAIButton" Click="OpenAIButtonClick">
<StackPanel Orientation="Horizontal">
<TextBlock Text="OpenAI" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<Button Name="TruncateTable" Click="Button_Click">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{DynamicResource butTruncateTable}" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<Button Name="InsertANewRecord" Click="Button_Click">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{DynamicResource butInsertANewRecord}" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<Button Name="DeleteARecord" Click="Button_Click">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{DynamicResource butDeleteARecord}" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<Button Name="SaveSpellChanges" Click="Button_Click">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{DynamicResource butSaveSpellChanges}" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<ComboBox Name="MultilingualSwitch" Foreground="White" Initialized="MultilingualSwitch_Initialized" BorderBrush="{x:Null}" Background="{x:Null}"/>
</controls:WindowCommands>
</controls:MetroWindow.RightWindowCommands>
Expand Down
80 changes: 72 additions & 8 deletions SpellGUIV2/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ private void _Loaded(object sender, RoutedEventArgs e)
try
{
var version = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
Title = $"{Title} - {WoWVersionManager.GetInstance().SelectedVersion().Version} - V{version.Substring(0, version.Length - 2)}";
Title = $"HoT Gem Editor - {WoWVersionManager.GetInstance().SelectedVersion().Version} - V{version.Substring(0, version.Length - 2)}";

stringObjectMap.Add(0, SpellName0);
stringObjectMap.Add(1, SpellName1);
Expand Down Expand Up @@ -1116,6 +1116,20 @@ await Task.Run(() =>
InitialiseSpellVisualEffectList();

prepareIconEditor();

foreach (TabItem item in MainTabControl.Items)
{
if (item.Header.ToString().ToLower().Contains("gem"))
{
item.Visibility = Visibility.Visible;
item.IsSelected = true;
item.Focus();
}
else
{
item.Visibility = Visibility.Hidden;
}
}
}
catch (Exception e)
{
Expand Down Expand Up @@ -1187,10 +1201,10 @@ private async Task GetConfig()
AnimateShow = true,
ColorScheme = MetroDialogColorScheme.Accented
};
MessageDialogResult exitCode = await this.ShowMessageAsync(SafeTryFindResource("SpellEditor"),
SafeTryFindResource("Welcome"),
MessageDialogStyle.AffirmativeAndNegative, settings);
bool isSqlite = exitCode == MessageDialogResult.Affirmative;
//MessageDialogResult exitCode = await this.ShowMessageAsync(SafeTryFindResource("SpellEditor"),
// SafeTryFindResource("Welcome"),
// MessageDialogStyle.AffirmativeAndNegative, settings);
bool isSqlite = false;//exitCode == MessageDialogResult.Affirmative;
if (!isSqlite)
{
if (Config.NeedInitMysql)
Expand Down Expand Up @@ -1228,6 +1242,7 @@ private void _KeyUp(object sender, KeyEventArgs e)
{
if (e.Key == Key.Back && (
sender == FilterSpellNames ||
sender == FilterGemNames ||
sender == FilterIcons ||
sender == Attributes1Search ||
sender == Attributes2Search))
Expand Down Expand Up @@ -1259,7 +1274,7 @@ private async void _KeyDown(object sender, KeyEventArgs e)
}
else if (Keyboard.IsKeyDown(Key.LeftCtrl) && Keyboard.IsKeyDown(Key.S))
{
Button_Click(SaveSpellChanges, e);
//Button_Click(SaveSpellChanges, e);
}
}
else if (sender == NavigateToSpell)
Expand Down Expand Up @@ -1328,6 +1343,31 @@ private async void _KeyDown(object sender, KeyEventArgs e)

imageLoadEventRunning = false;
}
else if (sender == FilterGemNames)
{
if (imageLoadEventRunning)
return;
imageLoadEventRunning = true;
var input = FilterGemNames.Text.ToLower();

ICollectionView view = CollectionViewSource.GetDefaultView(SelectGemList.Items);
view.Filter = o =>
{
var panel = (StackPanel)o;
using (var enumerator = panel.GetChildObjects().GetEnumerator())
{
while (enumerator.MoveNext())
{
if (!(enumerator.Current is TextBlock block))
continue;
return input.Length == 0 || block.Text.ToLower().Contains(input);
}
}
return false;
};

imageLoadEventRunning = false;
}
else if (sender == FilterIcons)
{
var input = FilterIcons.Text.ToLower();
Expand Down Expand Up @@ -1367,7 +1407,7 @@ private async void Button_Click(object sender, RoutedEventArgs e)
LoadAllData();
return;
}

/*
if (sender == TruncateTable)
{
MetroDialogSettings settings = new MetroDialogSettings
Expand Down Expand Up @@ -2005,6 +2045,7 @@ private async void Button_Click(object sender, RoutedEventArgs e)
{
adapter.Execute($"UPDATE `{"spell"}` SET `{"ActiveIconID"}` = '{0}' WHERE `ID` = '{selectedID}'");
}
*/
}

#endregion
Expand Down Expand Up @@ -3781,7 +3822,7 @@ private void PasteVisualKitAction(IListEntry selectedEntry)
adapter.Execute($"INSERT INTO spellvisual VALUES ({ string.Join(", ", copyParent.ItemArray) })");
SpellVisual1.ThreadSafeText = newVisualId.ToString();
visualId = newVisualId;
Button_Click(SaveSpellChanges, null);
//Button_Click(SaveSpellChanges, null);
}
_currentVisualController = null;
UpdateSpellVisualTab(visualId);
Expand Down Expand Up @@ -4755,6 +4796,29 @@ private void TabControl_SelectionChanged(object sender, SelectionChangedEventArg
uint.TryParse(idStr, out var id);
UpdateSpellVisualTab(id);
}
else if (tab == GemTab)
{
if (!SelectGemList.Initialised)
{
var elements = new List<UIElement>
{
SameGemChangesBtn,
DuplicateGemBtn,
DeleteGemBtn,
GemItemIdTxt,
GemTriggerSpellTxt,
GemTempLearnSpellTxt,
GemAchievementIdTxt,
GemEnchantNameTxt,
SkillDiscSpellIdTxt,
GemTypeBox,
FilterGemBox,
FilterGemDisc,
GenerateDiscoveryBtn
};
SelectGemList.SetAdapter(GetDBAdapter()).Initialise(SelectedGemIdTxt, elements, ShowFlyoutMessage, this.ShowInputAsync);
}
}
}

private async void SelectSpell_SelectionChanged(object sender, SelectionChangedEventArgs e)
Expand Down
12 changes: 4 additions & 8 deletions SpellGUIV2/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SpellEditor")]
[assembly: AssemblyDescription("WoW Spell Editor")]
[assembly: AssemblyTitle("GemEditor")]
[assembly: AssemblyDescription("HoT Gem Editor")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("stoneharry")]
[assembly: AssemblyProduct("SpellEditor")]
Expand Down Expand Up @@ -51,9 +51,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("2.3.0.0")]
[assembly: AssemblyFileVersion("2.3.0.0")]




[assembly: AssemblyVersion("1.0.9.0")]
[assembly: AssemblyFileVersion("1.0.9.0")]
Loading