1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-04 01:37:47 +00:00
sapphire/src/world/Manager/WarpMgr.h

34 lines
816 B
C
Raw Normal View History

#pragma once
#include <cstdint>
#include <string>
#include <ForwardsZone.h>
#include <Util/Util.h>
#include <unordered_map>
namespace Sapphire::World::Manager
{
struct WarpInfo
{
2022-01-30 14:44:17 +01:00
uint32_t m_targetTerritoryId;
Common::WarpType m_warpType;
2022-01-30 14:44:17 +01:00
Common::FFXIVARR_POSITION3 m_targetPos;
float m_targetRot;
};
class WarpMgr
{
public:
WarpMgr() = default;
2022-01-30 14:44:17 +01:00
void requestMoveTerritory( Entity::Player& player, Common::WarpType warpType, uint32_t targetTerritoryId, Common::FFXIVARR_POSITION3 targetPos, float targetRot );
void requestWarp( Entity::Player& player, Common::WarpType warpType, Common::FFXIVARR_POSITION3 targetPos, float targetRot );
void finishWarp( Entity::Player& player );
private:
2022-01-30 14:44:17 +01:00
std::unordered_map< uint32_t, WarpInfo > m_entityIdToWarpInfoMap;
};
}