2020-05-08 22:10:49 +02:00
|
|
|
#pragma once
|
2012-09-01 16:40:18 +02:00
|
|
|
|
|
|
|
#include <list>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
struct Player
|
|
|
|
{
|
|
|
|
std::string name;
|
2018-03-25 16:03:11 +02:00
|
|
|
double x, y, z;
|
|
|
|
};
|
2012-09-01 16:40:18 +02:00
|
|
|
|
|
|
|
class PlayerAttributes
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
typedef std::list<Player> Players;
|
|
|
|
|
2018-03-25 16:03:11 +02:00
|
|
|
PlayerAttributes(const std::string &worldDir);
|
2020-05-08 22:10:49 +02:00
|
|
|
Players::const_iterator begin() const;
|
|
|
|
Players::const_iterator end() const;
|
2012-09-01 16:40:18 +02:00
|
|
|
|
|
|
|
private:
|
2018-03-25 16:03:11 +02:00
|
|
|
void readFiles(const std::string &playersPath);
|
|
|
|
void readSqlite(const std::string &db_name);
|
|
|
|
|
2012-09-01 16:40:18 +02:00
|
|
|
Players m_players;
|
2018-03-25 16:03:11 +02:00
|
|
|
};
|