1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-26 22:37:45 +00:00

Store instance guid in db when zoning into an instance

This commit is contained in:
NotAdam 2018-11-23 16:48:32 +11:00
parent 9e22af7b48
commit 59e7dd39dc

View file

@ -410,14 +410,18 @@ bool Core::TerritoryMgr::movePlayer( ZonePtr pZone, Core::Entity::PlayerPtr pPla
if( isHousingTerritory( pZone->getTerritoryTypeId() ) ) if( isHousingTerritory( pZone->getTerritoryTypeId() ) )
{ {
auto pHousing = std::dynamic_pointer_cast< HousingZone >( pZone ); auto pHousing = std::dynamic_pointer_cast< HousingZone >( pZone );
if( pHousing ) if( pHousing )
pPlayer->setTerritoryId( pHousing->getLandSetId() ); pPlayer->setTerritoryId( pHousing->getLandSetId() );
} }
else if( isInstanceContentTerritory( pZone->getTerritoryTypeId() ) )
{
pPlayer->setTerritoryId( pZone->getGuId() );
}
else else
{ {
pPlayer->setTerritoryId( 0 ); pPlayer->setTerritoryId( 0 );
} }
// mark character as zoning in progress // mark character as zoning in progress
pPlayer->setLoadingComplete( false ); pPlayer->setLoadingComplete( false );