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 9790594016
commit cb787b44f5
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 );
}
if( g_territoryMgr.isPrivateTerritory( getCurrentZone()->getTerritoryId() ) )
return;
if( m_inRangePlayers.empty() )
return;

View file

@ -825,9 +825,6 @@ void Core::Entity::Player::setLookAt( uint8_t index, uint8_t value )
// spawn this player for 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 " +
getName() + " for " +
pTarget->getName() );

View file

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