From 36d64630d3d9bc63b61cc8a76e74180a1b1661b5 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 29 Jan 2018 18:10:11 +1100 Subject: [PATCH] remove isPrivate param from constructors --- .../sapphire_zone/Zone/InstanceContent.cpp | 4 ++-- src/servers/sapphire_zone/Zone/InstanceContent.h | 2 +- src/servers/sapphire_zone/Zone/TerritoryMgr.cpp | 6 +++--- src/servers/sapphire_zone/Zone/Zone.cpp | 16 +++++++--------- src/servers/sapphire_zone/Zone/Zone.h | 2 +- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/servers/sapphire_zone/Zone/InstanceContent.cpp b/src/servers/sapphire_zone/Zone/InstanceContent.cpp index fff7f2e2..d5a78112 100644 --- a/src/servers/sapphire_zone/Zone/InstanceContent.cpp +++ b/src/servers/sapphire_zone/Zone/InstanceContent.cpp @@ -1,7 +1,7 @@ #include "InstanceContent.h" -Core::InstanceContent::InstanceContent( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName, bool bPrivate = false ) - : Zone( territoryId, guId, internalName, placeName, bPrivate ) +Core::InstanceContent::InstanceContent( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName ) + : Zone( territoryId, guId, internalName, placeName ) { } diff --git a/src/servers/sapphire_zone/Zone/InstanceContent.h b/src/servers/sapphire_zone/Zone/InstanceContent.h index 0133eed3..43a29c14 100644 --- a/src/servers/sapphire_zone/Zone/InstanceContent.h +++ b/src/servers/sapphire_zone/Zone/InstanceContent.h @@ -17,7 +17,7 @@ public: 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(); private: diff --git a/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp b/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp index 56375cb9..f707f53a 100644 --- a/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp +++ b/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp @@ -118,7 +118,7 @@ bool Core::TerritoryMgr::createDefaultTerritories() "\t" + territoryInfo->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(); InstanceIdToZonePtrMap instanceMap; @@ -146,9 +146,9 @@ Core::ZonePtr Core::TerritoryMgr::createTerritoryInstance( uint32_t territoryTyp ZonePtr pZone; 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 - pZone = ZonePtr( new Zone( territoryTypeId, getNextInstanceId(), pTeri->name, pPlaceName->name, false ) ); + pZone = ZonePtr( new Zone( territoryTypeId, getNextInstanceId(), pTeri->name, pPlaceName->name ) ); pZone->init(); diff --git a/src/servers/sapphire_zone/Zone/Zone.cpp b/src/servers/sapphire_zone/Zone/Zone.cpp index e994f249..0e11ccd5 100644 --- a/src/servers/sapphire_zone/Zone/Zone.cpp +++ b/src/servers/sapphire_zone/Zone/Zone.cpp @@ -43,7 +43,6 @@ namespace Core { Zone::Zone() : m_territoryId( 0 ) , m_guId( 0 ) - , m_bPrivate( false ) , m_type( Common::RegionType::normal ) , m_currentWeather( static_cast< uint8_t >( Common::Weather::FairSkies ) ) , 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_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_internalName = internalName; m_placeName = placeName; - m_bPrivate = bPrivate; m_lastMobUpdate = 0; m_currentWeather = getNextWeather(); @@ -452,7 +450,7 @@ void Zone::updateBnpcs( int64_t tickCount ) for( auto entry : m_BattleNpcMap ) { Entity::BattleNpcPtr pBNpc = entry.second; - + if( !pBNpc ) continue; @@ -462,7 +460,7 @@ void Zone::updateBnpcs( int64_t tickCount ) m_BattleNpcDeadMap.insert( pBNpc ); break; } - + pBNpc->update( tickCount ); } @@ -476,13 +474,13 @@ bool Zone::runZoneLogic( uint32_t currTime ) bool changedWeather = checkWeather(); auto it = m_sessionSet.begin(); - + // update sessions in this zone for( ; it != m_sessionSet.end(); ) { auto pSession = ( *it ); - + if( !pSession ) { it = m_sessionSet.erase( it ); @@ -631,8 +629,8 @@ void Zone::changeActorPosition( Entity::ActorPtr pActor ) pActor->removeInRangeActor( *iter2 ); - // @TODO FIXME! - // this break is more or less a hack, iteration will break otherwise after removing + // @TODO FIXME! + // this break is more or less a hack, iteration will break otherwise after removing break; } } diff --git a/src/servers/sapphire_zone/Zone/Zone.h b/src/servers/sapphire_zone/Zone/Zone.h index c2caa2e3..dcc37506 100644 --- a/src/servers/sapphire_zone/Zone/Zone.h +++ b/src/servers/sapphire_zone/Zone/Zone.h @@ -52,7 +52,7 @@ protected: public: 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(); bool init();