diff --git a/src/servers/sapphire_api/SapphireAPI.cpp b/src/servers/sapphire_api/SapphireAPI.cpp index 28338026..b1851c77 100644 --- a/src/servers/sapphire_api/SapphireAPI.cpp +++ b/src/servers/sapphire_api/SapphireAPI.cpp @@ -50,7 +50,7 @@ bool Core::Network::SapphireAPI::login( const std::string& username, const std:: } // create session for the new sessionid and store to sessionlist - auto pSession = boost::make_shared< Session >(); + auto pSession = std::make_shared< Session >(); pSession->setAccountId( accountId ); pSession->setSessionId( sid ); @@ -75,7 +75,7 @@ bool Core::Network::SapphireAPI::login( const std::string& username, const std:: bool Core::Network::SapphireAPI::insertSession( const uint32_t& accountId, std::string& sId ) { // create session for the new sessionid and store to sessionlist - auto pSession = boost::make_shared< Session >(); + auto pSession = std::make_shared< Session >(); pSession->setAccountId( accountId ); pSession->setSessionId( ( uint8_t* ) sId.c_str() ); diff --git a/src/servers/sapphire_api/SapphireAPI.h b/src/servers/sapphire_api/SapphireAPI.h index 6d367a21..00b0f610 100644 --- a/src/servers/sapphire_api/SapphireAPI.h +++ b/src/servers/sapphire_api/SapphireAPI.h @@ -20,7 +20,7 @@ public: ~SapphireAPI(); - using SessionMap = std::map< std::string, boost::shared_ptr< Session > >; + using SessionMap = std::map< std::string, std::shared_ptr< Session > >; bool login( const std::string& username, const std::string& pass, std::string& sId ); diff --git a/src/servers/sapphire_zone/Action/ActionMount.cpp b/src/servers/sapphire_zone/Action/ActionMount.cpp index d5e75422..2b86f592 100644 --- a/src/servers/sapphire_zone/Action/ActionMount.cpp +++ b/src/servers/sapphire_zone/Action/ActionMount.cpp @@ -74,7 +74,7 @@ void Core::Action::ActionMount::onFinish() pPlayer->unsetStateFlag( PlayerStateFlag::Casting ); - auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pPlayer->getId(), 4 ); + auto effectPacket = std::make_shared< Server::EffectPacket >( getId(), pPlayer->getId(), 4 ); effectPacket->setRotation( Math::Util::floatToUInt16Rot( pPlayer->getRot() ) ); Server::EffectEntry effectEntry{}; diff --git a/src/servers/sapphire_zone/Action/ActionTeleport.cpp b/src/servers/sapphire_zone/Action/ActionTeleport.cpp index 968b174b..012107c4 100644 --- a/src/servers/sapphire_zone/Action/ActionTeleport.cpp +++ b/src/servers/sapphire_zone/Action/ActionTeleport.cpp @@ -86,7 +86,7 @@ void Core::Action::ActionTeleport::onFinish() pPlayer->setZoningType( ZoneingType::Teleport ); - auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pPlayer->getId(), 5 ); + auto effectPacket = std::make_shared< Server::EffectPacket >( getId(), pPlayer->getId(), 5 ); effectPacket->setRotation( Math::Util::floatToUInt16Rot( pPlayer->getRot() ) ); diff --git a/src/servers/sapphire_zone/Action/EventItemAction.cpp b/src/servers/sapphire_zone/Action/EventItemAction.cpp index 637d5573..4c4d96e7 100644 --- a/src/servers/sapphire_zone/Action/EventItemAction.cpp +++ b/src/servers/sapphire_zone/Action/EventItemAction.cpp @@ -71,7 +71,7 @@ void Core::Action::EventItemAction::onFinish() try { - auto effectPacket = boost::make_shared< Server::EffectPacket >( m_pSource->getId(), m_additional, m_id ); + auto effectPacket = std::make_shared< Server::EffectPacket >( m_pSource->getId(), m_additional, m_id ); effectPacket->setAnimationId( 1 ); effectPacket->setRotation( Math::Util::floatToUInt16Rot( m_pSource->getRot() ) ); diff --git a/src/servers/sapphire_zone/Actor/Actor.cpp b/src/servers/sapphire_zone/Actor/Actor.cpp index c6644876..5cac36f5 100644 --- a/src/servers/sapphire_zone/Actor/Actor.cpp +++ b/src/servers/sapphire_zone/Actor/Actor.cpp @@ -136,7 +136,7 @@ Core::Entity::CharaPtr Core::Entity::Actor::getAsChara() { if( !isChara() ) return nullptr; - return boost::dynamic_pointer_cast< Entity::Chara, Entity::Actor >( shared_from_this() ); + return std::dynamic_pointer_cast< Entity::Chara, Entity::Actor >( shared_from_this() ); } /*! \return pointer to this instance as PlayerPtr */ @@ -144,7 +144,7 @@ Core::Entity::PlayerPtr Core::Entity::Actor::getAsPlayer() { if( !isPlayer() ) return nullptr; - return boost::dynamic_pointer_cast< Entity::Player, Entity::Actor >( shared_from_this() ); + return std::dynamic_pointer_cast< Entity::Player, Entity::Actor >( shared_from_this() ); } /*! \return pointer to this instance as EventObjPtr */ @@ -152,7 +152,7 @@ Core::Entity::EventObjectPtr Core::Entity::Actor::getAsEventObj() { if( !isEventObj() ) return nullptr; - return boost::dynamic_pointer_cast< Entity::EventObject, Entity::Actor >( shared_from_this() ); + return std::dynamic_pointer_cast< Entity::EventObject, Entity::Actor >( shared_from_this() ); } /*! \return pointer to this instance as BNpcPtr */ @@ -160,7 +160,7 @@ Core::Entity::BNpcPtr Core::Entity::Actor::getAsBNpc() { if( !isBattleNpc() ) return nullptr; - return boost::dynamic_pointer_cast< Entity::BNpc, Entity::Actor >( shared_from_this() ); + return std::dynamic_pointer_cast< Entity::BNpc, Entity::Actor >( shared_from_this() ); } /*! diff --git a/src/servers/sapphire_zone/Actor/Actor.h b/src/servers/sapphire_zone/Actor/Actor.h index f57bdb03..fcc47a7b 100644 --- a/src/servers/sapphire_zone/Actor/Actor.h +++ b/src/servers/sapphire_zone/Actor/Actor.h @@ -2,7 +2,7 @@ #define _GAME_OBJECT_H_ #include -#include +#include #include "ForwardsZone.h" #include @@ -17,7 +17,7 @@ namespace Entity { \brief Base class for all actor/objects */ -class Actor : public boost::enable_shared_from_this< Actor > +class Actor : public std::enable_shared_from_this< Actor > { protected: diff --git a/src/servers/sapphire_zone/Actor/BNpc.cpp b/src/servers/sapphire_zone/Actor/BNpc.cpp index b712ac55..c3218505 100644 --- a/src/servers/sapphire_zone/Actor/BNpc.cpp +++ b/src/servers/sapphire_zone/Actor/BNpc.cpp @@ -117,5 +117,5 @@ uint32_t Core::Entity::BNpc::getBNpcNameId() const void Core::Entity::BNpc::spawn( PlayerPtr pTarget ) { - pTarget->queuePacket( boost::make_shared< NpcSpawnPacket >( *getAsBNpc(), *pTarget ) ); + pTarget->queuePacket( std::make_shared< NpcSpawnPacket >( *getAsBNpc(), *pTarget ) ); } diff --git a/src/servers/sapphire_zone/Actor/Chara.cpp b/src/servers/sapphire_zone/Actor/Chara.cpp index 7e3165c9..5b90a3cd 100644 --- a/src/servers/sapphire_zone/Actor/Chara.cpp +++ b/src/servers/sapphire_zone/Actor/Chara.cpp @@ -363,7 +363,7 @@ so players can have their own version and we can abolish the param. */ void Core::Entity::Chara::sendStatusUpdate( bool toSelf ) { - FFXIVPacketBasePtr packet = boost::make_shared< UpdateHpMpTpPacket >( *this ); + FFXIVPacketBasePtr packet = std::make_shared< UpdateHpMpTpPacket >( *this ); sendToInRangeSet( packet ); } @@ -402,7 +402,7 @@ void Core::Entity::Chara::autoAttack( CharaPtr pTarget ) uint16_t damage = static_cast< uint16_t >( 10 + rand() % 12 ); uint32_t variation = static_cast< uint32_t >( 0 + rand() % 4 ); - auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pTarget->getId(), 0x336 ); + auto effectPacket = std::make_shared< Server::EffectPacket >( getId(), pTarget->getId(), 0x336 ); effectPacket->setRotation( Math::Util::floatToUInt16Rot( getRot() ) ); Server::EffectEntry effectEntry{}; @@ -442,7 +442,7 @@ void Core::Entity::Chara::handleScriptSkill( uint32_t type, uint16_t actionId, u // Todo: Effect packet generator. 90% of this is basically setting params and it's basically unreadable. // Prepare packet. This is seemingly common for all packets in the action handler. - auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), target.getId(), actionId ); + auto effectPacket = std::make_shared< Server::EffectPacket >( getId(), target.getId(), actionId ); effectPacket->setRotation( Math::Util::floatToUInt16Rot( getRot() ) ); // Todo: for each actor, calculate how much damage the calculated value should deal to them - 2-step damage calc. we only have 1-step diff --git a/src/servers/sapphire_zone/Actor/Player.cpp b/src/servers/sapphire_zone/Actor/Player.cpp index e9b06529..f43be36e 100644 --- a/src/servers/sapphire_zone/Actor/Player.cpp +++ b/src/servers/sapphire_zone/Actor/Player.cpp @@ -369,14 +369,14 @@ void Core::Entity::Player::teleport( uint16_t aetheryteId, uint8_t type ) setZoningType( Common::ZoneingType::Return ); } - m_queuedZoneing = boost::make_shared< QueuedZoning >( data->territory, pos, Util::getTimeMs(), rot ); + m_queuedZoneing = std::make_shared< QueuedZoning >( data->territory, pos, Util::getTimeMs(), rot ); } void Core::Entity::Player::forceZoneing( uint32_t zoneId ) { - m_queuedZoneing = boost::make_shared< QueuedZoning >( zoneId, getPos(), Util::getTimeMs(), 0.f ); + m_queuedZoneing = std::make_shared< QueuedZoning >( zoneId, getPos(), Util::getTimeMs(), 0.f ); //performZoning( zoneId, Common::ZoneingType::None, getPos() ); } @@ -571,7 +571,7 @@ void Core::Entity::Player::changePosition( float x, float y, float z, float o ) pos.x = x; pos.y = y; pos.z = z; - m_queuedZoneing = boost::make_shared< QueuedZoning >( getZoneId(), pos, Util::getTimeMs(), o ); + m_queuedZoneing = std::make_shared< QueuedZoning >( getZoneId(), pos, Util::getTimeMs(), o ); } void Core::Entity::Player::learnAction( uint16_t actionId ) @@ -683,7 +683,7 @@ void Core::Entity::Player::gainLevel() void Core::Entity::Player::sendStatusUpdate( bool toSelf ) { - sendToInRangeSet( boost::make_shared< UpdateHpMpTpPacket >( *this ), true ); + sendToInRangeSet( std::make_shared< UpdateHpMpTpPacket >( *this ), true ); } uint8_t Core::Entity::Player::getLevel() const @@ -775,7 +775,7 @@ void Core::Entity::Player::setLevelForClass( uint8_t level, Common::ClassJob cla void Core::Entity::Player::sendModel() { - sendToInRangeSet( boost::make_shared< ModelEquipPacket >( *getAsPlayer() ), true ); + sendToInRangeSet( std::make_shared< ModelEquipPacket >( *getAsPlayer() ), true ); } uint32_t Core::Entity::Player::getModelForSlot( Common::GearModelSlot slot ) @@ -838,7 +838,7 @@ void Core::Entity::Player::spawn( Entity::PlayerPtr pTarget ) getName() + " for " + pTarget->getName() ); - pTarget->queuePacket( boost::make_shared< PlayerSpawnPacket >( *getAsPlayer(), *pTarget ) ); + pTarget->queuePacket( std::make_shared< PlayerSpawnPacket >( *getAsPlayer(), *pTarget ) ); } // despawn @@ -961,7 +961,7 @@ void Core::Entity::Player::setStateFlags( std::vector< Common::PlayerStateFlag > void Core::Entity::Player::sendStateFlags() { - queuePacket( boost::make_shared< PlayerStateFlagsPacket >( *getAsPlayer() ) ); + queuePacket( std::make_shared< PlayerStateFlagsPacket >( *getAsPlayer() ) ); } void Core::Entity::Player::unsetStateFlag( Common::PlayerStateFlag flag ) @@ -1259,17 +1259,17 @@ uint8_t Core::Entity::Player::getSearchSelectClass() const void Core::Entity::Player::sendNotice( const std::string& message ) //Purple Text { - queuePacket( boost::make_shared< ServerNoticePacket >( getId(), message ) ); + queuePacket( std::make_shared< ServerNoticePacket >( getId(), message ) ); } void Core::Entity::Player::sendUrgent( const std::string& message ) //Red Text { - queuePacket( boost::make_shared< ChatPacket >( *getAsPlayer(), ChatType::ServerUrgent, message ) ); + queuePacket( std::make_shared< ChatPacket >( *getAsPlayer(), ChatType::ServerUrgent, message ) ); } void Core::Entity::Player::sendDebug( const std::string& message ) //Grey Text { - queuePacket( boost::make_shared< ChatPacket >( *getAsPlayer(), ChatType::ServerDebug, message ) ); + queuePacket( std::make_shared< ChatPacket >( *getAsPlayer(), ChatType::ServerDebug, message ) ); } void Core::Entity::Player::updateHowtosSeen( uint32_t howToId ) @@ -1412,7 +1412,7 @@ void Core::Entity::Player::autoAttack( CharaPtr pTarget ) if( getClass() == ClassJob::Machinist || getClass() == ClassJob::Bard || getClass() == ClassJob::Archer ) { - auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pTarget->getId(), 8 ); + auto effectPacket = std::make_shared< Server::EffectPacket >( getId(), pTarget->getId(), 8 ); effectPacket->setRotation( Math::Util::floatToUInt16Rot( getRot() ) ); Server::EffectEntry entry; @@ -1426,7 +1426,7 @@ void Core::Entity::Player::autoAttack( CharaPtr pTarget ) } else { - auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pTarget->getId(), 7 ); + auto effectPacket = std::make_shared< Server::EffectPacket >( getId(), pTarget->getId(), 7 ); effectPacket->setRotation( Math::Util::floatToUInt16Rot( getRot() ) ); Server::EffectEntry entry; @@ -1546,7 +1546,7 @@ void Core::Entity::Player::sendZonePackets() } queuePacket( contentFinderList ); - queuePacket( boost::make_shared< InitUIPacket >( *this ) ); + queuePacket( std::make_shared< InitUIPacket >( *this ) ); auto classInfoPacket = makeZonePacket< FFXIVIpcPlayerClassInfo >( getId() ); classInfoPacket->data().classId = static_cast< uint8_t >( getClass() ); diff --git a/src/servers/sapphire_zone/Actor/Player.h b/src/servers/sapphire_zone/Actor/Player.h index bb17af0a..4f62b976 100644 --- a/src/servers/sapphire_zone/Actor/Player.h +++ b/src/servers/sapphire_zone/Actor/Player.h @@ -200,7 +200,7 @@ public: bool giveQuestRewards( uint32_t questId, uint32_t optionalChoice ); - boost::shared_ptr< Common::QuestActive > getQuestActive( uint16_t index ); + std::shared_ptr< Common::QuestActive > getQuestActive( uint16_t index ); uint8_t getQuestUI8A( uint16_t questId ); @@ -984,7 +984,7 @@ private: std::map< uint32_t, uint8_t > m_questIdToQuestIdx; // quest mapping, quest id to quest container index std::map< uint8_t, uint32_t > m_questIdxToQuestId; // quest mapping, quest container index to questId - boost::shared_ptr< Common::QuestActive > m_activeQuests[30]; + std::shared_ptr< Common::QuestActive > m_activeQuests[30]; int16_t m_questTracking[5]; uint8_t m_stateFlags[12]; @@ -1003,7 +1003,7 @@ private: bool m_bMarkedForZoning; bool m_bNewAdventurer; uint64_t m_onlineStatus; - boost::shared_ptr< QueuedZoning > m_queuedZoneing; + std::shared_ptr< QueuedZoning > m_queuedZoneing; // search info char m_searchMessage[193]; // searchmessage to show in profile diff --git a/src/servers/sapphire_zone/Actor/PlayerEvent.cpp b/src/servers/sapphire_zone/Actor/PlayerEvent.cpp index 44ceead9..d113fe5d 100644 --- a/src/servers/sapphire_zone/Actor/PlayerEvent.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerEvent.cpp @@ -84,7 +84,7 @@ void Core::Entity::Player::directorPlayScene( uint32_t eventId, uint32_t scene, pEvent->setPlayedScene( true ); pEvent->setEventReturnCallback( nullptr ); - auto eventPlay = boost::make_shared< DirectorPlayScenePacket >( getId(), getId(), pEvent->getId(), + auto eventPlay = std::make_shared< DirectorPlayScenePacket >( getId(), getId(), pEvent->getId(), scene, flags, eventParam3, eventParam4, eventParam5 ); queuePacket( eventPlay ); @@ -101,7 +101,7 @@ void Core::Entity::Player::eventStart( uint64_t actorId, uint32_t eventId, setStateFlag( PlayerStateFlag::InNpcEvent ); - auto eventStart = boost::make_shared< EventStartPacket >( getId(), actorId, eventId, + auto eventStart = std::make_shared< EventStartPacket >( getId(), actorId, eventId, eventType, eventParam1, eventParam2 ); queuePacket( eventStart ); @@ -188,7 +188,7 @@ void Core::Entity::Player::playScene( uint32_t eventId, uint32_t scene, pEvent->setPlayedScene( true ); pEvent->setEventReturnCallback( eventCallback ); pEvent->setSceneChainCallback( nullptr ); - auto eventPlay = boost::make_shared< EventPlayPacket >( getId(), pEvent->getActorId(), pEvent->getId(), + auto eventPlay = std::make_shared< EventPlayPacket >( getId(), pEvent->getActorId(), pEvent->getId(), scene, flags, eventParam2, eventParam3, eventParam4 ); queuePacket( eventPlay ); @@ -205,7 +205,7 @@ void Core::Entity::Player::playSceneChain( uint32_t eventId, uint32_t scene, uin pEvent->setPlayedScene( true ); pEvent->setSceneChainCallback( sceneChainCallback ); pEvent->setEventReturnCallback( nullptr ); - auto eventPlay = boost::make_shared< EventPlayPacket >( getId(), pEvent->getActorId(), pEvent->getId(), + auto eventPlay = std::make_shared< EventPlayPacket >( getId(), pEvent->getActorId(), pEvent->getId(), scene, flags, eventParam2, eventParam3, eventParam4 ); queuePacket( eventPlay ); @@ -245,7 +245,7 @@ void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer ) { case Event::EventHandler::Nest: { - queuePacket( boost::make_shared< EventFinishPacket >( getId(), pEvent->getId(), + queuePacket( std::make_shared< EventFinishPacket >( getId(), pEvent->getId(), pEvent->getEventType(), pEvent->getEventParam() ) ); removeEvent( pEvent->getId() ); @@ -257,7 +257,7 @@ void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer ) if( it.second->hasPlayedScene() == false ) { // TODO: not happy with this, this is also prone to break wit more than one remaining event in there - queuePacket( boost::make_shared< EventFinishPacket >( getId(), it.second->getId(), + queuePacket( std::make_shared< EventFinishPacket >( getId(), it.second->getId(), it.second->getEventType(), it.second->getEventParam() ) ); removeEvent( it.second->getId() ); @@ -268,7 +268,7 @@ void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer ) } default: { - queuePacket( boost::make_shared< EventFinishPacket >( getId(), pEvent->getId(), + queuePacket( std::make_shared< EventFinishPacket >( getId(), pEvent->getId(), pEvent->getEventType(), pEvent->getEventParam() ) ); break; } diff --git a/src/servers/sapphire_zone/Actor/PlayerInventory.cpp b/src/servers/sapphire_zone/Actor/PlayerInventory.cpp index 6589a9b1..aa4768f3 100644 --- a/src/servers/sapphire_zone/Actor/PlayerInventory.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerInventory.cpp @@ -276,7 +276,7 @@ void Core::Entity::Player::addCurrency( CurrencyType type, uint32_t amount ) updateContainer( Currency, slot, currItem ); - auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), + auto invUpdate = std::make_shared< UpdateInventorySlotPacket >( getId(), static_cast< uint8_t >( type ) - 1, Common::InventoryType::Currency, *currItem ); @@ -298,7 +298,7 @@ void Core::Entity::Player::removeCurrency( Common::CurrencyType type, uint32_t a currItem->setStackSize( currentAmount - amount ); writeItem( currItem ); - auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), + auto invUpdate = std::make_shared< UpdateInventorySlotPacket >( getId(), static_cast< uint8_t >( type ) - 1, Common::InventoryType::Currency, *currItem ); @@ -326,7 +326,7 @@ void Core::Entity::Player::addCrystal( Common::CrystalType type, uint32_t amount writeInventory( Crystal ); - auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), + auto invUpdate = std::make_shared< UpdateInventorySlotPacket >( getId(), static_cast< uint8_t >( type ) - 1, Common::InventoryType::Crystal, *currItem ); @@ -349,7 +349,7 @@ void Core::Entity::Player::removeCrystal( Common::CrystalType type, uint32_t amo writeItem( currItem ); - auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), + auto invUpdate = std::make_shared< UpdateInventorySlotPacket >( getId(), static_cast< uint8_t >( type ) - 1, Common::InventoryType::Crystal, *currItem ); @@ -595,7 +595,7 @@ Core::ItemPtr Core::Entity::Player::addItem( uint32_t catalogId, uint32_t quanti item->setStackSize( newStackSize ); writeItem( item ); - auto slotUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), slot, bag, *item ); + auto slotUpdate = std::make_shared< UpdateInventorySlotPacket >( getId(), slot, bag, *item ); queuePacket( slotUpdate ); // return existing stack if we have no overflow - items fit into a preexisting stack @@ -629,7 +629,7 @@ Core::ItemPtr Core::Entity::Player::addItem( uint32_t catalogId, uint32_t quanti if( !silent ) { - auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), freeBagSlot.second, freeBagSlot.first, + auto invUpdate = std::make_shared< UpdateInventorySlotPacket >( getId(), freeBagSlot.second, freeBagSlot.first, *item ); queuePacket( invUpdate ); diff --git a/src/servers/sapphire_zone/Actor/PlayerQuest.cpp b/src/servers/sapphire_zone/Actor/PlayerQuest.cpp index e193cb9e..94ef38c4 100644 --- a/src/servers/sapphire_zone/Actor/PlayerQuest.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerQuest.cpp @@ -59,7 +59,7 @@ void Core::Entity::Player::removeQuest( uint16_t questId ) m_questTracking[ ii ] = -1; } - boost::shared_ptr< QuestActive > pQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pQuest = m_activeQuests[ idx ]; m_activeQuests[ idx ].reset(); m_questIdToQuestIdx.erase( questId ); @@ -92,7 +92,7 @@ bool Core::Entity::Player::getQuestBitFlag8( uint16_t questId, uint8_t index ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; return pNewQuest->a.BitFlag8 & ( 1 << index ); } @@ -105,7 +105,7 @@ bool Core::Entity::Player::getQuestBitFlag16( uint16_t questId, uint8_t index ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; return pNewQuest->a.BitFlag16 & ( 1 << index ); } @@ -118,7 +118,7 @@ bool Core::Entity::Player::getQuestBitFlag24( uint16_t questId, uint8_t index ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; return pNewQuest->a.BitFlag24 & ( 1 << index ); } @@ -131,7 +131,7 @@ bool Core::Entity::Player::getQuestBitFlag32( uint16_t questId, uint8_t index ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; return pNewQuest->a.BitFlag32 & ( 1 << index ); } @@ -144,7 +144,7 @@ bool Core::Entity::Player::getQuestBitFlag40( uint16_t questId, uint8_t index ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; return pNewQuest->a.BitFlag40 & ( 1 << index ); } @@ -157,7 +157,7 @@ bool Core::Entity::Player::getQuestBitFlag48( uint16_t questId, uint8_t index ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; return pNewQuest->a.BitFlag48 & ( 1 << index ); } @@ -170,7 +170,7 @@ uint8_t Core::Entity::Player::getQuestUI8A( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->c.UI8A; } @@ -183,7 +183,7 @@ uint8_t Core::Entity::Player::getQuestUI8B( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->c.UI8B; } @@ -196,7 +196,7 @@ uint8_t Core::Entity::Player::getQuestUI8C( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->c.UI8C; } @@ -209,7 +209,7 @@ uint8_t Core::Entity::Player::getQuestUI8D( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->c.UI8D; } @@ -222,7 +222,7 @@ uint8_t Core::Entity::Player::getQuestUI8E( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->c.UI8E; } @@ -235,7 +235,7 @@ uint8_t Core::Entity::Player::getQuestUI8F( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->c.UI8F; } @@ -248,7 +248,7 @@ uint8_t Core::Entity::Player::getQuestUI8AH( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->b.UI8AH; } @@ -261,7 +261,7 @@ uint8_t Core::Entity::Player::getQuestUI8BH( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->b.UI8BH; } @@ -274,7 +274,7 @@ uint8_t Core::Entity::Player::getQuestUI8CH( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->b.UI8CH; } @@ -287,7 +287,7 @@ uint8_t Core::Entity::Player::getQuestUI8DH( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->b.UI8DH; } @@ -300,7 +300,7 @@ uint8_t Core::Entity::Player::getQuestUI8EH( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->b.UI8EH; } @@ -313,7 +313,7 @@ uint8_t Core::Entity::Player::getQuestUI8FH( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->b.UI8FH; } @@ -326,7 +326,7 @@ uint8_t Core::Entity::Player::getQuestUI8AL( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->b.UI8AL; } @@ -339,7 +339,7 @@ uint8_t Core::Entity::Player::getQuestUI8BL( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->b.UI8BL; } @@ -352,7 +352,7 @@ uint8_t Core::Entity::Player::getQuestUI8CL( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->b.UI8CL; } @@ -365,7 +365,7 @@ uint8_t Core::Entity::Player::getQuestUI8DL( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->b.UI8DL; } @@ -378,7 +378,7 @@ uint8_t Core::Entity::Player::getQuestUI8EL( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->b.UI8EL; } @@ -391,7 +391,7 @@ uint8_t Core::Entity::Player::getQuestUI8FL( uint16_t questId ) uint8_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; value = pNewQuest->b.UI8FL; } @@ -404,7 +404,7 @@ uint16_t Core::Entity::Player::getQuestUI16A( uint16_t questId ) uint16_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; // value = pNewQuest->d.UI16A; } @@ -417,7 +417,7 @@ uint16_t Core::Entity::Player::getQuestUI16B( uint16_t questId ) uint16_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; // value = pNewQuest->d.UI16B; } @@ -430,7 +430,7 @@ uint16_t Core::Entity::Player::getQuestUI16C( uint16_t questId ) uint16_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; // value = pNewQuest->d.UI16C; } @@ -443,7 +443,7 @@ uint32_t Core::Entity::Player::getQuestUI32A( uint16_t questId ) uint32_t value = 0; if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; // value = pNewQuest->e.UI32A; } @@ -456,7 +456,7 @@ void Core::Entity::Player::setQuestUI8A( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->c.UI8A = val; @@ -470,7 +470,7 @@ void Core::Entity::Player::setQuestUI8B( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->c.UI8B = val; @@ -484,7 +484,7 @@ void Core::Entity::Player::setQuestUI8C( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->c.UI8C = val; @@ -498,7 +498,7 @@ void Core::Entity::Player::setQuestUI8D( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->c.UI8D = val; @@ -512,7 +512,7 @@ void Core::Entity::Player::setQuestUI8E( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->c.UI8E = val; @@ -526,7 +526,7 @@ void Core::Entity::Player::setQuestUI8F( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->c.UI8F = val; @@ -540,7 +540,7 @@ void Core::Entity::Player::setQuestUI8AH( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->b.UI8AH = val; @@ -554,7 +554,7 @@ void Core::Entity::Player::setQuestUI8BH( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->b.UI8BH = val; @@ -568,7 +568,7 @@ void Core::Entity::Player::setQuestUI8CH( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->b.UI8CH = val; @@ -582,7 +582,7 @@ void Core::Entity::Player::setQuestUI8DH( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->b.UI8DH = val; @@ -596,7 +596,7 @@ void Core::Entity::Player::setQuestUI8EH( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->b.UI8EH = val; @@ -610,7 +610,7 @@ void Core::Entity::Player::setQuestUI8FH( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->b.UI8FH = val; @@ -624,7 +624,7 @@ void Core::Entity::Player::setQuestUI8AL( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->b.UI8AL = val; @@ -638,7 +638,7 @@ void Core::Entity::Player::setQuestUI8BL( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->b.UI8BL = val; @@ -652,7 +652,7 @@ void Core::Entity::Player::setQuestUI8CL( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->b.UI8CL = val; @@ -666,7 +666,7 @@ void Core::Entity::Player::setQuestUI8DL( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->b.UI8DL = val; @@ -680,7 +680,7 @@ void Core::Entity::Player::setQuestUI8EL( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->b.UI8EL = val; @@ -694,7 +694,7 @@ void Core::Entity::Player::setQuestUI8FL( uint16_t questId, uint8_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; pNewQuest->b.UI8FL = val; @@ -708,7 +708,7 @@ void Core::Entity::Player::setQuestUI16A( uint16_t questId, uint16_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; // pNewQuest->d.UI16A = val; @@ -722,7 +722,7 @@ void Core::Entity::Player::setQuestUI16B( uint16_t questId, uint16_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; // pNewQuest->d.UI16B = val; @@ -736,7 +736,7 @@ void Core::Entity::Player::setQuestUI16C( uint16_t questId, uint16_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; // pNewQuest->d.UI16C = val; @@ -750,7 +750,7 @@ void Core::Entity::Player::setQuestUI32A( uint16_t questId, uint32_t val ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; // pNewQuest->e.UI32A = val; @@ -764,7 +764,7 @@ void Core::Entity::Player::setQuestBitFlag8( uint16_t questId, uint8_t index, bo if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; if( val ) pNewQuest->a.BitFlag8 |= ( 1 << index ); @@ -781,7 +781,7 @@ void Core::Entity::Player::setQuestBitFlag16( uint16_t questId, uint8_t index, b if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; if( val ) pNewQuest->a.BitFlag16 |= ( 1 << index ); @@ -798,7 +798,7 @@ void Core::Entity::Player::setQuestBitFlag24( uint16_t questId, uint8_t index, b if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; if( val ) pNewQuest->a.BitFlag24 |= ( 1 << index ); @@ -815,7 +815,7 @@ void Core::Entity::Player::setQuestBitFlag32( uint16_t questId, uint8_t index, b if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; if( val ) pNewQuest->a.BitFlag32 |= ( 1 << index ); @@ -832,7 +832,7 @@ void Core::Entity::Player::setQuestBitFlag40( uint16_t questId, uint8_t index, b if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; if( val ) pNewQuest->a.BitFlag40 |= ( 1 << index ); @@ -849,7 +849,7 @@ void Core::Entity::Player::setQuestBitFlag48( uint16_t questId, uint8_t index, b if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; if( val ) pNewQuest->a.BitFlag48 |= ( 1 << index ); @@ -867,7 +867,7 @@ uint8_t Core::Entity::Player::getQuestSeq( uint16_t questId ) if( idx != -1 ) { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + std::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; return pNewQuest->c.sequence; } return 0; @@ -902,7 +902,7 @@ void Core::Entity::Player::updateQuest( uint16_t questId, uint8_t sequence ) if( !hasFreeSlot ) return; - boost::shared_ptr< QuestActive > pNewQuest( new QuestActive() ); + std::shared_ptr< QuestActive > pNewQuest( new QuestActive() ); pNewQuest->c.questId = questId; pNewQuest->c.sequence = sequence; pNewQuest->c.padding = 0; @@ -1003,7 +1003,7 @@ void Core::Entity::Player::sendQuestInfo() void Core::Entity::Player::sendQuestMessage( uint32_t questId, int8_t msgId, uint8_t type, uint32_t var1, uint32_t var2 ) { - queuePacket( boost::make_shared< QuestMessagePacket >( getAsPlayer(), questId, msgId, type, var1, var2 ) ); + queuePacket( std::make_shared< QuestMessagePacket >( getAsPlayer(), questId, msgId, type, var1, var2 ) ); } @@ -1076,7 +1076,7 @@ bool Core::Entity::Player::giveQuestRewards( uint32_t questId, uint32_t optional return true; } -boost::shared_ptr< QuestActive > Core::Entity::Player::getQuestActive( uint16_t index ) +std::shared_ptr< QuestActive > Core::Entity::Player::getQuestActive( uint16_t index ) { return m_activeQuests[ index ]; } diff --git a/src/servers/sapphire_zone/Actor/PlayerSql.cpp b/src/servers/sapphire_zone/Actor/PlayerSql.cpp index 1f98fa7b..40a006ba 100644 --- a/src/servers/sapphire_zone/Actor/PlayerSql.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerSql.cpp @@ -254,7 +254,7 @@ bool Core::Entity::Player::loadActiveQuests() auto slotId = res->getUInt8( 2 ); - boost::shared_ptr< QuestActive > pActiveQuest( new QuestActive() ); + std::shared_ptr< QuestActive > pActiveQuest( new QuestActive() ); pActiveQuest->c.questId = res->getUInt16( 3 ); pActiveQuest->c.sequence = res->getUInt8( 4 ); pActiveQuest->c.flags = res->getUInt8( 5 ); diff --git a/src/servers/sapphire_zone/DebugCommand/DebugCommand.h b/src/servers/sapphire_zone/DebugCommand/DebugCommand.h index da7a2dcf..98ead02c 100644 --- a/src/servers/sapphire_zone/DebugCommand/DebugCommand.h +++ b/src/servers/sapphire_zone/DebugCommand/DebugCommand.h @@ -13,7 +13,7 @@ class DebugCommand { public: - using pFunc = void ( DebugCommandHandler::* )( char*, Entity::Player&, boost::shared_ptr< DebugCommand > ); + using pFunc = void ( DebugCommandHandler::* )( char*, Entity::Player&, std::shared_ptr< DebugCommand > ); // String for the command std::string m_commandName; diff --git a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp index 13089f02..30455f68 100644 --- a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp +++ b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp @@ -71,7 +71,7 @@ Core::DebugCommandHandler::~DebugCommandHandler() void Core::DebugCommandHandler::registerCommand( const std::string& n, DebugCommand::pFunc functionPtr, const std::string& hText, uint8_t uLevel ) { - m_commandMap[ std::string( n ) ] = boost::make_shared< DebugCommand >( n, functionPtr, hText, uLevel ); + m_commandMap[ std::string( n ) ] = std::make_shared< DebugCommand >( n, functionPtr, hText, uLevel ); } // try to retrieve the command in question, execute if found @@ -79,7 +79,7 @@ void Core::DebugCommandHandler::execCommand( char* data, Entity::Player& player { // define callback pointer - void ( DebugCommandHandler::*pf )( char*, Entity::Player&, boost::shared_ptr< DebugCommand > ); + void ( DebugCommandHandler::*pf )( char*, Entity::Player&, std::shared_ptr< DebugCommand > ); std::string commandString; @@ -122,7 +122,7 @@ void Core::DebugCommandHandler::execCommand( char* data, Entity::Player& player // Definition of the commands /////////////////////////////////////////////////////////////////////////////////////// -void Core::DebugCommandHandler::help( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +void Core::DebugCommandHandler::help( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) { player.sendDebug( "Registered debug commands:" ); for( auto cmd : m_commandMap ) @@ -134,7 +134,7 @@ void Core::DebugCommandHandler::help( char* data, Entity::Player& player, boost: } } -void Core::DebugCommandHandler::set( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +void Core::DebugCommandHandler::set( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) { auto pLog = g_fw.get< Logger >(); auto pTerriMgr = g_fw.get< TerritoryMgr >(); @@ -232,7 +232,7 @@ void Core::DebugCommandHandler::set( char* data, Entity::Player& player, boost:: else if( subCommand == "discovery_reset" ) { player.resetDiscovery(); - player.queuePacket( boost::make_shared< InitUIPacket >( player ) ); + player.queuePacket( std::make_shared< InitUIPacket >( player ) ); } else if( subCommand == "classjob" ) { @@ -373,7 +373,7 @@ void Core::DebugCommandHandler::set( char* data, Entity::Player& player, boost:: } -void Core::DebugCommandHandler::add( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +void Core::DebugCommandHandler::add( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) { auto pLog = g_fw.get< Logger >(); std::string subCommand; @@ -428,7 +428,7 @@ void Core::DebugCommandHandler::add( char* data, Entity::Player& player, boost:: if( !bNpcTemplate ) player.sendNotice( "Template " + params + " not found in cache!" ); - auto pBNpc = boost::make_shared< Entity::BNpc >( bNpcTemplate, + auto pBNpc = std::make_shared< Entity::BNpc >( bNpcTemplate, player.getPos().x, player.getPos().y, player.getPos().z, 1 ); @@ -507,7 +507,7 @@ void Core::DebugCommandHandler::add( char* data, Entity::Player& player, boost:: } -void Core::DebugCommandHandler::get( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +void Core::DebugCommandHandler::get( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) { auto pLog = g_fw.get< Logger >(); auto pExdData = g_fw.get< Data::ExdDataGenerated >(); @@ -554,7 +554,7 @@ void Core::DebugCommandHandler::get( char* data, Entity::Player& player, boost:: } void -Core::DebugCommandHandler::injectPacket( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +Core::DebugCommandHandler::injectPacket( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) { auto pServerZone = g_fw.get< ServerZone >(); auto pSession = pServerZone->getSession( player.getId() ); @@ -563,7 +563,7 @@ Core::DebugCommandHandler::injectPacket( char* data, Entity::Player& player, boo } void Core::DebugCommandHandler::injectChatPacket( char* data, Entity::Player& player, - boost::shared_ptr< DebugCommand > command ) + std::shared_ptr< DebugCommand > command ) { auto pServerZone = g_fw.get< ServerZone >(); auto pSession = pServerZone->getSession( player.getId() ); @@ -571,7 +571,7 @@ void Core::DebugCommandHandler::injectChatPacket( char* data, Entity::Player& pl pSession->getChatConnection()->injectPacket( data + 8, player ); } -void Core::DebugCommandHandler::replay( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +void Core::DebugCommandHandler::replay( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) { auto pLog = g_fw.get< Logger >(); auto pServerZone = g_fw.get< ServerZone >(); @@ -623,7 +623,7 @@ void Core::DebugCommandHandler::replay( char* data, Entity::Player& player, boos } -void Core::DebugCommandHandler::nudge( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +void Core::DebugCommandHandler::nudge( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) { std::string subCommand; @@ -670,7 +670,7 @@ void Core::DebugCommandHandler::nudge( char* data, Entity::Player& player, boost } void -Core::DebugCommandHandler::serverInfo( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +Core::DebugCommandHandler::serverInfo( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) { auto pServerZone = g_fw.get< ServerZone >(); player.sendDebug( "SapphireZone " + Version::VERSION + "\nRev: " + Version::GIT_HASH ); @@ -678,7 +678,7 @@ Core::DebugCommandHandler::serverInfo( char* data, Entity::Player& player, boost player.sendDebug( "Sessions: " + std::to_string( pServerZone->getSessionCount() ) ); } -void Core::DebugCommandHandler::script( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +void Core::DebugCommandHandler::script( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) { auto pLog = g_fw.get< Logger >(); auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); @@ -768,7 +768,7 @@ void Core::DebugCommandHandler::script( char* data, Entity::Player& player, boos } void -Core::DebugCommandHandler::instance( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +Core::DebugCommandHandler::instance( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) { auto pTeriMgr = g_fw.get< TerritoryMgr >(); std::string cmd( data ), params, subCommand; @@ -875,7 +875,7 @@ Core::DebugCommandHandler::instance( char* data, Entity::Player& player, boost:: sscanf( params.c_str(), "%d %d", &index, &value ); - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); if( !instance ) return; @@ -888,7 +888,7 @@ Core::DebugCommandHandler::instance( char* data, Entity::Player& player, boost:: sscanf( params.c_str(), "%s %hhu", objName, &state ); - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); if( !instance ) return; @@ -906,7 +906,7 @@ Core::DebugCommandHandler::instance( char* data, Entity::Player& player, boost:: sscanf( params.c_str(), "%s %i %i", objName, &state1, &state2 ); - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); if( !instance ) return; @@ -925,7 +925,7 @@ Core::DebugCommandHandler::instance( char* data, Entity::Player& player, boost:: sscanf( params.c_str(), "%hhu", &seq ); - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); if( !instance ) return; @@ -937,7 +937,7 @@ Core::DebugCommandHandler::instance( char* data, Entity::Player& player, boost:: sscanf( params.c_str(), "%hhu", &branch ); - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); if( !instance ) return; @@ -945,7 +945,7 @@ Core::DebugCommandHandler::instance( char* data, Entity::Player& player, boost:: } else if( subCommand == "qte_start" ) { - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); if( !instance ) return; @@ -954,7 +954,7 @@ Core::DebugCommandHandler::instance( char* data, Entity::Player& player, boost:: } else if( subCommand == "event_start" ) { - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); if( !instance ) return; @@ -963,7 +963,7 @@ Core::DebugCommandHandler::instance( char* data, Entity::Player& player, boost:: } else if( subCommand == "event_end" ) { - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + auto instance = std::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); if( !instance ) return; diff --git a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.h b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.h index 1cc6c72f..d7894646 100644 --- a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.h +++ b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.h @@ -15,7 +15,7 @@ class DebugCommandHandler { private: // container mapping command string to command object - std::map< std::string, boost::shared_ptr< DebugCommand > > m_commandMap; + std::map< std::string, std::shared_ptr< DebugCommand > > m_commandMap; public: DebugCommandHandler(); @@ -29,31 +29,31 @@ public: void execCommand( char* data, Entity::Player& player ); // help command - void help( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void help( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ); // command handler callbacks - void set( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void set( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ); - void get( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void get( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ); - void add( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); - //void debug( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void add( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ); + //void debug( char * data, Entity::Player& player, std::shared_ptr< DebugCommand > command ); - void injectPacket( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void injectPacket( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ); - void injectChatPacket( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void injectChatPacket( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ); - void replay( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void replay( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ); - void nudge( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void nudge( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ); - void serverInfo( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void serverInfo( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ); - void unlockCharacter( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void unlockCharacter( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ); - void instance( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void instance( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ); - void script( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void script( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ); }; diff --git a/src/servers/sapphire_zone/ForwardsZone.h b/src/servers/sapphire_zone/ForwardsZone.h index 64356f45..95c22a84 100644 --- a/src/servers/sapphire_zone/ForwardsZone.h +++ b/src/servers/sapphire_zone/ForwardsZone.h @@ -2,19 +2,17 @@ #define _FORWARDS_H #include -#include #include -#include #include #include "Common.h" #define TYPE_FORWARD( x ) \ class x; \ -typedef boost::shared_ptr< x > x ## Ptr; \ +typedef std::shared_ptr< x > x ## Ptr; \ typedef std::unique_ptr< x > x ## UPtr; \ template< typename...Args > \ x ## Ptr make_ ## x( Args &&...args ) { \ -return boost::make_shared< x >( std::forward< Args >( args ) ... ); }\ +return std::make_shared< x >( std::forward< Args >( args ) ... ); }\ typedef std::vector< x > x ## PtrList; namespace Core { diff --git a/src/servers/sapphire_zone/Linkshell/LinkshellMgr.cpp b/src/servers/sapphire_zone/Linkshell/LinkshellMgr.cpp index 53272bb8..10882952 100644 --- a/src/servers/sapphire_zone/Linkshell/LinkshellMgr.cpp +++ b/src/servers/sapphire_zone/Linkshell/LinkshellMgr.cpp @@ -53,7 +53,7 @@ bool Core::LinkshellMgr::loadLinkshells() invitesBin = res->getBlobVector( 6 ); func( members, invitesBin ); - auto lsPtr = boost::make_shared< Linkshell >( linkshellId, name, masterId, members, leaders, invites ); + auto lsPtr = std::make_shared< Linkshell >( linkshellId, name, masterId, members, leaders, invites ); m_linkshellIdMap[ linkshellId ] = lsPtr; m_linkshellNameMap[ name ] = lsPtr; diff --git a/src/servers/sapphire_zone/Linkshell/LinkshellMgr.h b/src/servers/sapphire_zone/Linkshell/LinkshellMgr.h index 63e8c299..f9fba3da 100644 --- a/src/servers/sapphire_zone/Linkshell/LinkshellMgr.h +++ b/src/servers/sapphire_zone/Linkshell/LinkshellMgr.h @@ -1,13 +1,13 @@ #ifndef CORE_LINKSHELLMGR_H #define CORE_LINKSHELLMGR_H -#include +#include #include namespace Core { class Linkshell; -using LinkshellPtr = boost::shared_ptr< Linkshell >; +using LinkshellPtr = std::shared_ptr< Linkshell >; class LinkshellMgr { diff --git a/src/servers/sapphire_zone/Network/GameConnection.cpp b/src/servers/sapphire_zone/Network/GameConnection.cpp index 1acf1ac3..c04b2de2 100644 --- a/src/servers/sapphire_zone/Network/GameConnection.cpp +++ b/src/servers/sapphire_zone/Network/GameConnection.cpp @@ -402,7 +402,7 @@ void Core::Network::GameConnection::handlePackets( const Core::Network::Packets: { char* id = ( char* ) &( inPacket.data[ 4 ] ); uint32_t playerId = std::stoi( id ); - auto pCon = boost::static_pointer_cast< GameConnection, Connection >( shared_from_this() ); + auto pCon = std::static_pointer_cast< GameConnection, Connection >( shared_from_this() ); // try to retrieve the session for this id auto session = pServerZone->getSession( playerId ); @@ -430,7 +430,7 @@ void Core::Network::GameConnection::handlePackets( const Core::Network::Packets: if( !m_pSession && session ) m_pSession = session; - auto pe = boost::make_shared< FFXIVRawPacket >( 0x07, 0x18, 0, 0 ); + auto pe = std::make_shared< FFXIVRawPacket >( 0x07, 0x18, 0, 0 ); *( unsigned int* ) ( &pe->data()[ 0 ] ) = 0xE0037603; *( unsigned int* ) ( &pe->data()[ 4 ] ) = static_cast< uint32_t >( time( nullptr ) ); sendSinglePacket( pe ); @@ -438,7 +438,7 @@ void Core::Network::GameConnection::handlePackets( const Core::Network::Packets: // main connection, assinging it to the session if( ipcHeader.connectionType == ConnectionType::Zone ) { - auto pe1 = boost::make_shared< FFXIVRawPacket >( 0x02, 0x38, 0, 0 ); + auto pe1 = std::make_shared< FFXIVRawPacket >( 0x02, 0x38, 0, 0 ); *( unsigned int* ) ( &pe1->data()[ 0 ] ) = playerId; sendSinglePacket( pe1 ); pLog->info( "[" + std::string( id ) + "] Setting session for zone connection" ); @@ -447,11 +447,11 @@ void Core::Network::GameConnection::handlePackets( const Core::Network::Packets: // chat connection, assinging it to the session else if( ipcHeader.connectionType == ConnectionType::Chat ) { - auto pe2 = boost::make_shared< FFXIVRawPacket >( 0x02, 0x38, 0, 0 ); + auto pe2 = std::make_shared< FFXIVRawPacket >( 0x02, 0x38, 0, 0 ); *( unsigned int* ) ( &pe2->data()[ 0 ] ) = playerId; sendSinglePacket( pe2 ); - auto pe3 = boost::make_shared< FFXIVRawPacket >( 0x03, 0x28, playerId, playerId ); + auto pe3 = std::make_shared< FFXIVRawPacket >( 0x03, 0x28, playerId, playerId ); *( unsigned short* ) ( &pe3->data()[ 2 ] ) = 0x02; sendSinglePacket( pe3 ); @@ -472,7 +472,7 @@ void Core::Network::GameConnection::handlePackets( const Core::Network::Packets: uint32_t id = *( uint32_t* ) &inPacket.data[ 0 ]; uint32_t timeStamp = *( uint32_t* ) &inPacket.data[ 4 ]; - auto pe4 = boost::make_shared< FFXIVRawPacket >( 0x08, 0x18, 0, 0 ); + auto pe4 = std::make_shared< FFXIVRawPacket >( 0x08, 0x18, 0, 0 ); *( unsigned int* ) ( &pe4->data()[ 0 ] ) = id; *( unsigned int* ) ( &pe4->data()[ 4 ] ) = timeStamp; sendSinglePacket( pe4 ); diff --git a/src/servers/sapphire_zone/Network/Handlers/ClientTriggerHandler.cpp b/src/servers/sapphire_zone/Network/Handlers/ClientTriggerHandler.cpp index d9e76d73..943ca926 100644 --- a/src/servers/sapphire_zone/Network/Handlers/ClientTriggerHandler.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/ClientTriggerHandler.cpp @@ -59,7 +59,7 @@ void examineHandler( Core::Entity::Player& player, uint32_t targetId ) } else { - player.queuePacket( boost::make_shared< ExaminePacket >( player, pTarget ) ); + player.queuePacket( std::make_shared< ExaminePacket >( player, pTarget ) ); } } } diff --git a/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp index 49ecec27..d1c46fab 100644 --- a/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp @@ -421,7 +421,7 @@ void Core::Network::GameConnection::gm1Handler( const Packets::FFXIVARR_PACKET_R case GmCommand::Wireframe: { player.queuePacket( - boost::make_shared< ActorControlPacket143 >( player.getId(), ActorControlType::ToggleWireframeRendering ) ); + std::make_shared< ActorControlPacket143 >( player.getId(), ActorControlType::ToggleWireframeRendering ) ); player.sendNotice( "Wireframe Rendering for " + player.getName() + " was toggled" ); break; } diff --git a/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp index 03089004..6e9f5475 100644 --- a/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp @@ -297,7 +297,7 @@ void Core::Network::GameConnection::updatePositionHandler( const Core::Network:: player.m_lastMoveTime = currentTime; player.m_lastMoveflag = moveState; - auto movePacket = boost::make_shared< MoveActorPacket >( player, unk1, unk2, moveState, unk4 ); + auto movePacket = std::make_shared< MoveActorPacket >( player, unk1, unk2, moveState, unk4 ); player.sendToInRangeSet( movePacket ); } @@ -426,7 +426,7 @@ void Core::Network::GameConnection::pingHandler( const Core::Network::Packets::F { const auto packet = ZoneChannelPacket< Client::FFXIVIpcPingHandler >( inPacket ); - queueOutPacket( boost::make_shared< Server::PingPacket >( player, packet.data().timestamp ) ); + queueOutPacket( std::make_shared< Server::PingPacket >( player, packet.data().timestamp ) ); player.setLastPing( static_cast< uint32_t >( time( nullptr ) ) ); } @@ -529,7 +529,7 @@ void Core::Network::GameConnection::chatHandler( const Core::Network::Packets::F auto chatType = packet.data().chatType; //ToDo, need to implement sending GM chat types. - auto chatPacket = boost::make_shared< Server::ChatPacket >( player, chatType, packet.data().message ); + auto chatPacket = std::make_shared< Server::ChatPacket >( player, chatType, packet.data().message ); switch( chatType ) { diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket142.h b/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket142.h index 6feca68e..36e195fe 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket142.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket142.h @@ -42,9 +42,9 @@ private: }; template< typename... Args > -boost::shared_ptr< ActorControlPacket142 > makeActorControl142( Args... args ) +std::shared_ptr< ActorControlPacket142 > makeActorControl142( Args... args ) { - return boost::make_shared< ActorControlPacket142 >( args... ); + return std::make_shared< ActorControlPacket142 >( args... ); } } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket143.h b/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket143.h index 9d7be33b..3c306e6a 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket143.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket143.h @@ -46,9 +46,9 @@ private: }; template< typename... Args > -boost::shared_ptr< ActorControlPacket143 > makeActorControl143( Args... args ) +std::shared_ptr< ActorControlPacket143 > makeActorControl143( Args... args ) { - return boost::make_shared< ActorControlPacket143 >( args... ); + return std::make_shared< ActorControlPacket143 >( args... ); } } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket144.h b/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket144.h index 9696e2e5..00673945 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket144.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket144.h @@ -44,9 +44,9 @@ private: }; template< typename... Args > -boost::shared_ptr< ActorControlPacket144 > makeActorControl144( Args... args ) +std::shared_ptr< ActorControlPacket144 > makeActorControl144( Args... args ) { - return boost::make_shared< ActorControlPacket144 >( args... ); + return std::make_shared< ActorControlPacket144 >( args... ); } } diff --git a/src/servers/sapphire_zone/Script/NativeScriptMgr.cpp b/src/servers/sapphire_zone/Script/NativeScriptMgr.cpp index f6bb65c5..2f39a3a7 100644 --- a/src/servers/sapphire_zone/Script/NativeScriptMgr.cpp +++ b/src/servers/sapphire_zone/Script/NativeScriptMgr.cpp @@ -118,9 +118,9 @@ bool NativeScriptMgr::isModuleLoaded( const std::string& name ) } -boost::shared_ptr< NativeScriptMgr > createNativeScriptMgr() +std::shared_ptr< NativeScriptMgr > createNativeScriptMgr() { - return boost::make_shared< NativeScriptMgr >(); + return std::make_shared< NativeScriptMgr >(); } } } diff --git a/src/servers/sapphire_zone/Script/NativeScriptMgr.h b/src/servers/sapphire_zone/Script/NativeScriptMgr.h index a4d3f6f0..9652ff8f 100644 --- a/src/servers/sapphire_zone/Script/NativeScriptMgr.h +++ b/src/servers/sapphire_zone/Script/NativeScriptMgr.h @@ -127,7 +127,7 @@ public: * * @return a boost::shared_ptr to NativeScriptMgr */ -boost::shared_ptr< NativeScriptMgr > createNativeScriptMgr(); +std::shared_ptr< NativeScriptMgr > createNativeScriptMgr(); } } diff --git a/src/servers/sapphire_zone/Script/ScriptMgr.h b/src/servers/sapphire_zone/Script/ScriptMgr.h index 885a7221..112843f6 100644 --- a/src/servers/sapphire_zone/Script/ScriptMgr.h +++ b/src/servers/sapphire_zone/Script/ScriptMgr.h @@ -1,7 +1,7 @@ #ifndef _ScriptMgr_H_ #define _ScriptMgr_H_ -#include +#include #include #include @@ -17,7 +17,7 @@ private: /*! * @brief A shared ptr to NativeScriptMgr, used for accessing and managing the native script system. */ - boost::shared_ptr< NativeScriptMgr > m_nativeScriptMgr; + std::shared_ptr< NativeScriptMgr > m_nativeScriptMgr; std::function< std::string( Entity::Player & ) > m_onFirstEnterWorld; diff --git a/src/servers/sapphire_zone/ServerZone.cpp b/src/servers/sapphire_zone/ServerZone.cpp index ac9658c4..37443b39 100644 --- a/src/servers/sapphire_zone/ServerZone.cpp +++ b/src/servers/sapphire_zone/ServerZone.cpp @@ -308,7 +308,7 @@ bool Core::ServerZone::createSession( uint32_t sessionId ) pLog->info( "[" + session_id_str + "] Creating new session" ); - boost::shared_ptr< Session > newSession( new Session( sessionId ) ); + std::shared_ptr< Session > newSession( new Session( sessionId ) ); m_sessionMapById[ sessionId ] = newSession; if( !newSession->loadPlayer() ) @@ -393,7 +393,7 @@ void Core::ServerZone::loadBNpcTemplates() auto look = res->getBlobVector( 12 ); auto models = res->getBlobVector( 13 ); - auto bnpcTemplate = boost::make_shared< Entity::BNpcTemplate >( + auto bnpcTemplate = std::make_shared< Entity::BNpcTemplate >( id, bNPCBaseId, bNPCNameId, mainWeaponModel, secWeaponModel, aggressionMode, enemyType, 0, pose, modelChara, displayFlags, reinterpret_cast< uint32_t* >( &models[ 0 ] ), diff --git a/src/servers/sapphire_zone/Session.h b/src/servers/sapphire_zone/Session.h index 6cd0027d..6be6ef82 100644 --- a/src/servers/sapphire_zone/Session.h +++ b/src/servers/sapphire_zone/Session.h @@ -1,15 +1,14 @@ #ifndef _SESSION_H_ #define _SESSION_H_ -#include -#include +#include #include "ForwardsZone.h" namespace Core { class Session : - public boost::enable_shared_from_this< Session > + public std::enable_shared_from_this< Session > { public: Session( uint32_t sessionId ); diff --git a/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp b/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp index 773a00b9..502cc106 100644 --- a/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp +++ b/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp @@ -267,7 +267,7 @@ bool Core::TerritoryMgr::removeTerritoryInstance( uint32_t instanceId ) if( isInstanceContentTerritory( pZone->getTerritoryId() ) ) { - auto instance = boost::dynamic_pointer_cast< InstanceContent >( pZone ); + auto instance = std::dynamic_pointer_cast< InstanceContent >( pZone ); m_instanceContentToInstanceMap[ instance->getInstanceContentId() ].erase( pZone->getGuId() ); } else diff --git a/src/servers/sapphire_zone/Zone/Zone.cpp b/src/servers/sapphire_zone/Zone/Zone.cpp index 259d84ba..e1fec325 100644 --- a/src/servers/sapphire_zone/Zone/Zone.cpp +++ b/src/servers/sapphire_zone/Zone/Zone.cpp @@ -719,7 +719,7 @@ Core::Entity::EventObjectPtr Core::Zone::getEObj( uint32_t objId ) Core::InstanceContentPtr Core::Zone::getAsInstanceContent() { - return boost::dynamic_pointer_cast< InstanceContent, Zone >( shared_from_this() ); + return std::dynamic_pointer_cast< InstanceContent, Zone >( shared_from_this() ); } uint32_t Core::Zone::getNextEObjId() diff --git a/src/servers/sapphire_zone/Zone/Zone.h b/src/servers/sapphire_zone/Zone/Zone.h index e903871e..ddc1e57b 100644 --- a/src/servers/sapphire_zone/Zone/Zone.h +++ b/src/servers/sapphire_zone/Zone/Zone.h @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include @@ -31,7 +31,7 @@ struct TerritoryType; } class Zone : - public CellHandler< Cell >, public boost::enable_shared_from_this< Zone > + public CellHandler< Cell >, public std::enable_shared_from_this< Zone > { protected: uint32_t m_territoryId; diff --git a/src/servers/sapphire_zone/mainGameServer.cpp b/src/servers/sapphire_zone/mainGameServer.cpp index 5637307f..a06a801f 100644 --- a/src/servers/sapphire_zone/mainGameServer.cpp +++ b/src/servers/sapphire_zone/mainGameServer.cpp @@ -19,15 +19,15 @@ using namespace Core; bool setupFramework() { - auto pServer = boost::make_shared< ServerZone >( "zone.ini" ); - auto pLogger = boost::make_shared< Logger >(); - auto pExdData = boost::make_shared< Data::ExdDataGenerated >(); - auto pScript = boost::make_shared< Scripting::ScriptMgr >(); - auto pDb = boost::make_shared< Db::DbWorkerPool< Db::ZoneDbConnection > >(); - auto pLsMgr = boost::make_shared< LinkshellMgr >(); - auto pTeriMgr = boost::make_shared< TerritoryMgr >(); - auto pDebugCom = boost::make_shared< DebugCommandHandler >(); - auto pConfig = boost::make_shared< ConfigMgr >(); + auto pServer = std::make_shared< ServerZone >( "zone.ini" ); + auto pLogger = std::make_shared< Logger >(); + auto pExdData = std::make_shared< Data::ExdDataGenerated >(); + auto pScript = std::make_shared< Scripting::ScriptMgr >(); + auto pDb = std::make_shared< Db::DbWorkerPool< Db::ZoneDbConnection > >(); + auto pLsMgr = std::make_shared< LinkshellMgr >(); + auto pTeriMgr = std::make_shared< TerritoryMgr >(); + auto pDebugCom = std::make_shared< DebugCommandHandler >(); + auto pConfig = std::make_shared< ConfigMgr >(); pLogger->setLogPath( "log/SapphireZone_" ); pLogger->init();