mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-19 13:23:55 -07:00
servatrice: create correct game ids when not using a database
This commit is contained in:
parent
c8852b450d
commit
a1e35ccda5
5 changed files with 11 additions and 8 deletions
|
|
@ -22,9 +22,7 @@ LocalServerInterface *LocalServer::newConnection()
|
|||
}
|
||||
|
||||
LocalServer_DatabaseInterface::LocalServer_DatabaseInterface(LocalServer *_localServer)
|
||||
: Server_DatabaseInterface(_localServer),
|
||||
nextGameId(0),
|
||||
nextReplayId(0)
|
||||
: Server_DatabaseInterface(_localServer), localServer(_localServer)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,14 +20,13 @@ class LocalServer_DatabaseInterface : public Server_DatabaseInterface {
|
|||
Q_OBJECT
|
||||
private:
|
||||
LocalServer *localServer;
|
||||
int nextGameId, nextReplayId;
|
||||
protected:
|
||||
ServerInfo_User getUserData(const QString &name, bool withId = false);
|
||||
public:
|
||||
LocalServer_DatabaseInterface(LocalServer *_localServer);
|
||||
AuthenticationResult checkUserPassword(Server_ProtocolHandler *handler, const QString &user, const QString &password, QString &reasonStr, int &secondsLeft);
|
||||
int getNextGameId() { return ++nextGameId; }
|
||||
int getNextReplayId() { return ++nextReplayId; }
|
||||
int getNextGameId() { return localServer->getNextLocalGameId(); }
|
||||
int getNextReplayId() { return -1; }
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue