HearthSim / Hearthstone-Deck-Tracker

A deck tracker and deck manager for Hearthstone on Windows
https://hsreplay.net/downloads/
4.61k stars 1.11k forks source link

1.4.14 Broke API used by pack tracker plugin #4262

Closed anonymous555 closed 3 years ago

anonymous555 commented 3 years ago

Release 1.4.14 broke the API used by plugin Pack Tracker 1.3.2 Was working fine before 1.4.14

Make sure you are using the latest version of the Plugin and HDT.

System.MissingMethodException: Method not found: 'Boolean HearthMirror.Objects.Card.get_Premium()'. at PackTracker.PackWatcher.NewPack(Object sender, PackEventArgs e) at HearthWatcher.PackOpeningWatcher.PackEventHandler.Invoke(Object sender, PackEventArgs args) at HearthWatcher.PackOpeningWatcher.d13.MoveNext() in D:\a\Hearthstone-Deck-Tracker\Hearthstone-Deck-Tracker\HearthWatcher\PackOpeningWatcher.cs:line 58 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b6_0(Object state) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Bug report

Expected Behavior

Actual Behavior

Steps to reproduce behavior

Log/Screenshots

azeier commented 3 years ago

This is a required change to support diamond cards. Please open an issue on the plugin repo.

TheMrKochan commented 3 years ago

This is a required change to support diamond cards. Please open an issue on the plugin repo.

Could you show us what exactly to replace or help us adapt the plugin to the current version of HDT?

azeier commented 3 years ago

“HearthMirror.Objects.Card.Premium” (boolean) has been replaced with “HearthMirror.Objects.Card.PremiumType”, which is an int (enum technically) with 0 being normal, 1 being golden and 2 diamond. That should be the only change.

Any required changes should be similar to this commit: https://github.com/HearthSim/Hearthstone-Deck-Tracker/commit/73aca3e48fabd0f9b13336892716731373b940df