Skip to content

Commit

Permalink
Ashes of Outland
Browse files Browse the repository at this point in the history
  • Loading branch information
rembound committed Apr 7, 2020
1 parent 753e76c commit 9a79861
Show file tree
Hide file tree
Showing 18 changed files with 6,348 additions and 4,720 deletions.
16 changes: 14 additions & 2 deletions ArenaHelper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="HearthMirror">
<HintPath>..\..\..\..\..\..\Software\Games\Hearthstone Deck Tracker\HearthMirror.dll</HintPath>
<HintPath>..\..\..\..\..\..\..\Software\Games\Hearthstone Deck Tracker\HearthMirror.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Hearthstone Deck Tracker">
<HintPath>..\..\..\..\..\..\Software\Games\Hearthstone Deck Tracker\Hearthstone Deck Tracker.exe</HintPath>
<HintPath>..\..\..\..\..\..\..\Software\Games\Hearthstone Deck Tracker\Hearthstone Deck Tracker.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="MahApps.Metro">
Expand Down Expand Up @@ -126,6 +126,18 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Resource Include="resources\heroes\druid.png" />
<Resource Include="resources\heroes\hunter.png" />
<Resource Include="resources\heroes\mage.png" />
<Resource Include="resources\heroes\paladin.png" />
<Resource Include="resources\heroes\priest.png" />
<Resource Include="resources\heroes\rogue.png" />
<Resource Include="resources\heroes\shaman.png" />
<Resource Include="resources\heroes\warlock.png" />
<Resource Include="resources\heroes\warrior.png" />
<Resource Include="resources\heroes\demon-hunter.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
Expand Down
32 changes: 17 additions & 15 deletions ArenaWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,16 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<localcontrols:Hero Grid.Row="0" Grid.Column="0" Margin="0,16,0,0" x:Name="Hero0" />
<localcontrols:Hero Grid.Row="0" Grid.Column="1" Margin="0,16,0,0" x:Name="Hero1" />
<localcontrols:Hero Grid.Row="0" Grid.Column="2" Margin="0,16,0,0" x:Name="Hero2" />
<localcontrols:Hero Grid.Row="0" Grid.Column="0" Margin="0,16,0,0" x:Name="Hero0" VerticalAlignment="Top" />
<localcontrols:Hero Grid.Row="0" Grid.Column="1" Margin="0,16,0,0" x:Name="Hero1" VerticalAlignment="Top" />
<localcontrols:Hero Grid.Row="0" Grid.Column="2" Margin="0,16,0,0" x:Name="Hero2" VerticalAlignment="Top" />
</Grid>
<TextBlock x:Name="DetectedHeroesWarning" TextWrapping="Wrap" TextAlignment="Center" Foreground="{DynamicResource TextColor}" Margin="0,20,0,0">text</TextBlock>
</StackPanel>

<!-- ConfigureHeroPanel -->
<StackPanel x:Name="ConfigureHeroPanel" Grid.Row="1" Width="300" Visibility="Hidden">
<local:OutlinedTextBlock HorizontalAlignment="Center" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20" Text="Select Hero" Margin="0,4,0,0" />
<StackPanel x:Name="ConfigureHeroPanel" Grid.Row="1" Width="360" Visibility="Hidden">
<local:OutlinedTextBlock HorizontalAlignment="Center" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20" Text="Select Hero" Margin="0,0,0,0" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
Expand All @@ -181,19 +181,21 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- -->
<localcontrols:Hero Margin="0,8,0,0" Grid.Row="0" Grid.Column="0" x:Name="CHero0" />
<localcontrols:Hero Margin="0,8,0,0" Grid.Row="0" Grid.Column="1" x:Name="CHero1" />
<localcontrols:Hero Margin="0,8,0,0" Grid.Row="0" Grid.Column="2" x:Name="CHero2" />
<localcontrols:Hero Margin="0,8,0,0" Grid.Row="0" Grid.Column="3" x:Name="CHero3" />
<localcontrols:Hero Margin="0,8,0,0" Grid.Row="0" Grid.Column="4" x:Name="CHero4" />
<localcontrols:Hero Margin="0,4,0,0" Grid.Row="0" Grid.Column="0" x:Name="CHero0" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,4,0,0" Grid.Row="0" Grid.Column="1" x:Name="CHero1" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,4,0,0" Grid.Row="0" Grid.Column="2" x:Name="CHero2" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,4,0,0" Grid.Row="0" Grid.Column="3" x:Name="CHero3" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,4,0,0" Grid.Row="0" Grid.Column="4" x:Name="CHero4" VerticalAlignment="Top" />
<!-- -->
<localcontrols:Hero Margin="0,8,0,0" Grid.Row="1" Grid.Column="0" x:Name="CHero5" />
<localcontrols:Hero Margin="0,8,0,0" Grid.Row="1" Grid.Column="1" x:Name="CHero6" />
<localcontrols:Hero Margin="0,8,0,0" Grid.Row="1" Grid.Column="2" x:Name="CHero7" />
<localcontrols:Hero Margin="0,8,0,0" Grid.Row="1" Grid.Column="3" x:Name="CHero8" />
<localcontrols:Hero Margin="0,8,0,0" Grid.Row="1" Grid.Column="4" x:Name="CHero9" />
<localcontrols:Hero Margin="0,6,0,0" Grid.Row="1" Grid.Column="0" x:Name="CHero5" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,6,0,0" Grid.Row="1" Grid.Column="1" x:Name="CHero6" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,6,0,0" Grid.Row="1" Grid.Column="2" x:Name="CHero7" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,6,0,0" Grid.Row="1" Grid.Column="3" x:Name="CHero8" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,6,0,0" Grid.Row="1" Grid.Column="4" x:Name="CHero9" VerticalAlignment="Top" />
<localcontrols:Hero Margin="0,6,0,0" Grid.Row="1" Grid.Column="5" x:Name="CHero10" VerticalAlignment="Top" />
</Grid>
</StackPanel>

Expand Down
13 changes: 11 additions & 2 deletions ArenaWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public ArenaWindow()
CHero7.heromouseup += CHero7MouseUp;
CHero8.heromouseup += CHero8MouseUp;
CHero9.heromouseup += CHero9MouseUp;
CHero10.heromouseup += CHero10MouseUp;
}

public Card Card0
Expand Down Expand Up @@ -94,12 +95,12 @@ public Card Card2

public string StringWebsite
{
get { return "http://rembound.com/?from=ArenaHelper"; }
get { return "https://rembound.com/?from=ArenaHelper"; }
}

public string StringTierList
{
get { return "http://thelightforge.com/TierList"; }
get { return "https://thelightforge.com/TierList"; }
}

public string StringGitHub
Expand Down Expand Up @@ -342,6 +343,14 @@ private void CHero9MouseUp(object sender, RoutedEventArgs e)
}
}

private void CHero10MouseUp(object sender, RoutedEventArgs e)
{
if (oncheroclick != null)
{
oncheroclick(10);
}
}

private void CheckBoxOverlay_Checked(object sender, RoutedEventArgs e)
{
if (oncheckboxoverlay != null)
Expand Down
2 changes: 1 addition & 1 deletion Controls/Hero.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
<Border x:Name="HeroBorder" Height="40" Width="40" Grid.Row="0" Grid.Column="0" Background="{StaticResource PortraitBackground}" Margin="0,0,0,0" MouseUp="Hero_MouseUp">
<Image x:Name="HeroImage" Width="32" Height="32" Margin="0,0,0,0" />
</Border>
<local:OutlinedTextBlock x:Name="HeroName" VerticalAlignment="Bottom" HorizontalAlignment="Center" Text="Paladin" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" TextAlignment="Left" FontSize="13" Margin="0,4,0,0" />
<local:OutlinedTextBlock x:Name="HeroName" VerticalAlignment="Bottom" HorizontalAlignment="Center" Text="Paladin" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" TextAlignment="Left" FontSize="13" Margin="0,0,0,0" />
</StackPanel>
</UserControl>
31 changes: 17 additions & 14 deletions Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public string Name

public string Description
{
get { return "Arena Helper is a plugin for Hearthstone Deck Tracker that tries to detect heroes and cards when drafting a Hearthstone arena deck. Detected cards are displayed alongside the value of the card, that is specified in ADWCTA's Arena Tier List. The created deck can be saved to Hearthstone Deck Tracker.\n\nFor more information and updates, check out:\nhttps://github.com/rembound/Arena-Helper\nhttp://rembound.com"; }
get { return "Arena Helper is a plugin for Hearthstone Deck Tracker that tries to detect heroes and cards when drafting a Hearthstone arena deck. Detected cards are displayed alongside the value of the card, that is specified in ADWCTA's Arena Tier List. The created deck can be saved to Hearthstone Deck Tracker.\n\nFor more information and updates, check out:\nhttps://github.com/rembound/Arena-Helper\nhttps://rembound.com"; }
}

public string ButtonText
Expand All @@ -214,7 +214,7 @@ public string Author

public Version Version
{
get { return new Version("0.9.2"); }
get { return new Version("0.9.3"); }
}

public MenuItem MenuItem
Expand All @@ -233,15 +233,16 @@ public void OnLoad()

// Set hero list
herolist.Clear();
herolist.Add(new HeroData(0, "Warrior", "warrior_small.png"));
herolist.Add(new HeroData(1, "Shaman", "shaman_small.png"));
herolist.Add(new HeroData(2, "Rogue", "rogue_small.png"));
herolist.Add(new HeroData(3, "Paladin", "paladin_small.png"));
herolist.Add(new HeroData(4, "Hunter", "hunter_small.png"));
herolist.Add(new HeroData(5, "Druid", "druid_small.png"));
herolist.Add(new HeroData(6, "Warlock", "warlock_small.png"));
herolist.Add(new HeroData(7, "Mage", "mage_small.png"));
herolist.Add(new HeroData(8, "Priest", "priest_small.png"));
herolist.Add(new HeroData(0, "Warrior", "warrior.png"));
herolist.Add(new HeroData(1, "Shaman", "shaman.png"));
herolist.Add(new HeroData(2, "Rogue", "rogue.png"));
herolist.Add(new HeroData(3, "Paladin", "paladin.png"));
herolist.Add(new HeroData(4, "Hunter", "hunter.png"));
herolist.Add(new HeroData(5, "Druid", "druid.png"));
herolist.Add(new HeroData(6, "Warlock", "warlock.png"));
herolist.Add(new HeroData(7, "Mage", "mage.png"));
herolist.Add(new HeroData(8, "Priest", "priest.png"));
herolist.Add(new HeroData(9, "Demon Hunter", "demon-hunter.png"));

AddMenuItem();

Expand Down Expand Up @@ -376,8 +377,9 @@ private void InitConfigureHero()
SetHeroControl(arenawindow.CHero6, herolist[6].name);
SetHeroControl(arenawindow.CHero7, herolist[7].name);
SetHeroControl(arenawindow.CHero8, herolist[8].name);
SetHeroControl(arenawindow.CHero9, herolist[9].name);

arenawindow.CHero9.HeroName.Text = "Cancel";
arenawindow.CHero10.HeroName.Text = "Cancel";
arenawindow.Update();
}

Expand Down Expand Up @@ -1902,7 +1904,7 @@ private void UpdateHero()
HeroData hero = GetHero(arenadata.pickedhero);
if (hero != null)
{
arenawindow.PickedHeroImage.Source = new BitmapImage(new Uri(@"/HearthstoneDeckTracker;component/Resources/" + hero.image, UriKind.Relative));
arenawindow.PickedHeroImage.Source = new BitmapImage(new Uri("pack://application:,,,/ArenaHelper;component/resources/heroes/" + hero.image));
}
else
{
Expand Down Expand Up @@ -1946,7 +1948,8 @@ private void SetHeroControl(Controls.Hero herocontrol, string heroname)
if (hero == null)
return;

herocontrol.HeroImage.Source = new BitmapImage(new Uri(@"/HearthstoneDeckTracker;component/Resources/" + hero.image, UriKind.Relative));
herocontrol.HeroImage.Source = new BitmapImage(new Uri("pack://application:,,,/ArenaHelper;component/resources/heroes/" + hero.image));

herocontrol.HeroName.Text = hero.name;
}

Expand Down
4 changes: 2 additions & 2 deletions TestPlugin/TestPlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="ArenaHelper">
<HintPath>..\..\..\..\..\..\..\Software\Games\Hearthstone Deck Tracker\Plugins\ArenaHelper\ArenaHelper.dll</HintPath>
<HintPath>..\..\..\..\..\..\..\..\Software\Games\Hearthstone Deck Tracker\Plugins\ArenaHelper\ArenaHelper.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Hearthstone Deck Tracker">
<HintPath>..\..\..\..\..\..\..\Software\Games\Hearthstone Deck Tracker\Hearthstone Deck Tracker.exe</HintPath>
<HintPath>..\..\..\..\..\..\..\..\Software\Games\Hearthstone Deck Tracker\Hearthstone Deck Tracker.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
Expand Down
Loading

0 comments on commit 9a79861

Please sign in to comment.