private void CheckArenaGameStarted(BnetPlayer player) { if (PresenceMgr.Get().GetStatus(player) == PresenceStatus.ARENA_GAME) { ArenaRecord record; BnetGameAccount hearthstoneGameAccount = player.GetHearthstoneGameAccount(); if (((hearthstoneGameAccount != null) && ArenaRecord.TryParse(hearthstoneGameAccount.GetArenaRecord(), out record)) && (record.wins >= 8)) { object[] args = new object[] { "5ecaf0ff", player.GetBestName(), record.wins }; this.AddToast(GameStrings.Format("GLOBAL_SOCIAL_TOAST_FRIEND_ARENA_START_WITH_MANY_WINS", args)); } } }
private void CheckArenaRecordChanged(BnetPlayer player) { ArenaRecord record; BnetGameAccount hearthstoneGameAccount = player.GetHearthstoneGameAccount(); if ((hearthstoneGameAccount != null) && ArenaRecord.TryParse(hearthstoneGameAccount.GetArenaRecord(), out record)) { if (record.isFinished) { if (record.wins >= 3) { object[] args = new object[] { "5ecaf0ff", player.GetBestName(), record.wins, record.losses }; this.AddToast(GameStrings.Format("GLOBAL_SOCIAL_TOAST_FRIEND_ARENA_COMPLETE", args)); } } else if ((record.wins == 0) && (record.losses == 0)) { object[] objArray2 = new object[] { "5ecaf0ff", player.GetBestName() }; this.AddToast(GameStrings.Format("GLOBAL_SOCIAL_TOAST_FRIEND_ARENA_START", objArray2)); } } }