openmw-tes3coop/apps/openmw-mp/Cell.hpp

46 lines
1 KiB
C++
Raw Normal View History

2017-02-19 05:26:42 +00:00
//
// Created by koncord on 18.02.17.
//
#ifndef OPENMW_SERVERCELL_HPP
#define OPENMW_SERVERCELL_HPP
2017-02-19 05:26:42 +00:00
#include <deque>
#include <string>
#include <components/esm/records.hpp>
#include <components/openmw-mp/Base/BaseEvent.hpp>
#include <components/openmw-mp/Packets/Actor/ActorPacket.hpp>
#include <components/openmw-mp/Packets/World/WorldPacket.hpp>
2017-02-19 05:26:42 +00:00
class Player;
class Cell;
class Cell
{
friend class CellController;
public:
Cell(ESM::Cell cell);
typedef std::deque<Player*> TPlayers;
2017-02-22 04:03:03 +00:00
typedef TPlayers::const_iterator Iterator;
Iterator begin() const;
Iterator end() const;
2017-02-19 05:26:42 +00:00
2017-02-19 08:07:44 +00:00
void addPlayer(Player *player);
void removePlayer(Player *player);
2017-02-19 05:26:42 +00:00
TPlayers getPlayers() const;
void sendToLoaded(mwmp::ActorPacket *actorPacket, mwmp::BaseActorList *baseActorList) const;
void sendToLoaded(mwmp::WorldPacket *worldPacket, mwmp::BaseEvent *baseEvent) const;
std::string getDescription() const;
2017-02-19 05:26:42 +00:00
private:
TPlayers players;
ESM::Cell cell;
};
#endif //OPENMW_SERVERCELL_HPP