diff --git a/src/scripts/common/eobj/InstanceExit.cpp b/src/scripts/common/eobj/InstanceExit.cpp index fae2b0de..d95d5cd2 100644 --- a/src/scripts/common/eobj/InstanceExit.cpp +++ b/src/scripts/common/eobj/InstanceExit.cpp @@ -26,7 +26,7 @@ public: eventMgr().playScene( player, eventId, 1, 0, [this, eobj]( Entity::Player& player, const Event::SceneResult& result ) { if( result.getResult( 0 ) != 1 ) - player.exitInstance(); + playerMgr().onExitInstance( player ); } ); } }; diff --git a/src/scripts/quest/ManFst407.cpp b/src/scripts/quest/ManFst407.cpp index 0eb4c376..59f77027 100644 --- a/src/scripts/quest/ManFst407.cpp +++ b/src/scripts/quest/ManFst407.cpp @@ -823,7 +823,7 @@ private: quest.setSeq( Seq6 ); eventMgr().sendEventNotice( player, getId(), 4, 0 ); playerMgr().sendUrgent( player, "QuestBattle Unimplemented, skipping..." ); - player.exitInstance(); + playerMgr().onExitInstance( player ); travelToPoprange( player, Poprange3, false ); } diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index 53cb131f..b43f09f5 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -397,18 +397,6 @@ bool Player::isAutoattackOn() const return m_bAutoattack; } -bool Player::exitInstance() -{ - auto& warpMgr = Common::Service< WarpMgr >::ref(); - - resetHp(); - resetMp(); - - warpMgr.requestMoveTerritory( *this, WarpType::WARP_TYPE_CONTENT_END_RETURN, getPrevTerritoryId(), getPrevPos(), getPrevRot() ); - - return true; -} - uint32_t Player::getPlayTime() const { return m_playTime; diff --git a/src/world/Actor/Player.h b/src/world/Actor/Player.h index fcb18903..a934907b 100644 --- a/src/world/Actor/Player.h +++ b/src/world/Actor/Player.h @@ -294,9 +294,6 @@ namespace Sapphire::Entity /*! return current online status depending on current state / activity */ Common::OnlineStatus getOnlineStatus() const; - /*! returns the player to their position before zoning into an instance */ - bool exitInstance(); - /*! gets the players territoryTypeId */ uint32_t getPrevTerritoryTypeId() const; diff --git a/src/world/Manager/DebugCommandMgr.cpp b/src/world/Manager/DebugCommandMgr.cpp index ec8d09e5..f5b8eae3 100644 --- a/src/world/Manager/DebugCommandMgr.cpp +++ b/src/world/Manager/DebugCommandMgr.cpp @@ -923,7 +923,7 @@ void DebugCommandMgr::instance( char* data, Entity::Player& player, std::shared_ } else if( subCommand == "return" || subCommand == "ret" ) { - player.exitInstance(); + playerMgr().onExitInstance( player ); } else if( subCommand == "stringendomode" || subCommand == "sm" ) { @@ -1165,7 +1165,7 @@ void DebugCommandMgr::questBattle( char* data, Entity::Player& player, std::shar } else if( subCommand == "return" || subCommand == "ret" ) { - player.exitInstance(); + playerMgr().onExitInstance( player ); } else if( subCommand == "set" ) { diff --git a/src/world/Manager/PlayerMgr.cpp b/src/world/Manager/PlayerMgr.cpp index 837b4e51..b8a60bc2 100644 --- a/src/world/Manager/PlayerMgr.cpp +++ b/src/world/Manager/PlayerMgr.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include