From d10347bfffac15373601583eb367829001803324 Mon Sep 17 00:00:00 2001 From: collett Date: Sun, 12 Apr 2020 23:54:34 +0900 Subject: [PATCH] hack to get aetheryte working again until the service is fixed. --- src/scripts/common/aethernet/Aetheryte.cpp | 3 ++- src/world/Actor/Player.cpp | 5 +++++ src/world/Actor/Player.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/scripts/common/aethernet/Aetheryte.cpp b/src/scripts/common/aethernet/Aetheryte.cpp index 64acd0c5..a125affe 100644 --- a/src/scripts/common/aethernet/Aetheryte.cpp +++ b/src/scripts/common/aethernet/Aetheryte.cpp @@ -108,7 +108,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto& exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref(); + //auto& exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref(); + auto& exdData = *reinterpret_cast< Sapphire::Data::ExdDataGenerated* >( player.getExdData() ); auto aetherInfo = exdData.get< Sapphire::Data::Aetheryte >( eventId & 0xFFFF ); if( !aetherInfo ) diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index 82579332..388b93c3 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -2497,3 +2497,8 @@ bool Sapphire::Entity::Player::gaugeSamHasAnySen() { return static_cast< uint8_t >( m_gauge.sam.sen ) > 0; } + +void* Sapphire::Entity::Player::getExdData() +{ + return &Common::Service< Data::ExdDataGenerated >::ref(); +} \ No newline at end of file diff --git a/src/world/Actor/Player.h b/src/world/Actor/Player.h index db19a201..ef2cbd36 100644 --- a/src/world/Actor/Player.h +++ b/src/world/Actor/Player.h @@ -1016,6 +1016,8 @@ namespace Sapphire::Entity ////////////////////////////////////////////////////////////////////////////////////////////////////// + void* getExdData(); + Common::HuntingLogEntry& getHuntingLogEntry( uint8_t index ); void sendHuntingLog();