mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 06:47:45 +00:00
return players to last zone if the instance doesnt exist
This commit is contained in:
parent
0d0db3b41c
commit
1550414983
1 changed files with 9 additions and 1 deletions
|
@ -366,7 +366,15 @@ void Core::Entity::Player::returnToHomepoint()
|
|||
void Core::Entity::Player::setZone( uint32_t zoneId )
|
||||
{
|
||||
if( !g_territoryMgr.movePlayer( zoneId, getAsPlayer() ) )
|
||||
return;
|
||||
{
|
||||
// todo: this will require proper handling, for now just return the player to their previous area
|
||||
m_pos = m_prevPos;
|
||||
m_rot = m_prevRot;
|
||||
m_zoneId = m_prevZoneId;
|
||||
|
||||
if( !g_territoryMgr.movePlayer( m_zoneId, getAsPlayer() ) )
|
||||
return;
|
||||
}
|
||||
|
||||
sendZonePackets();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue