mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 14:57:44 +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 )
|
void Core::Entity::Player::setZone( uint32_t zoneId )
|
||||||
{
|
{
|
||||||
if( !g_territoryMgr.movePlayer( zoneId, getAsPlayer() ) )
|
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();
|
sendZonePackets();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue