💾 Archived View for sysrq.in › pub › distfiles › arena-tracker-unlock-premium.patch captured on 2022-06-04 at 00:53:59.

View Raw

More Information

⬅️ Previous capture (2021-12-03)

➡️ Next capture (2023-01-29)

-=-=-=-=-=-=-

From 1b0786b78d29717154282c253edf919111f2c083 Mon Sep 17 00:00:00 2001
From: Cyber Tailor <CyberTailor@gmail.com>
Date: Mon, 10 Aug 2020 22:49:28 +0500
Subject: [PATCH 1/2] enable premium features for everyone

---
 Sources/arenahandler.cpp        |  9 +--------
 Sources/drafthandler.cpp        | 12 ++---------
 Sources/graveyardhandler.cpp    | 30 ++++++++-------------------
 Sources/mainwindow.cpp          |  2 +-
 Sources/planhandler.cpp         | 36 +++++++++------------------------
 Sources/popularcardshandler.cpp |  2 +-
 Sources/rngcardhandler.cpp      |  2 +-
 Sources/secretshandler.cpp      |  2 +-
 8 files changed, 25 insertions(+), 70 deletions(-)

diff --git a/Sources/arenahandler.cpp b/Sources/arenahandler.cpp
index c9e72663..6fca8a53 100644
--- a/Sources/arenahandler.cpp
+++ b/Sources/arenahandler.cpp
@@ -52,14 +52,7 @@ void ArenaHandler::completeUI()
 
 void ArenaHandler::setPremium(bool premium)
 {
-    if(premium)
-    {
-        ui->donateButton->hide();
-    }
-    else
-    {
-        ui->donateButton->show();
-    }
+    ui->donateButton->hide();
 }
 
 
diff --git a/Sources/drafthandler.cpp b/Sources/drafthandler.cpp
index f8fefdf9..2bbefaa4 100644
--- a/Sources/drafthandler.cpp
+++ b/Sources/drafthandler.cpp
@@ -156,16 +156,8 @@ void DraftHandler::setMulticlassArena(bool multiclassArena)
 void DraftHandler::setPremium(bool premium)
 {
     if(drafting)    return;
-    this->patreonVersion = premium;
-
-    if(premium)
-    {
-        ui->labelDeckScore->show();
-    }
-    else
-    {
-        ui->labelDeckScore->hide();
-    }
+    this->patreonVersion = true;
+    ui->labelDeckScore->show();
 
     updateScoresVisibility();
 }
diff --git a/Sources/graveyardhandler.cpp b/Sources/graveyardhandler.cpp
index d60f4915..11013732 100644
--- a/Sources/graveyardhandler.cpp
+++ b/Sources/graveyardhandler.cpp
@@ -75,28 +75,14 @@ void GraveyardHandler::completeUI()
 
 void GraveyardHandler::setPremium(bool premium)
 {
-    if(premium)
-    {
-        ui->graveyardListWidgetEnemy->hide();
-        ui->graveyardListWidgetPlayer->show();
-        ui->graveyardButtonPlayer->show();
-        ui->graveyardButtonEnemy->show();
-        ui->graveyardButtonMinions->show();
-        ui->graveyardButtonWeapons->show();
-
-        this->planPatreonButton->hide();
-    }
-    else
-    {
-        ui->graveyardListWidgetEnemy->hide();
-        ui->graveyardListWidgetPlayer->hide();
-        ui->graveyardButtonPlayer->hide();
-        ui->graveyardButtonEnemy->hide();
-        ui->graveyardButtonMinions->hide();
-        ui->graveyardButtonWeapons->hide();
-
-        this->planPatreonButton->show();
-    }
+    ui->graveyardListWidgetEnemy->hide();
+    ui->graveyardListWidgetPlayer->show();
+    ui->graveyardButtonPlayer->show();
+    ui->graveyardButtonEnemy->show();
+    ui->graveyardButtonMinions->show();
+    ui->graveyardButtonWeapons->show();
+
+    this->planPatreonButton->hide();
 }
 
 
diff --git a/Sources/mainwindow.cpp b/Sources/mainwindow.cpp
index 7ec4fab2..a6c21ba4 100644
--- a/Sources/mainwindow.cpp
+++ b/Sources/mainwindow.cpp
@@ -3990,7 +3990,7 @@ void MainWindow::completeConfigComboTheme()
 
 void MainWindow::setPremium(bool premium)
 {
-    this->patreonVersion = premium;
+    this->patreonVersion = true;
 
     //New Config Step 5 - Mostrar opciones premium
     ui->configBoxDraftMechanics->setHidden(!patreonVersion);
diff --git a/Sources/planhandler.cpp b/Sources/planhandler.cpp
index 2f8cc9a0..7c10d994 100644
--- a/Sources/planhandler.cpp
+++ b/Sources/planhandler.cpp
@@ -77,32 +77,16 @@ void PlanHandler::completeUI()
 
 void PlanHandler::setPremium(bool premium)
 {
-    if(premium)
-    {
-        ui->planGraphicsView->show();
-        ui->planButtonPrev->show();
-        ui->planButtonNext->show();
-        ui->planButtonFirst->show();
-        ui->planButtonLast->show();
-        ui->planButtonResize->show();
-        ui->planTurnSlider->show();
-        ui->planLabelTurn->show();
-
-        this->planPatreonButton->hide();
-    }
-    else
-    {
-        ui->planGraphicsView->hide();
-        ui->planButtonPrev->hide();
-        ui->planButtonNext->hide();
-        ui->planButtonFirst->hide();
-        ui->planButtonLast->hide();
-        ui->planButtonResize->hide();
-        ui->planTurnSlider->hide();
-        ui->planLabelTurn->hide();
-
-        this->planPatreonButton->show();
-    }
+    ui->planGraphicsView->show();
+    ui->planButtonPrev->show();
+    ui->planButtonNext->show();
+    ui->planButtonFirst->show();
+    ui->planButtonLast->show();
+    ui->planButtonResize->show();
+    ui->planTurnSlider->show();
+    ui->planLabelTurn->show();
+
+    this->planPatreonButton->hide();
 }
 
 
diff --git a/Sources/popularcardshandler.cpp b/Sources/popularcardshandler.cpp
index 3908b092..a189bd4b 100644
--- a/Sources/popularcardshandler.cpp
+++ b/Sources/popularcardshandler.cpp
@@ -283,7 +283,7 @@ void PopularCardsHandler::setPopularCardsShown(int value)
 
 void PopularCardsHandler::setPremium(bool premium)
 {
-    this->patreonVersion = premium;
+    this->patreonVersion = true;
 }
 
 
diff --git a/Sources/rngcardhandler.cpp b/Sources/rngcardhandler.cpp
index 68aecc4e..e441f690 100644
--- a/Sources/rngcardhandler.cpp
+++ b/Sources/rngcardhandler.cpp
@@ -147,7 +147,7 @@ void RngCardHandler::setShowRngList(bool value)
 
 void RngCardHandler::setPremium(bool premium)
 {
-    this->patreonVersion = premium;
+    this->patreonVersion = true;
     updateShowRngList();
 }
 
diff --git a/Sources/secretshandler.cpp b/Sources/secretshandler.cpp
index 6134928b..c5a0ceb4 100644
--- a/Sources/secretshandler.cpp
+++ b/Sources/secretshandler.cpp
@@ -828,7 +828,7 @@ QStringList SecretsHandler::getSecretOptionCodes(int id)
 
 void SecretsHandler::setPremium(bool premium)
 {
-    this->patreonVersion = premium;
+    this->patreonVersion = true;
 }
 
 
-- 
2.31.1


From 0be8c0d5c7c773dc24ad6f0464feff7e0a389eb6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Anna=20=E2=80=9CCyberTailor=E2=80=9D?= <cyber@sysrq.in>
Date: Mon, 19 Apr 2021 21:19:05 +0500
Subject: [PATCH 2/2] display premium UI items

---
 Sources/mainwindow.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Sources/mainwindow.cpp b/Sources/mainwindow.cpp
index 26a6d1e9..94014cb9 100644
--- a/Sources/mainwindow.cpp
+++ b/Sources/mainwindow.cpp
@@ -91,6 +91,15 @@ MainWindow::MainWindow(QWidget *parent) :
     createCardListWindow();//-->PlanHandler -->SecretsHandler -->DraftHandler
     createPremiumHandler();//-->ArenaHandler -->PlanHandler -->DraftHandler -->TrackobotUploader
 
+    setPremium(true);
+    arenaHandler->setPremium(true);
+    draftHandler->setPremium(true);
+    planHandler->setPremium(true);
+    graveyardHandler->setPremium(true);
+    popularCardsHandler->setPremium(true);
+    rngCardHandler->setPremium(true);
+    secretsHandler->setPremium(true);
+
     initHSRCards();//-->DraftHandler -->SecretHandler
 
     readSettings();
-- 
2.31.1