mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-25 11:07:45 +00:00
remove the old hacky workaround
This commit is contained in:
parent
ff6fe62da4
commit
0f91c9e134
7 changed files with 6 additions and 43 deletions
|
@ -108,8 +108,7 @@ public:
|
|||
|
||||
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||
{
|
||||
//auto& exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref();
|
||||
auto& exdData = *reinterpret_cast< Sapphire::Data::ExdDataGenerated* >( player.getExdData() );
|
||||
auto& exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref();
|
||||
|
||||
auto aetherInfo = exdData.get< Sapphire::Data::Aetheryte >( eventId & 0xFFFF );
|
||||
if( !aetherInfo )
|
||||
|
|
|
@ -21,8 +21,7 @@ public:
|
|||
{
|
||||
player.playScene( eventId, 0, HIDE_HOTBAR | NO_DEFAULT_CAMERA, [this, eventId]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
//auto& exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref();
|
||||
auto& exdData = *reinterpret_cast< Sapphire::Data::ExdDataGenerated* >( player.getExdData() );
|
||||
auto& exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref();
|
||||
|
||||
auto housingZone = std::dynamic_pointer_cast< HousingZone >( player.getCurrentTerritory() );
|
||||
if( !housingZone )
|
||||
|
@ -41,8 +40,7 @@ public:
|
|||
// moving a player inside an event will crash the game so we end it here
|
||||
player.eventFinish( eventId, 1 );
|
||||
|
||||
//auto& playerMgr = Common::Service< Sapphire::World::Manager::PlayerMgr >::ref();
|
||||
auto& playerMgr = *reinterpret_cast< Sapphire::World::Manager::PlayerMgr* >( player.getPlayerMgr() );
|
||||
auto& playerMgr = Common::Service< Sapphire::World::Manager::PlayerMgr >::ref();
|
||||
playerMgr.movePlayerToLandDestination( player, pHousingAethernet->level, housingZone->getWardNum() );
|
||||
} );
|
||||
}
|
||||
|
|
|
@ -26,8 +26,7 @@ public:
|
|||
if( result.param2 != 1 )
|
||||
return;
|
||||
|
||||
//auto& terriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto& terriMgr = *reinterpret_cast< Sapphire::World::Manager::TerritoryMgr* >( player.getTerritoryMgr() );
|
||||
auto& terriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
|
||||
auto zone = std::dynamic_pointer_cast< HousingZone >( player.getCurrentTerritory() );
|
||||
if( !zone )
|
||||
|
|
|
@ -142,8 +142,7 @@ class ManFst005 : public Sapphire::ScriptAPI::EventScript
|
|||
{
|
||||
if( result.param2 == 1 )
|
||||
{
|
||||
//auto& pTeriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto& pTeriMgr = *reinterpret_cast< Sapphire::World::Manager::TerritoryMgr* >( player.getTerritoryMgr() );
|
||||
auto& pTeriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
|
||||
player.eventFinish( result.eventId, 0 );
|
||||
pTeriMgr.createAndJoinQuestBattle( player, Questbattle0 );
|
||||
|
|
|
@ -2762,31 +2762,6 @@ bool Sapphire::Entity::Player::gaugeSamHasAnySen()
|
|||
return static_cast< uint8_t >( m_gauge.sam.sen ) > 0;
|
||||
}
|
||||
|
||||
void* Sapphire::Entity::Player::getEventMgr()
|
||||
{
|
||||
return &Common::Service< Sapphire::World::Manager::EventMgr >::ref();
|
||||
}
|
||||
|
||||
void* Sapphire::Entity::Player::getExdData()
|
||||
{
|
||||
return &Common::Service< Data::ExdDataGenerated >::ref();
|
||||
}
|
||||
|
||||
void* Sapphire::Entity::Player::getPlayerMgr()
|
||||
{
|
||||
return &Common::Service< Sapphire::World::Manager::PlayerMgr >::ref();
|
||||
}
|
||||
|
||||
void* Sapphire::Entity::Player::getInstanceObjectCache()
|
||||
{
|
||||
return &Common::Service< Sapphire::InstanceObjectCache >::ref();
|
||||
}
|
||||
|
||||
void* Sapphire::Entity::Player::getTerritoryMgr()
|
||||
{
|
||||
return &Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
}
|
||||
|
||||
void Sapphire::Entity::Player::setPosAndSendActorMove( float x, float y, float z, float rot )
|
||||
{
|
||||
setRot( rot );
|
||||
|
|
|
@ -1052,12 +1052,6 @@ namespace Sapphire::Entity
|
|||
TerritoryPtr getOrCreatePrivateInstance( uint32_t zoneId );
|
||||
bool enterPredefinedPrivateInstance( uint32_t zoneId );
|
||||
|
||||
void* getEventMgr();
|
||||
void* getExdData();
|
||||
void* getPlayerMgr();
|
||||
void* getInstanceObjectCache();
|
||||
void* getTerritoryMgr();
|
||||
|
||||
Common::HuntingLogEntry& getHuntingLogEntry( uint8_t index );
|
||||
|
||||
void sendHuntingLog();
|
||||
|
|
|
@ -16,8 +16,7 @@ using namespace Sapphire::World::Manager;
|
|||
void Sapphire::World::Manager::PlayerMgr::movePlayerToLandDestination( Sapphire::Entity::Player& player, uint32_t landId, uint16_t param )
|
||||
{
|
||||
// check if we have one in the db first
|
||||
//auto& terriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& terriMgr = *reinterpret_cast< Sapphire::World::Manager::TerritoryMgr* >( player.getTerritoryMgr() );
|
||||
auto& terriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
|
||||
Sapphire::TerritoryPtr destinationZone;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue