mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-06-11 18:27:44 +00:00
return players to last zone if the instance doesnt exist
This commit is contained in:
parent
95bf84ca6d
commit
58b2699fb9
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