2018-01-29 20:32:51 +00:00
|
|
|
#ifndef OPENMW_PROCESSORACTORINTERACTION_HPP
|
|
|
|
#define OPENMW_PROCESSORACTORINTERACTION_HPP
|
|
|
|
|
|
|
|
#include "../ActorProcessor.hpp"
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
2018-01-29 22:54:56 +00:00
|
|
|
class ProcessorActorInteraction final : public ActorProcessor
|
2018-01-29 20:32:51 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProcessorActorInteraction()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_ACTOR_INTERACTION)
|
|
|
|
}
|
|
|
|
|
2018-01-29 22:54:56 +00:00
|
|
|
void Do(ActorPacket &packet, const std::shared_ptr<Player> &player, BaseActorList &actorList) override
|
2018-01-29 20:32:51 +00:00
|
|
|
{
|
|
|
|
// Send only to players who have the cell loaded
|
2018-02-12 04:50:52 +00:00
|
|
|
Cell *serverCell = CellController::get().getCell(actorList.cell);
|
2018-01-29 20:32:51 +00:00
|
|
|
|
|
|
|
if (serverCell != nullptr && *serverCell->getAuthority() == actorList.guid)
|
|
|
|
serverCell->sendToLoaded(&packet, &actorList);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORACTORINTERACTION_HPP
|