F4MP/tiltedcode/Code/server/Services/ObjectService.h
Jous99 37b16f1547 code upload
codigo original de f4mp y tilted para referencias
2026-01-06 18:45:00 +01:00

34 lines
1.1 KiB
C++

#pragma once
#include <Events/PacketEvent.h>
struct World;
struct PlayerLeaveCellEvent;
struct ActivateRequest;
struct LockChangeRequest;
struct AssignObjectsRequest;
struct ScriptAnimationRequest;
/**
* @brief Manages (interactive) objects and relays interactions with said objects.
*/
class ObjectService
{
public:
ObjectService(World& aWorld, entt::dispatcher& aDispatcher);
private:
void OnPlayerLeaveCellEvent(const PlayerLeaveCellEvent& acEvent) noexcept;
void OnAssignObjectsRequest(const PacketEvent<AssignObjectsRequest>&) noexcept;
void OnActivate(const PacketEvent<ActivateRequest>&) const noexcept;
void OnLockChange(const PacketEvent<LockChangeRequest>&) const noexcept;
void OnScriptAnimationRequest(const PacketEvent<ScriptAnimationRequest>&) noexcept;
World& m_world;
entt::scoped_connection m_leaveCellConnection;
entt::scoped_connection m_assignObjectConnection;
entt::scoped_connection m_activateConnection;
entt::scoped_connection m_lockChangeConnection;
entt::scoped_connection m_scriptAnimationConnection;
};