forked from jaildesigner-jailgames/jaildoctors_dilemma
Ya gestiona correctamente los datos online para diferentes usuarios
This commit is contained in:
@@ -6,17 +6,15 @@
|
||||
#include <sstream>
|
||||
|
||||
// Constructor
|
||||
Stats::Stats(std::string file, std::string buffer, options_t *options)
|
||||
Stats::Stats(std::string file, std::string buffer, options_t *options, Online *online)
|
||||
{
|
||||
this->options = options;
|
||||
this->online = online;
|
||||
bufferPath = buffer;
|
||||
filePath = file;
|
||||
bufferList.clear();
|
||||
list.clear();
|
||||
dictionary.clear();
|
||||
|
||||
// Crea objetos
|
||||
online = new Online(options);
|
||||
}
|
||||
|
||||
// Destructor
|
||||
@@ -36,9 +34,6 @@ Stats::~Stats()
|
||||
bufferList.clear();
|
||||
list.clear();
|
||||
dictionary.clear();
|
||||
|
||||
// Libera memoria
|
||||
delete options;
|
||||
}
|
||||
|
||||
// Inicializador
|
||||
@@ -334,10 +329,4 @@ void Stats::updateListFromBuffer()
|
||||
|
||||
saveToFile(bufferPath, bufferList);
|
||||
saveToFile(filePath, list);
|
||||
}
|
||||
|
||||
// Limpia los datos del servidor
|
||||
void Stats::eraseServerData()
|
||||
{
|
||||
jscore::setUserData(options->online.gameID, options->online.jailerID, "");
|
||||
}
|
||||
Reference in New Issue
Block a user