1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-25 11:07:45 +00:00

stay compatible with original forceZoneing

This commit is contained in:
collett 2020-12-04 07:46:43 +09:00
parent 60191fb113
commit a5c8b82926
2 changed files with 12 additions and 1 deletions

View file

@ -423,6 +423,17 @@ void Sapphire::Entity::Player::forceZoneing( uint32_t zoneId, float x, float y,
z = m_pos.z;
r = m_rot;
}
else
{
if( x == FLT_MAX )
x = m_pos.x;
if( y == FLT_MAX )
y = m_pos.y;
if( z == FLT_MAX )
z = m_pos.z;
if( r == FLT_MAX )
r = m_rot;
}
Common::FFXIVARR_POSITION3 pos { x, y, z };
m_queuedZoneing = std::make_shared< QueuedZoning >( zoneId, pos, Util::getTimeMs(), r );
prepareZoning( showZoneName ? zoneId : 0, true, 1, 0 );

View file

@ -501,7 +501,7 @@ namespace Sapphire::Entity
/*! gets the players territoryTypeId */
uint32_t getTerritoryTypeId() const;
void forceZoneing( uint32_t zoneId = 0, float x = 0, float y = 0, float z = 0, float r = 0, bool showZoneName = false );
void forceZoneing( uint32_t zoneId = 0, float x = FLT_MAX, float y = FLT_MAX, float z = FLT_MAX, float r = FLT_MAX, bool showZoneName = false );
/*! return player to preset homepoint */
void returnToHomepoint();