mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-13 00:40:53 +01:00
30 lines
824 B
C
30 lines
824 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <Events/PacketEvent.h>
|
||
|
|
|
||
|
|
struct World;
|
||
|
|
struct RequestSetWaypoint;
|
||
|
|
struct RequestRemoveWaypoint;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief Handles player specific actions that might change the information needed by other clients about that player.
|
||
|
|
*/
|
||
|
|
struct MapService
|
||
|
|
{
|
||
|
|
MapService(World& aWorld, entt::dispatcher& aDispatcher) noexcept;
|
||
|
|
~MapService() noexcept = default;
|
||
|
|
|
||
|
|
TP_NOCOPYMOVE(MapService);
|
||
|
|
|
||
|
|
protected:
|
||
|
|
void OnSetWaypointRequest(const PacketEvent<RequestSetWaypoint>& acMessage) const noexcept;
|
||
|
|
void OnRemoveWaypointRequest(const PacketEvent<RequestRemoveWaypoint>& acMessage) const noexcept;
|
||
|
|
|
||
|
|
private:
|
||
|
|
World& m_world;
|
||
|
|
|
||
|
|
entt::scoped_connection m_playerSetWaypointConnection;
|
||
|
|
entt::scoped_connection m_playerRemoveWaypointConnection;
|
||
|
|
entt::scoped_connection m_updateConnection;
|
||
|
|
};
|