1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-04 17:57:47 +00:00

Handle via inRangeSet

This commit is contained in:
goaaats 2018-02-08 15:25:59 +01:00
parent 2383fb4321
commit 38661033fa
3 changed files with 3 additions and 6 deletions

View file

@ -512,9 +512,6 @@ void Core::Entity::Actor::sendToInRangeSet( Network::Packets::GamePacketPtr pPac
pSession->getZoneConnection()->queueOutPacket( pPacket ); pSession->getZoneConnection()->queueOutPacket( pPacket );
} }
if( g_territoryMgr.isPrivateTerritory( getCurrentZone()->getTerritoryId() ) )
return;
if( m_inRangePlayers.empty() ) if( m_inRangePlayers.empty() )
return; return;

View file

@ -825,9 +825,6 @@ void Core::Entity::Player::setLookAt( uint8_t index, uint8_t value )
// spawn this player for pTarget // spawn this player for pTarget
void Core::Entity::Player::spawn( Entity::PlayerPtr pTarget ) void Core::Entity::Player::spawn( Entity::PlayerPtr pTarget )
{ {
if( g_territoryMgr.isPrivateTerritory( getCurrentZone()->getTerritoryId() ) && pTarget->getId() != getId() )
return;
g_log.debug( "[" + std::to_string( pTarget->getId() ) + "] Spawning " + g_log.debug( "[" + std::to_string( pTarget->getId() ) + "] Spawning " +
getName() + " for " + getName() + " for " +
pTarget->getName() ); pTarget->getName() );

View file

@ -725,6 +725,9 @@ void Zone::updateInRangeSet( Entity::ActorPtr pActor, Cell* pCell )
if( pCell == nullptr ) if( pCell == nullptr )
return; return;
if( g_territoryMgr.isPrivateTerritory( getTerritoryId() ) )
return;
Entity::ActorPtr pCurAct; Entity::ActorPtr pCurAct;
auto iter = pCell->m_actors.begin(); auto iter = pCell->m_actors.begin();