mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
Fix #45: don't send tokens to deckstats.
This commit is contained in:
parent
4d6f46b06e
commit
7cbe410172
8 changed files with 105 additions and 47 deletions
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef DECKSTATS_INTERFACE_H
|
||||
#define DECKSTATS_INTERFACE_H
|
||||
|
||||
#include "carddatabase.h"
|
||||
#include "decklist.h"
|
||||
#include <QObject>
|
||||
|
||||
class QNetworkAccessManager;
|
||||
|
|
@ -11,10 +13,20 @@ class DeckStatsInterface : public QObject {
|
|||
Q_OBJECT
|
||||
private:
|
||||
QNetworkAccessManager *manager;
|
||||
|
||||
CardDatabase &cardDatabase;
|
||||
|
||||
/**
|
||||
* Deckstats doesn't recognize token cards, and instead tries to find the
|
||||
* closest non-token card instead. So we construct a new deck which has no
|
||||
* tokens.
|
||||
*/
|
||||
void copyDeckWithoutTokens(const DeckList &source, DeckList& destination);
|
||||
|
||||
private slots:
|
||||
void queryFinished(QNetworkReply *reply);
|
||||
public:
|
||||
DeckStatsInterface(QObject *parent = 0);
|
||||
DeckStatsInterface(CardDatabase &_cardDatabase, QObject *parent = 0);
|
||||
void analyzeDeck(DeckList *deck);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue