1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 06:47:45 +00:00

remove isPrivate param from constructors

This commit is contained in:
Adam 2018-01-29 18:10:11 +11:00
parent 20ee459e26
commit 2ad9b0efaa
5 changed files with 14 additions and 16 deletions

View file

@ -1,7 +1,7 @@
#include "InstanceContent.h" #include "InstanceContent.h"
Core::InstanceContent::InstanceContent( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName, bool bPrivate = false ) Core::InstanceContent::InstanceContent( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName )
: Zone( territoryId, guId, internalName, placeName, bPrivate ) : Zone( territoryId, guId, internalName, placeName )
{ {
} }

View file

@ -17,7 +17,7 @@ public:
DutyFinished DutyFinished
}; };
InstanceContent( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName, bool bPrivate ); InstanceContent( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName );
virtual ~InstanceContent(); virtual ~InstanceContent();
private: private:

View file

@ -118,7 +118,7 @@ bool Core::TerritoryMgr::createDefaultTerritories()
"\t" + territoryInfo->name + "\t" + territoryInfo->name +
"\t" + pPlaceName->name ); "\t" + pPlaceName->name );
ZonePtr pZone( new Zone( territoryId, guid, territoryInfo->name, pPlaceName->name, false ) ); ZonePtr pZone( new Zone( territoryId, guid, territoryInfo->name, pPlaceName->name ) );
pZone->init(); pZone->init();
InstanceIdToZonePtrMap instanceMap; InstanceIdToZonePtrMap instanceMap;
@ -146,9 +146,9 @@ Core::ZonePtr Core::TerritoryMgr::createTerritoryInstance( uint32_t territoryTyp
ZonePtr pZone; ZonePtr pZone;
if( isInstanceContentTerritory( territoryTypeId ) ) if( isInstanceContentTerritory( territoryTypeId ) )
pZone = ZonePtr( new InstanceContent( territoryTypeId, getNextInstanceId(), pTeri->name, pPlaceName->name, false ) ); pZone = ZonePtr( new InstanceContent( territoryTypeId, getNextInstanceId(), pTeri->name, pPlaceName->name ) );
else else
pZone = ZonePtr( new Zone( territoryTypeId, getNextInstanceId(), pTeri->name, pPlaceName->name, false ) ); pZone = ZonePtr( new Zone( territoryTypeId, getNextInstanceId(), pTeri->name, pPlaceName->name ) );
pZone->init(); pZone->init();

View file

@ -43,7 +43,6 @@ namespace Core {
Zone::Zone() Zone::Zone()
: m_territoryId( 0 ) : m_territoryId( 0 )
, m_guId( 0 ) , m_guId( 0 )
, m_bPrivate( false )
, m_type( Common::RegionType::normal ) , m_type( Common::RegionType::normal )
, m_currentWeather( static_cast< uint8_t >( Common::Weather::FairSkies ) ) , m_currentWeather( static_cast< uint8_t >( Common::Weather::FairSkies ) )
, m_weatherOverride( 0 ) , m_weatherOverride( 0 )
@ -51,7 +50,7 @@ Zone::Zone()
{ {
} }
Zone::Zone( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName, bool bPrivate = false ) Zone::Zone( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName )
: m_type( Common::RegionType::normal ) : m_type( Common::RegionType::normal )
, m_currentWeather( static_cast< uint8_t >( Common::Weather::FairSkies ) ) , m_currentWeather( static_cast< uint8_t >( Common::Weather::FairSkies ) )
{ {
@ -60,7 +59,6 @@ Zone::Zone( uint16_t territoryId, uint32_t guId, const std::string& internalName
m_territoryId = territoryId; m_territoryId = territoryId;
m_internalName = internalName; m_internalName = internalName;
m_placeName = placeName; m_placeName = placeName;
m_bPrivate = bPrivate;
m_lastMobUpdate = 0; m_lastMobUpdate = 0;
m_currentWeather = getNextWeather(); m_currentWeather = getNextWeather();
@ -452,7 +450,7 @@ void Zone::updateBnpcs( int64_t tickCount )
for( auto entry : m_BattleNpcMap ) for( auto entry : m_BattleNpcMap )
{ {
Entity::BattleNpcPtr pBNpc = entry.second; Entity::BattleNpcPtr pBNpc = entry.second;
if( !pBNpc ) if( !pBNpc )
continue; continue;
@ -462,7 +460,7 @@ void Zone::updateBnpcs( int64_t tickCount )
m_BattleNpcDeadMap.insert( pBNpc ); m_BattleNpcDeadMap.insert( pBNpc );
break; break;
} }
pBNpc->update( tickCount ); pBNpc->update( tickCount );
} }
@ -476,13 +474,13 @@ bool Zone::runZoneLogic( uint32_t currTime )
bool changedWeather = checkWeather(); bool changedWeather = checkWeather();
auto it = m_sessionSet.begin(); auto it = m_sessionSet.begin();
// update sessions in this zone // update sessions in this zone
for( ; it != m_sessionSet.end(); ) for( ; it != m_sessionSet.end(); )
{ {
auto pSession = ( *it ); auto pSession = ( *it );
if( !pSession ) if( !pSession )
{ {
it = m_sessionSet.erase( it ); it = m_sessionSet.erase( it );
@ -631,8 +629,8 @@ void Zone::changeActorPosition( Entity::ActorPtr pActor )
pActor->removeInRangeActor( *iter2 ); pActor->removeInRangeActor( *iter2 );
// @TODO FIXME! // @TODO FIXME!
// this break is more or less a hack, iteration will break otherwise after removing // this break is more or less a hack, iteration will break otherwise after removing
break; break;
} }
} }

View file

@ -52,7 +52,7 @@ protected:
public: public:
Zone(); Zone();
Zone( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName, bool bPrivate ); Zone( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName );
virtual ~Zone(); virtual ~Zone();
bool init(); bool init();