#pragma once #include struct World; struct ShiftGridCellRequest; struct EnterInteriorCellRequest; struct EnterExteriorCellRequest; struct PlayerRespawnRequest; struct PlayerLevelRequest; /** * @brief Handles player specific actions that might change the information needed by other clients about that player. */ struct PlayerService { PlayerService(World& aWorld, entt::dispatcher& aDispatcher) noexcept; ~PlayerService() noexcept = default; TP_NOCOPYMOVE(PlayerService); protected: void HandleGridCellShift(const PacketEvent& acMessage) const noexcept; void HandleExteriorCellEnter(const PacketEvent& acMessage) const noexcept; void HandleInteriorCellEnter(const PacketEvent& acMessage) const noexcept; void OnPlayerRespawnRequest(const PacketEvent& acMessage) const noexcept; void OnPlayerLevelRequest(const PacketEvent& acMessage) const noexcept; private: World& m_world; entt::scoped_connection m_gridCellShiftConnection; entt::scoped_connection m_exteriorCellEnterConnection; entt::scoped_connection m_interiorCellEnterConnection; entt::scoped_connection m_playerRespawnConnection; entt::scoped_connection m_playerLevelConnection; };