#pragma once #include #include #include #include #include namespace Sapphire::World::Manager { struct WarpInfo { uint32_t m_targetTerritoryId; Common::WarpType m_warpType; Common::FFXIVARR_POSITION3 m_targetPos; float m_targetRot; }; class WarpMgr { public: WarpMgr() = default; /// /// request to move a player to specified territory guid and position, with given WarpType /// /// /// /// /// /// void requestMoveTerritory( Entity::Player& player, Common::WarpType warpType, uint32_t targetTerritoryId, Common::FFXIVARR_POSITION3 targetPos, float targetRot ); /// /// request to move a player to specified territory type and position, with given WarpType /// /// /// /// /// /// void requestMoveTerritoryType( Entity::Player& player, Common::WarpType warpType, uint32_t targetTerritoryId, Common::FFXIVARR_POSITION3 targetPos, float targetRot ); /// /// request to move a player to specified territory guid with given WarpType, position will be the same as before /// /// /// /// void requestMoveTerritory( Entity::Player& player, Common::WarpType warpType, uint32_t targetTerritoryId ); /// /// request to move a player to specified territory type with given WarpType, position will be the same as before /// /// /// /// void requestMoveTerritoryType( Entity::Player& player, Common::WarpType warpType, uint32_t targetTerritoryTypeId ); /// /// handle player state pre-warp and tells client to warp player /// /// /// /// /// void requestWarp( Entity::Player& player, Common::WarpType warpType, Common::FFXIVARR_POSITION3 targetPos, float targetRot ); /// /// handle player state post-warp after client is done loading /// /// void finishWarp( Entity::Player& player ); /// /// teleport a player to specified aetheryte and teleport type (teleport, return, etc) /// /// /// /// void requestPlayerTeleport( Entity::Player& player, uint16_t aetheryteId, uint8_t teleportType ); private: std::unordered_map< uint32_t, WarpInfo > m_entityIdToWarpInfoMap; }; }