diff --git a/Hearthstone Treasury/RachelleLogHandler.cs b/Hearthstone Treasury/GameplayLogHandler.cs similarity index 94% rename from Hearthstone Treasury/RachelleLogHandler.cs rename to Hearthstone Treasury/GameplayLogHandler.cs index c5cdc4f..f5295f5 100644 --- a/Hearthstone Treasury/RachelleLogHandler.cs +++ b/Hearthstone Treasury/GameplayLogHandler.cs @@ -5,7 +5,7 @@ namespace Hearthstone_Treasury { - public class RachelleLogHandler + public class GameplayLogHandler { /// /// Copied form Hearthstone_Deck_Tracker.HsLogReaderConstants.GoldRewardRegex, extended with Origin info @@ -15,13 +15,13 @@ public class RachelleLogHandler private AchievementProvider _provider; private TransactionListViewModel _transactionList; - public RachelleLogHandler(AchievementProvider provider, TransactionListViewModel list) + public GameplayLogHandler(AchievementProvider provider, TransactionListViewModel list) { _provider = provider; _transactionList = list; } - public void HandleRachelleLogUpdate(string logLine) + public void HandleGameplayLogUpdate(string logLine) { if (GoldRewardExtendedRegex.IsMatch(logLine)) { @@ -49,7 +49,7 @@ public void HandleRachelleLogUpdate(string logLine) } /// - /// Prevents completely duplicated transactions which are sometimes invoked by HDT rachelle log handler. + /// Prevents completely duplicated transactions which are sometimes invoked by HDT Gameplay log handler. /// /// Transaction to check for duplication /// true if already in the list diff --git a/Hearthstone Treasury/Hearthstone Treasury.csproj b/Hearthstone Treasury/Hearthstone Treasury.csproj index 1030f88..dc9d906 100644 --- a/Hearthstone Treasury/Hearthstone Treasury.csproj +++ b/Hearthstone Treasury/Hearthstone Treasury.csproj @@ -34,10 +34,11 @@ False - ..\..\Hearthstone-Deck-Tracker\Hearthstone Deck Tracker\bin\Debug\De.TorstenMandelkow.MetroChart.dll + ..\ThirdParty\Hearthstone-Deck-Tracker\v1.7.16-x86\De.TorstenMandelkow.MetroChart.dll - - ..\..\Hearthstone-Deck-Tracker\Hearthstone Deck Tracker\bin\Debug\HearthstoneDeckTracker.exe + + False + ..\ThirdParty\Hearthstone-Deck-Tracker\v1.7.16-x86\HearthstoneDeckTracker.exe ..\packages\MahApps.Metro.1.1.2.0\lib\net45\MahApps.Metro.dll @@ -135,11 +136,11 @@ + - diff --git a/Hearthstone Treasury/HearthstoneTreasuryPlugin.cs b/Hearthstone Treasury/HearthstoneTreasuryPlugin.cs index ae2a0eb..1fcbe90 100644 --- a/Hearthstone Treasury/HearthstoneTreasuryPlugin.cs +++ b/Hearthstone Treasury/HearthstoneTreasuryPlugin.cs @@ -75,7 +75,7 @@ public void OnLoad() var transactions = TransactionHelper.LoadTransactions(TransactionsFile) ?? new ReactiveList() { ChangeTrackingEnabled = true }; var transactionList = new TransactionListViewModel(transactions); - var logHandler = new RachelleLogHandler(_achievementProvider, transactionList); + var logHandler = new GameplayLogHandler(_achievementProvider, transactionList); _mainWindowModel = new MainWindowViewModel(Settings, transactionList); @@ -96,7 +96,7 @@ public void OnLoad() } }; - Hearthstone_Deck_Tracker.API.LogEvents.OnRachelleLogLine.Add(logHandler.HandleRachelleLogUpdate); + Hearthstone_Deck_Tracker.API.LogEvents.OnGameplayLogLine.Add(logHandler.HandleGameplayLogUpdate); } private AchievementProvider CreateNewAchievementProvider() diff --git a/Hearthstone Treasury/Properties/AssemblyInfo.cs b/Hearthstone Treasury/Properties/AssemblyInfo.cs index 60e8804..d4f36d9 100644 --- a/Hearthstone Treasury/Properties/AssemblyInfo.cs +++ b/Hearthstone Treasury/Properties/AssemblyInfo.cs @@ -31,5 +31,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("0.4.1.0")] -[assembly: AssemblyFileVersion("0.4.1.0")] +[assembly: AssemblyVersion("0.5.0.0")] +[assembly: AssemblyFileVersion("0.5.0.0")] diff --git a/Tests/AchievementProviderTests.cs b/Tests/AchievementProviderTests.cs index aeff0b9..2b58779 100644 --- a/Tests/AchievementProviderTests.cs +++ b/Tests/AchievementProviderTests.cs @@ -53,11 +53,11 @@ public void IsOutdatedLineTest() { }; var provider = CreateDbfProvider(); var transactionList = new TransactionListViewModel(new ReactiveList()); - var handler = new RachelleLogHandler(provider, transactionList); + var handler = new GameplayLogHandler(provider, transactionList); foreach (var logline in loglines) { - handler.HandleRachelleLogUpdate(logline); + handler.HandleGameplayLogUpdate(logline); } Assert.That(transactionList.Transactions.Count, Is.EqualTo(3)); @@ -94,18 +94,18 @@ public void DuplicateLinesTest() }; var provider = CreateDbfProvider(); var transactionList = new TransactionListViewModel(new ReactiveList()); - var handler = new RachelleLogHandler(provider, transactionList); + var handler = new GameplayLogHandler(provider, transactionList); foreach (var logline in loglines) { - handler.HandleRachelleLogUpdate(logline); + handler.HandleGameplayLogUpdate(logline); } Assert.That(transactionList.Transactions.Count, Is.EqualTo(3)); foreach (var logline in loglines) { - handler.HandleRachelleLogUpdate(logline); + handler.HandleGameplayLogUpdate(logline); } Assert.That(transactionList.Transactions.Count, Is.EqualTo(3)); @@ -132,7 +132,7 @@ public void DuplicateLinesTest() [Test] public void GoldRewardExtendedRegexTest() { string singleLogLine = @"D 23:12:35.5158504 RewardUtils.GetViewableRewards() - processing reward [GoldRewardData: Amount=40 Origin=ACHIEVEMENT OriginData=39]"; - var reward = RachelleLogHandler.CreateReward(singleLogLine); + var reward = GameplayLogHandler.CreateReward(singleLogLine); Assert.That(reward.Amount == 40); Assert.That(reward.Origin == Hearthstone_Treasury.Enums.OriginEnum.ACHIEVEMENT); @@ -147,7 +147,7 @@ public void ProvideCommentTest() string singleLogLine = @"D 23:12:35.5158504 RewardUtils.GetViewableRewards() - processing reward [GoldRewardData: Amount=40 Origin=ACHIEVEMENT OriginData=39]"; - var reward = RachelleLogHandler.CreateReward(singleLogLine); + var reward = GameplayLogHandler.CreateReward(singleLogLine); provider.ProvideComment(reward); diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 053ca6d..608ce09 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -37,7 +37,7 @@ False - ..\..\Hearthstone-Deck-Tracker\Hearthstone Deck Tracker\bin\Debug\HearthstoneDeckTracker.exe + ..\ThirdParty\Hearthstone-Deck-Tracker\v1.7.16-x86\HearthstoneDeckTracker.exe ..\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll diff --git a/ThirdParty/Hearthstone-Deck-Tracker/v1.7.16-x86/De.TorstenMandelkow.MetroChart.dll b/ThirdParty/Hearthstone-Deck-Tracker/v1.7.16-x86/De.TorstenMandelkow.MetroChart.dll new file mode 100644 index 0000000..d1bdef5 Binary files /dev/null and b/ThirdParty/Hearthstone-Deck-Tracker/v1.7.16-x86/De.TorstenMandelkow.MetroChart.dll differ diff --git a/ThirdParty/Hearthstone-Deck-Tracker/v1.7.16-x86/HearthstoneDeckTracker.exe b/ThirdParty/Hearthstone-Deck-Tracker/v1.7.16-x86/HearthstoneDeckTracker.exe new file mode 100644 index 0000000..ebf1aaf Binary files /dev/null and b/ThirdParty/Hearthstone-Deck-Tracker/v1.7.16-x86/HearthstoneDeckTracker.exe differ