mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-13 00:20:54 +01:00
26 lines
650 B
C
26 lines
650 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <Events/PacketEvent.h>
|
||
|
|
|
||
|
|
struct World;
|
||
|
|
struct RequestWeatherChange;
|
||
|
|
struct RequestCurrentWeather;
|
||
|
|
|
||
|
|
struct WeatherService
|
||
|
|
{
|
||
|
|
WeatherService(World& aWorld, entt::dispatcher& aDispatcher) noexcept;
|
||
|
|
~WeatherService() noexcept = default;
|
||
|
|
|
||
|
|
TP_NOCOPYMOVE(WeatherService);
|
||
|
|
|
||
|
|
protected:
|
||
|
|
void OnWeatherChange(const PacketEvent<RequestWeatherChange>& acMessage) const noexcept;
|
||
|
|
void OnRequestCurrentWeather(const PacketEvent<RequestCurrentWeather>& acMessage) const noexcept;
|
||
|
|
|
||
|
|
private:
|
||
|
|
World& m_world;
|
||
|
|
|
||
|
|
entt::scoped_connection m_weatherChangeConnection;
|
||
|
|
entt::scoped_connection m_currentWeatherConnection;
|
||
|
|
};
|