Skip to content

Commit

Permalink
Update for Saviors of Uldum
Browse files Browse the repository at this point in the history
  • Loading branch information
azeier committed Aug 1, 2019
1 parent 4c5f5ec commit 3d90b88
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
<Canvas x:Key="set_dalaran" Clip="M 72,72 L 200,72 200,200 72,200 72,72 Z">
<Path Data="m25.079 4.5818s-7.5537 7.0638-10.657 9.3504c-3.1032 2.2866-7.1862 3.7157-10.289 3.7157-0.12249 2.2049-2.4091 5.839-2.4091 5.839 1.8374-1.6741 5.2264-2.695 9.3504-4.8182 1.9599 2.0824 4.9931 2.9981 7.6356 1.7559 3.3998-1.5982 3.5928-6.043 3.062-7.717 0.89829-0.7758 2.7961-1.6358 2.7961-1.6358s0.28098-0.13808 0.79736 2.6566c0.16332 5.6347-3.4708 9.636-8.0031 10.33-4.5323 0.69413-8.6564-2.6131-8.6564-2.6131s-0.81652 0.24486-1.9598 0.8165c1.7558 2.8582 8.5339 3.7567 8.5339 3.7567l2.5724 3.2663s2.0008-2.3683 2.9807-4.1649c1.1433-0.3879 3.9236-1.4079 6.1248-4.8586 2.0902-3.2768 1.5514-10.494 1.5514-10.494s0.65317-0.32658 3.6339-1.3065c-2.4499-2.6949-7.0638-3.8792-7.0638-3.8792zm-6.043 9.7179s1.3167 2.0149-0.44897 2.8992c-1.539 0.77077-2.4502-1.1433-2.4502-1.1433z" Fill="{Binding Path=Fill, ElementName=DeckSetIcons}" RenderTransform="1,0,0,1,72,72" />
</Canvas>
<Canvas x:Key="set_uldum" Clip="M 72,72 L 200,72 200,200 72,200 72,72 Z">
<Path Data="F 1 M 55.09,50.96 C 55.09,50.96 73.206,49.454 73.677,66.441 74.147,83.428 57.442,85.78 47.09,85.31 36.738,84.839 14.858,70.488 16.505,47.666 L 17.782,39.538 21.421,35.353 C 21.421,35.353 29.79,18.432 48.895,13.338 48.895,13.338 50.532,10.609 52.534,10.609 54.535,10.609 56.173,12.792 59.084,13.156 61.995,13.52 63.087,10.427 65.816,10.609 68.545,10.791 68.727,12.792 71.638,13.338 74.549,13.884 88.741,15.521 100.203,31.169 100.203,31.169 100.749,35.172 102.386,35.9 104.023,36.628 107.844,38.265 108.39,39.539 108.936,40.813 112.757,54.458 112.393,60.281 112.029,66.103 110.392,93.213 92.379,101.582 L 92.015,106.494 C 92.015,106.494 78.551,118.502 57.991,117.047 37.431,115.592 31.895,113.426 27.061,106.858 26.395,105.953 25.424,102.673 25.424,102.673 L 23.605,98.852 C 23.605,98.852 21.968,96.123 25.424,96.669 28.881,97.215 41.435,102.127 48.349,102.309 55.263,102.491 58.902,98.852 60.175,98.488 61.449,98.124 68.908,95.213 71.092,94.849 73.275,94.485 86.739,86.247 88.741,66.441 90.743,46.635 72.911,34.99 62.722,34.808 62.722,34.808 56.354,34.626 54.898,35.536 53.442,36.446 43.981,40.812 39.797,41.358 39.797,41.358 36.34,44.633 36.886,48.636 37.432,52.639 37.432,66.416 51.987,66.441 51.987,66.441 55.463,64.565 55.09,50.96 Z" Fill="{Binding Path=Fill, ElementName=DeckSetIcons}" RenderTransform="1,0,0,1,72,72" />
</Canvas>
</UserControl.Resources>
<WrapPanel Orientation="Horizontal">
<WrapPanel.Resources>
Expand Down Expand Up @@ -216,5 +219,13 @@
<VisualBrush Stretch="Uniform" Visual="{StaticResource set_dalaran}" />
</Rectangle.Fill>
</Rectangle>
<Rectangle Name="RectIconUldum" ToolTip="{lex:Loc DeckSetIcons_Tooltip_Uldum}">
<Rectangle.Visibility>
<Binding Path="Deck" Converter="{StaticResource SetIconVisibilityConverter}" ConverterParameter="{x:Static enums:CardSet.ULDUM}"/>
</Rectangle.Visibility>
<Rectangle.Fill>
<VisualBrush Stretch="Uniform" Visual="{StaticResource set_uldum}" />
</Rectangle.Fill>
</Rectangle>
</WrapPanel>
</UserControl>
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@
<TextBlock VerticalAlignment="Center" Text="{lex:LocText Key=Stats_Arena_Rewards_Label_Packs_Dalaran, Suffix=' '}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding Path=PacksCountDalaran, Source={x:Static compiledStats:ArenaStats.Instance}, IsAsync=True}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="{lex:LocText Key=Stats_Arena_Rewards_Label_Packs_Uldum, Suffix=' '}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding Path=PacksCountUldum, Source={x:Static compiledStats:ArenaStats.Instance}, IsAsync=True}"/>
</StackPanel>
</StackPanel>
</StackPanel>
<Rectangle Height="Auto" Width="1" Fill="{DynamicResource TextBrush}"/>
Expand Down
3 changes: 3 additions & 0 deletions Hearthstone Deck Tracker/Enums/ArenaRewardPacks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@ public enum ArenaRewardPacks

[LocDescription("Enum_ArenaRewardPacks_Dalaran")]
Dalaran = CardSet.DALARAN,

[LocDescription("Enum_ArenaRewardPacks_Uldum")]
Uldum = CardSet.ULDUM,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,7 @@ public enum SetFilter
TROLL = 1129,
[LocDescription("MainWindow_DeckBuilder_Filter_Set_Dalaran")]
DALARAN = 1130,
[LocDescription("MainWindow_DeckBuilder_Filter_Set_Uldum")]
ULDUM = 1158,
}
}
3 changes: 2 additions & 1 deletion Hearthstone Deck Tracker/Hearthstone/HearthDbConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public static class HearthDbConverter
{1125, "The Witchwood"},
{1127, "The Boomsday Project"},
{1129, "Rastakhan's Rumble"},
{1130, "Rise of Shadows"}
{1130, "Rise of Shadows"},
{1158, "Saviors of Uldum"}
};

public static string ConvertClass(CardClass cardClass) => (int)cardClass < 2 || (int)cardClass > 10
Expand Down
2 changes: 2 additions & 0 deletions Hearthstone Deck Tracker/Stats/CompiledStats/ArenaStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public class ArenaStats : INotifyPropertyChanged

public int PacksCountDalaran => GetFilteredRuns().Sum(x => x.Packs.Count(p => p == ArenaRewardPacks.Dalaran));

public int PacksCountUldum => GetFilteredRuns().Sum(x => x.Packs.Count(p => p == ArenaRewardPacks.Uldum));

public int PacksCountTotal => GetFilteredRuns().Sum(x => x.PackCount);

public double PacksCountAveragePerRun => Math.Round(GetFilteredRuns(requireAnyReward: true).Select(x => x.PackCount).DefaultIfEmpty(0).Average(), 2);
Expand Down

0 comments on commit 3d90b88

Please sign in to comment.