HearthSim / Hearthstone-Deck-Tracker

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

Record battlegrounds games and stats #4000

Open redfellow opened 4 years ago

redfellow commented 4 years ago

Things I'd like to see:

chucklu commented 4 years ago

Is it possible to simply record the used hero and the rank when the game end, also record the score? Just like the simple record for wild mode.

chucklu commented 4 years ago

The rank of result

// TB_BaconShop
// Token: 0x06004278 RID: 17016 RVA: 0x00168EE4 File Offset: 0x001670E4
public override string GetVictoryScreenBannerText()
{
    int realTimePlayerLeaderboardPlace = GameState.Get().GetFriendlySidePlayer().GetHero().GetRealTimePlayerLeaderboardPlace();
    if (realTimePlayerLeaderboardPlace == 0)
    {
        return string.Empty;
    }
    return GameStrings.Get("GAMEPLAY_END_OF_GAME_PLACE_" + realTimePlayerLeaderboardPlace);
}

The rating(score) changed

// BaconTwoScoop
// Token: 0x0600208D RID: 8333 RVA: 0x000A78EC File Offset: 0x000A5AEC
private IEnumerator ShowWhenReady()
{
    this.m_Root.SetActive(false);
    this.m_heroActor.gameObject.SetActive(false);
    while (GameState.Get() == null || GameState.Get().GetGameEntity() == null)
    {
        yield return null;
    }
    TB_BaconShop baconGameEntity = null;
    if (GameState.Get().GetGameEntity() is TB_BaconShop)
    {
        baconGameEntity = (TB_BaconShop)GameState.Get().GetGameEntity();
    }
    if (GameState.Get().GetBooleanGameOption(GameEntityOption.WAIT_FOR_RATING_INFO))
    {
        while (baconGameEntity != null && baconGameEntity.RatingChangeData == null && this.m_waitForRatingTimeoutTimer < 5f)
        {
            this.m_waitForRatingTimeoutTimer += Time.unscaledDeltaTime;
            yield return null;
        }
    }
    this.m_Root.SetActive(true);
    this.m_heroActor.gameObject.SetActive(true);
    base.SetupHeroActor();
    base.SetupBannerText();
    this.SetupTwoScoopForPlace();
    if (GameMgr.Get().IsSpectator() || baconGameEntity == null || baconGameEntity.RatingChangeData == null)
    {
        this.m_RatingBanner.SetActive(false);
    }
    else
    {
        this.m_newRating = baconGameEntity.RatingChangeData.NewRating;
        this.m_ratingChange = baconGameEntity.RatingChangeData.RatingChange;
        this.m_RatingBanner.SetActive(true);
        yield return this.PlayRatingChangeAnimation();
    }
    yield break;
}
chucklu commented 4 years ago

@beheh Is this feature belongs to Tier 7? I expected the stats of battlegrounds should be free.

garyking commented 2 years ago

Yes, would be nice if HDT recorded basic game data. I primarily want to see what position I got in a game, and what my MMR was at the time.

All advanced analytics can be left to the premium plan.